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  // 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 }
TEcnaHeader::fAvSigCorssCalc
Int_t fAvSigCorssCalc
Definition: TEcnaHeader.h:90
TEcnaHeader::fAvLfnCalc
Int_t fAvLfnCalc
Definition: TEcnaHeader.h:70
TEcnaHeader::fAvMeanCorssCalc
Int_t fAvMeanCorssCalc
Definition: TEcnaHeader.h:89
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
TEcnaHeader::fHfCorCalc
Int_t fHfCorCalc
Definition: TEcnaHeader.h:76
TEcnaHeader::fReqNbOfEvts
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:52
TEcnaHeader::fRunType
Int_t fRunType
Definition: TEcnaHeader.h:60
TEcnaHeader::fCovCssCalc
Int_t fCovCssCalc
Definition: TEcnaHeader.h:73
TEcnaHeader::fHFccMoStinsCalc
Int_t fHFccMoStinsCalc
Definition: TEcnaHeader.h:80
TEcnaHeader::fMSpCalc
Int_t fMSpCalc
Definition: TEcnaHeader.h:67
gather_cfg.cout
cout
Definition: gather_cfg.py:144
TEcnaHeader::fHfnCalc
Int_t fHfnCalc
Definition: TEcnaHeader.h:85
contentValuesCheck.run_number
run_number
Definition: contentValuesCheck.py:38
TEcnaHeader::fNbOfSamples
Int_t fNbOfSamples
Definition: TEcnaHeader.h:48
TEcnaHeader::Print
void Print()
Definition: TEcnaHeader.cc:146
TEcnaHeader::fStopDate
TString fStopDate
Definition: TEcnaHeader.h:58
TEcnaHeader::fCorCssCalc
Int_t fCorCssCalc
Definition: TEcnaHeader.h:74
TEcnaHeader::fHfCovCalc
Int_t fHfCovCalc
Definition: TEcnaHeader.h:75
TEcnaHeader::fNbOfEvtsCalc
Int_t fNbOfEvtsCalc
Definition: TEcnaHeader.h:64
TEcnaObject::RegisterPointer
Bool_t RegisterPointer(const TString &, const Long_t &)
Definition: TEcnaObject.cc:100
TEcnaHeader::fMeanCorssCalc
Int_t fMeanCorssCalc
Definition: TEcnaHeader.h:83
TEcnaHeader::fgMaxCar
Int_t fgMaxCar
Definition: TEcnaHeader.h:44
TEcnaHeader::fStartDate
TString fStartDate
Definition: TEcnaHeader.h:57
TEcnaObject
Definition: TEcnaObject.h:25
TEcnaHeader::fPedCalc
Int_t fPedCalc
Definition: TEcnaHeader.h:81
TEcnaHeader::fAvHfnCalc
Int_t fAvHfnCalc
Definition: TEcnaHeader.h:71
TEcnaHeader::fLfCovCalc
Int_t fLfCovCalc
Definition: TEcnaHeader.h:77
TEcnaHeader::fAvTnoCalc
Int_t fAvTnoCalc
Definition: TEcnaHeader.h:69
TEcnaHeader
Definition: TEcnaHeader.h:36
TEcnaHeader::Init
void Init()
Definition: TEcnaHeader.cc:37
TEcnaHeader::TEcnaHeader
TEcnaHeader()
Definition: TEcnaHeader.cc:16
TEcnaHeader::fFirstReqEvtNumber
Int_t fFirstReqEvtNumber
Definition: TEcnaHeader.h:50
ClassImp
ClassImp(TEcnaHeader)
TEcnaHeader::fRunNumber
Int_t fRunNumber
Definition: TEcnaHeader.h:49
TEcnaHeader::fAdcEvtCalc
Int_t fAdcEvtCalc
Definition: TEcnaHeader.h:66
TEcnaHeader.h
TEcnaHeader::fLastReqEvtNumber
Int_t fLastReqEvtNumber
Definition: TEcnaHeader.h:51
TEcnaHeader::fAvPedCalc
Int_t fAvPedCalc
Definition: TEcnaHeader.h:88
TEcnaHeader::HeaderParameters
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
TEcnaHeader::fTnoCalc
Int_t fTnoCalc
Definition: TEcnaHeader.h:82
TEcnaHeader::fLfnCalc
Int_t fLfnCalc
Definition: TEcnaHeader.h:84
TEcnaHeader::fStartTime
time_t fStartTime
Definition: TEcnaHeader.h:55
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
TEcnaHeader::fLFccMoStinsCalc
Int_t fLFccMoStinsCalc
Definition: TEcnaHeader.h:79
TEcnaHeader::fTypAna
TString fTypAna
Definition: TEcnaHeader.h:47
TEcnaHeader::~TEcnaHeader
~TEcnaHeader() override
Definition: TEcnaHeader.cc:31
TEcnaHeader::fStinNumbersCalc
Int_t fStinNumbersCalc
Definition: TEcnaHeader.h:63
TEcnaHeader::fLfCorCalc
Int_t fLfCorCalc
Definition: TEcnaHeader.h:78
TEcnaHeader::fSigCorssCalc
Int_t fSigCorssCalc
Definition: TEcnaHeader.h:86
TEcnaHeader::fStex
Int_t fStex
Definition: TEcnaHeader.h:53
TEcnaHeader::fStopTime
time_t fStopTime
Definition: TEcnaHeader.h:56
TEcnaHeader::fSSpCalc
Int_t fSSpCalc
Definition: TEcnaHeader.h:68