CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TEcnaHeader.cc
Go to the documentation of this file.
1 //----------Author's Name:FX Gentit and B.Fabbro DSM/IRFU/SPP CEA-Saclay
2 //----------Copyright:Those valid for CEA software
3 //----------Modified:17/03/2010
4 
6 
7 ClassImp(TEcnaHeader)
8  //____________________________________________________________________________
9 
10  TEcnaHeader::TEcnaHeader(){Init();} // constructor without arguments
11 TEcnaHeader::TEcnaHeader(const Text_t* name, const Text_t* title):TNamed(name,title)
12 {
13  // Constructor with arguments for reading ROOT file.
14  // Called in GetReadyToReadRootFile(...) of TEcnaRead
15  // Please give a name and a title containing info about what
16  // you are doing and saving in the ROOT file
17  // cout << "[Info Management] CLASS: TEcnaHeader. CREATE OBJECT: this = " << this << endl;
18 
19  Init();
20 }
21 
23  //destructor
24 
25  // cout << "[Info Management] CLASS: TEcnaHeader. DESTROY OBJECT: this = " << this << endl;
26 }
27 
29 {
30  //Set default values in all variables and init the counters fxxxCalc
31 
32  //--------------------------------- INIT parameters
33 
34  fgMaxCar = (Int_t)512;
35 
36  //........................ RUN parameters
37 
38  fTypAna = "!Analysis name> no info";
39  fNbOfSamples = (Int_t)0;
40  fRunNumber = (Int_t)0;
41  fFirstReqEvtNumber = (Int_t)0;
42  fLastReqEvtNumber = (Int_t)0;
43  fReqNbOfEvts = (Int_t)0;
44  fStex = (Int_t)0;
45 
46  fStartTime = (time_t)0;
47  fStopTime = (time_t)0;
48 
49  Int_t MaxCar = fgMaxCar;
50  fStartDate.Resize(MaxCar);
51  fStartDate = "!Start date> no info";
52  MaxCar = fgMaxCar;
53  fStopDate.Resize(MaxCar);
54  fStopDate = "!Stop date> no info";
55 
56  fRunType = 9999999;
57 
58  //--------------------------------- INIT counters
59  fStinNumbersCalc = 0;
60  fNbOfEvtsCalc = 0;
61  fAdcEvtCalc = 0;
62  fMSpCalc = 0;
63  fSSpCalc = 0;
64 
65  fCovCssCalc = 0;
66  fCorCssCalc = 0;
67  fHfCovCalc = 0;
68  fHfCorCalc = 0;
69  fLfCovCalc = 0;
70  fLfCorCalc = 0;
71  fLFccMoStinsCalc = 0;
72  fHFccMoStinsCalc = 0;
73  fPedCalc = 0;
74  fTnoCalc = 0;
75  fMeanCorssCalc = 0;
76  fLfnCalc = 0;
77  fHfnCalc = 0;
78  fSigCorssCalc = 0;
79 
80  fAvPedCalc = 0;
81  fAvTnoCalc = 0;
82  fAvLfnCalc = 0;
83  fAvHfnCalc = 0;
84  fAvMeanCorssCalc = 0;
85  fAvSigCorssCalc = 0;
86 }
87 // ------------ end of Init() ------------
88 
89 void TEcnaHeader::HeaderParameters(TString typ_ana, const Int_t& nb_of_samples,
90  const Int_t& run_number, const Int_t& aFirstReqEvtNumber,
91  const Int_t& aLastReqEvtNumber, const Int_t& aReqNbOfEvts,
92  const Int_t& Stex, const Int_t& run_type
93  )
94 {
95  // Constructor with arguments for reading DATA.
96  // Called in GetReadyToReadData(...) of TEcnaRun
97  // Please give a name and a title containing info about what
98  // you are doing and saving in the ROOT file
99 
100  // cout << "[Info Management] CLASS: TEcnaHeader. CREATE OBJECT: this = " << this << endl;
101 
102  fTypAna = typ_ana;
103  fRunNumber = run_number;
104  fNbOfSamples = nb_of_samples;
105  fFirstReqEvtNumber = aFirstReqEvtNumber;
106  fLastReqEvtNumber = aLastReqEvtNumber;
107  fReqNbOfEvts = aReqNbOfEvts;
108  fStex = Stex;
109 
110  fRunType = run_type;
111 }
112 //------------------------------------------------------------------------------
113 
114 void TEcnaHeader::HeaderParameters(TString typ_ana, const Int_t& nb_of_samples,
115  const Int_t& run_number, const Int_t& aFirstReqEvtNumber,
116  const Int_t& aLastReqEvtNumber, const Int_t& aReqNbOfEvts,
117  const Int_t& Stex)
118  {
119  // cout << "[Info Management] CLASS: TEcnaHeader. CREATE OBJECT: this = " << this << endl;
120 
121 
122  fTypAna = typ_ana;
123  fRunNumber = run_number;
124  fNbOfSamples = nb_of_samples;
125  fFirstReqEvtNumber = aFirstReqEvtNumber;
126  fLastReqEvtNumber = aLastReqEvtNumber;
127  fReqNbOfEvts = aReqNbOfEvts;
128  fStex = Stex;
129 }
130 
132  // Print the header
133  cout << endl;
134  cout << " Header parameters " << endl;
135  cout << endl;
136  cout << "Run number : " << fRunNumber << endl;
137  cout << "First requested event number : " << fFirstReqEvtNumber << endl;
138  cout << "Last requested event number : " << fLastReqEvtNumber << endl;
139  cout << "Requested number of events : " << fReqNbOfEvts << endl;
140  cout << "Stex number : " << fStex << endl;
141  cout << "Time first event : " << fStartTime << endl;
142  cout << "Time last event : " << fStopTime << endl;
143  cout << "Date first event : " << fStartDate.Data() << endl;
144  cout << "Date last event : " << fStopDate.Data() << endl;
145  cout << "Run type : " << fRunType << endl;
146  cout << endl;
147  cout << " Header counters " << endl;
148  cout << endl;
149  cout << "Stin Numbers : "
150  << fStinNumbersCalc << endl;
151  cout << "Numbers of found evts : "
152  << fNbOfEvtsCalc << endl;
153  cout << "Samples as a function of time histograms : "
154  << fAdcEvtCalc << endl;
155  cout << "Expectation values histogram : "
156  << fMSpCalc << endl;
157  cout << "Variances histogram : "
158  << fSSpCalc << endl;
159  cout << "Averaged total noise : "
160  << fAvTnoCalc << endl;
161  cout << "Averaged low frequency noise : "
162  << fAvLfnCalc << endl;
163  cout << "Averaged high frequency noise : "
164  << fAvHfnCalc << endl;
165 
166  cout << "Nb of (sample,sample) covariance matrices : "
167  << fCovCssCalc << endl;
168  cout << "Nb of (sample,sample) correlation matrices : "
169  << fCorCssCalc << endl;
170  cout << "Nb of (channel,channel) covariance matrices : "
171  << fHfCovCalc << endl;
172  cout << "Nb of (channel,channel) correlation matrices : "
173  << fHfCorCalc << endl;
174  cout << "Nb of (channel,channel) cov mat mean on samp : "
175  << fLfCovCalc << endl;
176  cout << "Nb of (channel,channel) cor mat mean on samp : "
177  << fLfCorCalc << endl;
178  cout << "Nb of mean cov(c,c) mean on samp, all Stins : "
179  << fLfCovCalc << endl;
180  cout << "Nb of mean cor(c,c) mean on samp, all Stins : "
181  << fLfCorCalc << endl;
182 
183  cout << "Exp. val. of the exp. val. of the samples : "
184  << fPedCalc << endl;
185  cout << "Expect. val. of the sigmas of the samples : "
186  << fTnoCalc << endl;
187  cout << "Expect. val. of the (samp,samp) correlations : "
188  << fMeanCorssCalc << endl;
189 
190  cout << "Sigmas of the exp. val. of the samples : "
191  << fLfnCalc << endl;
192  cout << "Sigmas of the sigmas of the samples : "
193  << fHfnCalc << endl;
194  cout << "Sigmas of the (samp,samp) correlations : "
195  << fSigCorssCalc << endl;
196 
197  cout << "Averaged pedestals : "
198  << fAvPedCalc << endl;
199  cout << "Averaged Mean of Cor(s,s) : "
200  << fAvMeanCorssCalc << endl;
201  cout << "Averaged sigma of Cor(s,s) : "
202  << fAvSigCorssCalc << endl;
203  cout << endl;
204 }
Int_t fStex
Definition: TEcnaHeader.h:39
Int_t fHFccMoStinsCalc
Definition: TEcnaHeader.h:66
Int_t fAvLfnCalc
Definition: TEcnaHeader.h:56
Int_t fSSpCalc
Definition: TEcnaHeader.h:54
void Print()
Definition: TEcnaHeader.cc:131
Int_t fRunType
Definition: TEcnaHeader.h:46
Int_t fHfnCalc
Definition: TEcnaHeader.h:71
Int_t fAvMeanCorssCalc
Definition: TEcnaHeader.h:75
Int_t fHfCorCalc
Definition: TEcnaHeader.h:62
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:38
Int_t fMSpCalc
Definition: TEcnaHeader.h:53
Int_t fNbOfEvtsCalc
Definition: TEcnaHeader.h:50
Int_t fNbOfSamples
Definition: TEcnaHeader.h:34
TString fStopDate
Definition: TEcnaHeader.h:44
Int_t fMeanCorssCalc
Definition: TEcnaHeader.h:69
Int_t fHfCovCalc
Definition: TEcnaHeader.h:61
Int_t fgMaxCar
Definition: TEcnaHeader.h:30
Int_t fCorCssCalc
Definition: TEcnaHeader.h:60
Int_t fAvTnoCalc
Definition: TEcnaHeader.h:55
Int_t fPedCalc
Definition: TEcnaHeader.h:67
Int_t fAvHfnCalc
Definition: TEcnaHeader.h:57
TString fStartDate
Definition: TEcnaHeader.h:43
TString fTypAna
Definition: TEcnaHeader.h:33
void Init()
Definition: TEcnaHeader.cc:28
Int_t fAvPedCalc
Definition: TEcnaHeader.h:74
Int_t fFirstReqEvtNumber
Definition: TEcnaHeader.h:36
Int_t fLfCorCalc
Definition: TEcnaHeader.h:64
Int_t fAdcEvtCalc
Definition: TEcnaHeader.h:52
Int_t fTnoCalc
Definition: TEcnaHeader.h:68
time_t fStartTime
Definition: TEcnaHeader.h:41
time_t fStopTime
Definition: TEcnaHeader.h:42
Int_t fLfCovCalc
Definition: TEcnaHeader.h:63
Int_t fLFccMoStinsCalc
Definition: TEcnaHeader.h:65
Int_t fLastReqEvtNumber
Definition: TEcnaHeader.h:37
void HeaderParameters(TString, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaHeader.cc:114
tuple cout
Definition: gather_cfg.py:41
Int_t fRunNumber
Definition: TEcnaHeader.h:35
Int_t fSigCorssCalc
Definition: TEcnaHeader.h:72
Int_t fLfnCalc
Definition: TEcnaHeader.h:70
Int_t fStinNumbersCalc
Definition: TEcnaHeader.h:49
Int_t fAvSigCorssCalc
Definition: TEcnaHeader.h:76
Int_t fCovCssCalc
Definition: TEcnaHeader.h:59