CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 
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  // Constructor with arguments for reading ROOT file.
20  // Called in FileParameters(...) of TEcnaRead
21  // Please give a name and a title containing info about what
22  // you are doing and saving in the ROOT file
23 
24  // std::cout << "[Info Management] CLASS: TEcnaHeader. CREATE OBJECT: this = " << this << std::endl;
25 
26  Init();
27  Long_t i_this = (Long_t)this;
28  pObjectManager->RegisterPointer("TEcnaHeader", i_this);
29 }
30 
32  //destructor
33 
34  // std::cout << "[Info Management] CLASS: TEcnaHeader. DESTROY OBJECT: this = " << this << std::endl;
35 }
36 
38  //Set default values in all variables and init the counters fxxxCalc
39 
40  //--------------------------------- INIT parameters
41 
42  fgMaxCar = (Int_t)512;
43 
44  //........................ RUN parameters
45 
46  fTypAna = "!Analysis name> no info";
47  fNbOfSamples = (Int_t)0;
48  fRunNumber = (Int_t)0;
49  fFirstReqEvtNumber = (Int_t)0;
50  fLastReqEvtNumber = (Int_t)0;
51  fReqNbOfEvts = (Int_t)0;
52  fStex = (Int_t)0;
53 
54  fStartTime = (time_t)0;
55  fStopTime = (time_t)0;
56 
57  Int_t MaxCar = fgMaxCar;
58  fStartDate.Resize(MaxCar);
59  fStartDate = "!Start date> no info";
60  MaxCar = fgMaxCar;
61  fStopDate.Resize(MaxCar);
62  fStopDate = "!Stop date> no info";
63 
64  fRunType = 9999999;
65 
66  //--------------------------------- INIT counters
67  fStinNumbersCalc = 0;
68  fNbOfEvtsCalc = 0;
69  fAdcEvtCalc = 0;
70  fMSpCalc = 0;
71  fSSpCalc = 0;
72 
73  fCovCssCalc = 0;
74  fCorCssCalc = 0;
75  fHfCovCalc = 0;
76  fHfCorCalc = 0;
77  fLfCovCalc = 0;
78  fLfCorCalc = 0;
79  fLFccMoStinsCalc = 0;
80  fHFccMoStinsCalc = 0;
81  fPedCalc = 0;
82  fTnoCalc = 0;
83  fMeanCorssCalc = 0;
84  fLfnCalc = 0;
85  fHfnCalc = 0;
86  fSigCorssCalc = 0;
87 
88  fAvPedCalc = 0;
89  fAvTnoCalc = 0;
90  fAvLfnCalc = 0;
91  fAvHfnCalc = 0;
92  fAvMeanCorssCalc = 0;
93  fAvSigCorssCalc = 0;
94 }
95 // ------------ end of Init() ------------
96 
97 void TEcnaHeader::HeaderParameters(const TString& typ_ana,
98  const Int_t& nb_of_samples,
99  const Int_t& run_number,
100  const Int_t& aFirstReqEvtNumber,
101  const Int_t& aLastReqEvtNumber,
102  const Int_t& aReqNbOfEvts,
103  const Int_t& Stex,
104  const Int_t& run_type) {
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;
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,
127  const Int_t& nb_of_samples,
128  const Int_t& run_number,
129  const Int_t& aFirstReqEvtNumber,
130  const Int_t& aLastReqEvtNumber,
131  const Int_t& aReqNbOfEvts,
132  const Int_t& Stex) {
133  // std::cout << "[Info Management] CLASS: TEcnaHeader. CREATE OBJECT: this = " << this << std::endl;
134 
135  Init();
136 
137  fTypAna = typ_ana;
139  fNbOfSamples = nb_of_samples;
140  fFirstReqEvtNumber = aFirstReqEvtNumber;
141  fLastReqEvtNumber = aLastReqEvtNumber;
142  fReqNbOfEvts = aReqNbOfEvts;
143  fStex = Stex;
144 }
145 
147  // Print the header
148  std::cout << std::endl;
149  std::cout << " Header parameters " << std::endl;
150  std::cout << std::endl;
151  std::cout << "Run number : " << fRunNumber << std::endl;
152  std::cout << "First requested event number : " << fFirstReqEvtNumber << std::endl;
153  std::cout << "Last requested event number : " << fLastReqEvtNumber << std::endl;
154  std::cout << "Requested number of events : " << fReqNbOfEvts << std::endl;
155  std::cout << "SM or Dee number : " << fStex << std::endl;
156  std::cout << "Time first event : " << fStartTime << std::endl;
157  std::cout << "Time last event : " << fStopTime << std::endl;
158  std::cout << "Date first event : " << fStartDate.Data() << std::endl;
159  std::cout << "Date last event : " << fStopDate.Data() << std::endl;
160  std::cout << "Run type : " << fRunType << std::endl;
161  std::cout << std::endl;
162  std::cout << " Header counters " << std::endl;
163  std::cout << std::endl;
164  std::cout << "Stin Numbers : " << fStinNumbersCalc << std::endl;
165  std::cout << "Numbers of found evts : " << fNbOfEvtsCalc << std::endl;
166  std::cout << "Samples as a function of time histograms : " << fAdcEvtCalc << std::endl;
167  std::cout << "Expectation values histogram : " << fMSpCalc << std::endl;
168  std::cout << "Variances histogram : " << fSSpCalc << std::endl;
169  std::cout << "Average total noise : " << fAvTnoCalc << std::endl;
170  std::cout << "Average low frequency noise : " << fAvLfnCalc << std::endl;
171  std::cout << "Average high frequency noise : " << fAvHfnCalc << std::endl;
172 
173  std::cout << "Nb of (sample,sample) covariance matrices : " << fCovCssCalc << std::endl;
174  std::cout << "Nb of (sample,sample) correlation matrices : " << fCorCssCalc << std::endl;
175  std::cout << "Nb of (channel,channel) covariance matrices : " << fHfCovCalc << std::endl;
176  std::cout << "Nb of (channel,channel) correlation matrices : " << fHfCorCalc << std::endl;
177  std::cout << "Nb of (channel,channel) cov mat mean on samp : " << fLfCovCalc << std::endl;
178  std::cout << "Nb of (channel,channel) cor mat mean on samp : " << fLfCorCalc << std::endl;
179  std::cout << "Nb of mean cov(c,c) mean on samp, all Stins : " << fLfCovCalc << std::endl;
180  std::cout << "Nb of mean cor(c,c) mean on samp, all Stins : " << fLfCorCalc << std::endl;
181 
182  std::cout << "Exp. val. of the exp. val. of the samples : " << fPedCalc << std::endl;
183  std::cout << "Expect. val. of the sigmas of the samples : " << fTnoCalc << std::endl;
184  std::cout << "Expect. val. of the (samp,samp) correlations : " << fMeanCorssCalc << std::endl;
185 
186  std::cout << "Sigmas of the exp. val. of the samples : " << fLfnCalc << std::endl;
187  std::cout << "Sigmas of the sigmas of the samples : " << fHfnCalc << std::endl;
188  std::cout << "Sigmas of the (samp,samp) correlations : " << fSigCorssCalc << std::endl;
189 
190  std::cout << "Average pedestals : " << fAvPedCalc << std::endl;
191  std::cout << "Average mean cor(s,s) : " << fAvMeanCorssCalc << std::endl;
192  std::cout << "Average sigma of Cor(s,s) : " << fAvSigCorssCalc << std::endl;
193  std::cout << std::endl;
194 }
Int_t fStex
Definition: TEcnaHeader.h:53
Int_t fHFccMoStinsCalc
Definition: TEcnaHeader.h:80
Int_t fAvLfnCalc
Definition: TEcnaHeader.h:70
Int_t fSSpCalc
Definition: TEcnaHeader.h:68
void Print()
Definition: TEcnaHeader.cc:146
Int_t fRunType
Definition: TEcnaHeader.h:60
Int_t fHfnCalc
Definition: TEcnaHeader.h:85
Int_t fAvMeanCorssCalc
Definition: TEcnaHeader.h:89
Int_t fHfCorCalc
Definition: TEcnaHeader.h:76
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:52
Int_t fMSpCalc
Definition: TEcnaHeader.h:67
Int_t fNbOfEvtsCalc
Definition: TEcnaHeader.h:64
Int_t fNbOfSamples
Definition: TEcnaHeader.h:48
Bool_t RegisterPointer(const TString &, const Long_t &)
Definition: TEcnaObject.cc:100
TString fStopDate
Definition: TEcnaHeader.h:58
Int_t fMeanCorssCalc
Definition: TEcnaHeader.h:83
Int_t fHfCovCalc
Definition: TEcnaHeader.h:75
Int_t fgMaxCar
Definition: TEcnaHeader.h:44
Int_t fCorCssCalc
Definition: TEcnaHeader.h:74
Int_t fAvTnoCalc
Definition: TEcnaHeader.h:69
ClassImp(AliDaqEventHeader)
Int_t fPedCalc
Definition: TEcnaHeader.h:81
Int_t fAvHfnCalc
Definition: TEcnaHeader.h:71
TString fStartDate
Definition: TEcnaHeader.h:57
TString fTypAna
Definition: TEcnaHeader.h:47
void Init()
Definition: TEcnaHeader.cc:37
Int_t fAvPedCalc
Definition: TEcnaHeader.h:88
Int_t fFirstReqEvtNumber
Definition: TEcnaHeader.h:50
Int_t fLfCorCalc
Definition: TEcnaHeader.h:78
Int_t fAdcEvtCalc
Definition: TEcnaHeader.h:66
Int_t fTnoCalc
Definition: TEcnaHeader.h:82
time_t fStartTime
Definition: TEcnaHeader.h:55
time_t fStopTime
Definition: TEcnaHeader.h:56
Int_t fLfCovCalc
Definition: TEcnaHeader.h:77
Int_t fLFccMoStinsCalc
Definition: TEcnaHeader.h:79
Int_t fLastReqEvtNumber
Definition: TEcnaHeader.h:51
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
tuple cout
Definition: gather_cfg.py:144
Int_t fRunNumber
Definition: TEcnaHeader.h:49
Int_t fSigCorssCalc
Definition: TEcnaHeader.h:86
Int_t fLfnCalc
Definition: TEcnaHeader.h:84
~TEcnaHeader() override
Definition: TEcnaHeader.cc:31
Int_t fStinNumbersCalc
Definition: TEcnaHeader.h:63
Int_t fAvSigCorssCalc
Definition: TEcnaHeader.h:90
Int_t fCovCssCalc
Definition: TEcnaHeader.h:73