CMS 3D CMS Logo

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 
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  // std::cout << "[Info Management] CLASS: TEcnaHeader. CREATE OBJECT: this = " << this << std::endl;
26 
27  Init();
28  Long_t i_this = (Long_t)this;
29  pObjectManager->RegisterPointer("TEcnaHeader", i_this);
30 }
31 
33  //destructor
34 
35  // std::cout << "[Info Management] CLASS: TEcnaHeader. DESTROY OBJECT: this = " << this << std::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(const 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  // std::cout << "[Info Management] CLASS: TEcnaHeader. CREATE OBJECT: this = " << this << std::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(const 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  // std::cout << "[Info Management] CLASS: TEcnaHeader. CREATE OBJECT: this = " << this << std::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  std::cout << std::endl;
147  std::cout << " Header parameters " << std::endl;
148  std::cout << std::endl;
149  std::cout << "Run number : " << fRunNumber << std::endl;
150  std::cout << "First requested event number : " << fFirstReqEvtNumber << std::endl;
151  std::cout << "Last requested event number : " << fLastReqEvtNumber << std::endl;
152  std::cout << "Requested number of events : " << fReqNbOfEvts << std::endl;
153  std::cout << "SM or Dee number : " << fStex << std::endl;
154  std::cout << "Time first event : " << fStartTime << std::endl;
155  std::cout << "Time last event : " << fStopTime << std::endl;
156  std::cout << "Date first event : " << fStartDate.Data() << std::endl;
157  std::cout << "Date last event : " << fStopDate.Data() << std::endl;
158  std::cout << "Run type : " << fRunType << std::endl;
159  std::cout << std::endl;
160  std::cout << " Header counters " << std::endl;
161  std::cout << std::endl;
162  std::cout << "Stin Numbers : "
163  << fStinNumbersCalc << std::endl;
164  std::cout << "Numbers of found evts : "
165  << fNbOfEvtsCalc << std::endl;
166  std::cout << "Samples as a function of time histograms : "
167  << fAdcEvtCalc << std::endl;
168  std::cout << "Expectation values histogram : "
169  << fMSpCalc << std::endl;
170  std::cout << "Variances histogram : "
171  << fSSpCalc << std::endl;
172  std::cout << "Average total noise : "
173  << fAvTnoCalc << std::endl;
174  std::cout << "Average low frequency noise : "
175  << fAvLfnCalc << std::endl;
176  std::cout << "Average high frequency noise : "
177  << fAvHfnCalc << std::endl;
178 
179  std::cout << "Nb of (sample,sample) covariance matrices : "
180  << fCovCssCalc << std::endl;
181  std::cout << "Nb of (sample,sample) correlation matrices : "
182  << fCorCssCalc << std::endl;
183  std::cout << "Nb of (channel,channel) covariance matrices : "
184  << fHfCovCalc << std::endl;
185  std::cout << "Nb of (channel,channel) correlation matrices : "
186  << fHfCorCalc << std::endl;
187  std::cout << "Nb of (channel,channel) cov mat mean on samp : "
188  << fLfCovCalc << std::endl;
189  std::cout << "Nb of (channel,channel) cor mat mean on samp : "
190  << fLfCorCalc << std::endl;
191  std::cout << "Nb of mean cov(c,c) mean on samp, all Stins : "
192  << fLfCovCalc << std::endl;
193  std::cout << "Nb of mean cor(c,c) mean on samp, all Stins : "
194  << fLfCorCalc << std::endl;
195 
196  std::cout << "Exp. val. of the exp. val. of the samples : "
197  << fPedCalc << std::endl;
198  std::cout << "Expect. val. of the sigmas of the samples : "
199  << fTnoCalc << std::endl;
200  std::cout << "Expect. val. of the (samp,samp) correlations : "
201  << fMeanCorssCalc << std::endl;
202 
203  std::cout << "Sigmas of the exp. val. of the samples : "
204  << fLfnCalc << std::endl;
205  std::cout << "Sigmas of the sigmas of the samples : "
206  << fHfnCalc << std::endl;
207  std::cout << "Sigmas of the (samp,samp) correlations : "
208  << fSigCorssCalc << std::endl;
209 
210  std::cout << "Average pedestals : "
211  << fAvPedCalc << std::endl;
212  std::cout << "Average mean cor(s,s) : "
213  << fAvMeanCorssCalc << std::endl;
214  std::cout << "Average sigma of Cor(s,s) : "
215  << fAvSigCorssCalc << std::endl;
216  std::cout << std::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
ClassImp(TEcnaHeader) TEcnaHeader
Definition: TEcnaHeader.cc:13
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
Bool_t RegisterPointer(const TString &, const Long_t &)
Definition: TEcnaObject.cc:105
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
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(const TString &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaHeader.cc:126
Int_t fRunNumber
Definition: TEcnaHeader.h:52
Int_t fSigCorssCalc
Definition: TEcnaHeader.h:89
Int_t fLfnCalc
Definition: TEcnaHeader.h:87
~TEcnaHeader() override
Definition: TEcnaHeader.cc:32
Int_t fStinNumbersCalc
Definition: TEcnaHeader.h:66
Int_t fAvSigCorssCalc
Definition: TEcnaHeader.h:93
Int_t fCovCssCalc
Definition: TEcnaHeader.h:76