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