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