CMS 3D CMS Logo

EcnaAnalyzer.h
Go to the documentation of this file.
1 #ifndef CL_EcnaAnalyzer_H
2 #define CL_EcnaAnalyzer_H
3 
4 // -*- C++ -*-
5 //
6 // Package: EcalCorrelatedNoiseAnalysisModules
7 // Class: EcnaAnalyzer
8 //
17 //
18 // Original Author: Bernard Fabbro
19 // Created: Fri Jun 2 10:27:01 CEST 2006
20 // $Id: EcnaAnalyzer.h,v 1.3 2013/04/05 20:17:20 wmtan Exp $
21 //
22 //
23 
24 // system include files
25 #include "Riostream.h"
26 #include <ctime>
27 #include <fstream>
28 #include <iomanip>
29 #include <iostream>
30 #include <memory>
31 #include <string>
32 #include <vector>
33 
34 #include <csignal>
35 #include <sys/time.h>
36 
37 // ROOT include files
38 #include "TObject.h"
39 #include "TString.h"
40 #include "TSystem.h"
41 #include "TTreeIndex.h"
42 #include "TVectorD.h"
43 
44 // CMSSW include files
53 
55 
63 
65 //#include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h"
66 //#include "Geometry/EcalMapping/interface/EcalMappingRcd.h"
67 
70 
71 // user include files
77 
130 
131 //
132 // class declaration
133 //
134 
136 public:
137  enum { kChannels = 1700, kGains = 3, kFirstGainId = 1 };
138 
139  explicit EcnaAnalyzer(const edm::ParameterSet &);
140  ~EcnaAnalyzer() override;
141 
142  void analyze(const edm::Event &, const edm::EventSetup &) override;
143  TString runtype(const Int_t &);
144  Int_t gainvalue(const Int_t &);
145  void CheckMsg(const Int_t &, const Int_t &);
146  void CheckMsg(const Int_t &);
147  Bool_t AnalysisOutcome(const TString &);
148 
149 private:
150  Int_t fgMaxCar; // Max nb of caracters for char*
151  TString fTTBELL;
152 
153  // ----------member data ---------------------------
154  unsigned int verbosity_;
155  Int_t nChannels_;
156  Int_t iEvent_; // should be removed when we can access class EventID
162 
163  TString sAnalysisName_;
164  TString sNbOfSamples_;
166  TString sLastReqEvent_;
167  TString sReqNbOfEvts_;
168  TString sStexName_;
169  TString sStexNumber_;
170 
172 
173  Int_t fEvtNumber;
175  Int_t fRecNumber;
178 
181 
182  TString fCfgAnalyzerParametersFilePath; // absolute path for the analyzer
183  // parameters files (/afs/etc...)
184  TString fCfgAnalyzerParametersFileName; // name of the analyzer parameters file
185  std::ifstream fFcin_f;
186 
187  TString fAnalysisName;
188  Int_t fChozenGainNumber; // determined from fAnalysisName
189  Int_t fChozenRunTypeNumber; // determined from fAnalysisName
190  TString fDynBaseLineSub; // determined from fAnalysisName
191 
193  Int_t fRunNumber;
197  TString fStexName;
198  Int_t fStexNumber;
199 
202 
209 
210  Int_t fFedTcc;
216  Int_t fFedId;
218 
222  Int_t *fStexDigiOK;
224  Int_t *fStexStatus;
225 
227  Int_t *fFedStatus;
228  Int_t *fFedDigiOK;
230 
231  Int_t fMemoCutOK;
235 
236  Int_t fANY_RUN;
239  Int_t fLASER_STD;
241  Int_t fPEDSIM;
242 
243  time_t *fTimeFirst;
244  time_t *fTimeLast;
245  TString *fDateFirst;
246  TString *fDateLast;
247 
249 
252 
255 
258 
261 
262  // Int_t** fT2d_LastEvt; // 2D array[channel][sample] max nb of evts read for
263  // a given (channel,sample) Int_t* fT1d_LastEvt;
264 
267 
270 
273 
275  Int_t *fCounterQuad;
276 };
277 
278 #endif
EcnaAnalyzer::fPEDESTAL_GAP
Int_t fPEDESTAL_GAP
Definition: EcnaAnalyzer.h:238
EcnaAnalyzer::sAnalysisName_
TString sAnalysisName_
Definition: EcnaAnalyzer.h:163
TEcnaParPaths.h
EcnaAnalyzer::EBdigiCollection_
std::string EBdigiCollection_
Definition: EcnaAnalyzer.h:160
Handle.h
EcnaAnalyzer::digiProducer_
std::string digiProducer_
Definition: EcnaAnalyzer.h:158
EcnaAnalyzer::eventHeaderCollection_
std::string eventHeaderCollection_
Definition: EcnaAnalyzer.h:159
EcnaAnalyzer::CheckMsg
void CheckMsg(const Int_t &, const Int_t &)
Definition: EcnaAnalyzer.cc:1626
EcnaAnalyzer::fStexName
TString fStexName
Definition: EcnaAnalyzer.h:197
EcnaAnalyzer::fCounterQuad
Int_t * fCounterQuad
Definition: EcnaAnalyzer.h:275
MessageLogger.h
EcnaAnalyzer::fCfgAnalyzerParametersFileName
TString fCfgAnalyzerParametersFileName
Definition: EcnaAnalyzer.h:184
ESHandle.h
EcnaAnalyzer::EEdigiCollection_
std::string EEdigiCollection_
Definition: EcnaAnalyzer.h:161
EcnaAnalyzer::fNbOfSamples
Int_t fNbOfSamples
Definition: EcnaAnalyzer.h:192
EcnaAnalyzer::fStexNumber
Int_t fStexNumber
Definition: EcnaAnalyzer.h:198
EcnaAnalyzer::fOutcomeError
Bool_t fOutcomeError
Definition: EcnaAnalyzer.h:171
EcnaAnalyzer::sFirstReqEvent_
TString sFirstReqEvent_
Definition: EcnaAnalyzer.h:165
EcnaAnalyzer::eventHeaderProducer_
std::string eventHeaderProducer_
Definition: EcnaAnalyzer.h:157
EcnaAnalyzer::fBuildEventDistribGood
Int_t * fBuildEventDistribGood
Definition: EcnaAnalyzer.h:180
EcnaAnalyzer::fFedIdCounter
Int_t * fFedIdCounter
Definition: EcnaAnalyzer.h:272
TEcnaParEcal
Definition: TEcnaParEcal.h:24
EBDetId.h
EcnaAnalyzer::fDeeDS5Memo1
Int_t fDeeDS5Memo1
Definition: EcnaAnalyzer.h:220
EcnaAnalyzer::fNbOfSelectedEvents
Int_t fNbOfSelectedEvents
Definition: EcnaAnalyzer.h:177
EEDetId.h
EcnaAnalyzer::fMaxFedIdCounter
Int_t fMaxFedIdCounter
Definition: EcnaAnalyzer.h:271
EcnaAnalyzer::fgMaxCar
Int_t fgMaxCar
Definition: EcnaAnalyzer.h:150
EcnaAnalyzer::fSMIndexStop
Int_t fSMIndexStop
Definition: EcnaAnalyzer.h:204
EcnaAnalyzer::fPEDSIM
Int_t fPEDSIM
Definition: EcnaAnalyzer.h:241
EcnaAnalyzer::iEvent_
Int_t iEvent_
Definition: EcnaAnalyzer.h:156
EcnaAnalyzer::fStexIndexStop
Int_t fStexIndexStop
Definition: EcnaAnalyzer.h:208
EDAnalyzer.h
EcnaAnalyzer::fFedDigiOK
Int_t * fFedDigiOK
Definition: EcnaAnalyzer.h:228
EcnaAnalyzer::sReqNbOfEvts_
TString sReqNbOfEvts_
Definition: EcnaAnalyzer.h:167
EcnaAnalyzer::sStexName_
TString sStexName_
Definition: EcnaAnalyzer.h:168
EcnaAnalyzer::fDeeNumberString
TString * fDeeNumberString
Definition: EcnaAnalyzer.h:217
EcnaAnalyzer::verbosity_
unsigned int verbosity_
Definition: EcnaAnalyzer.h:154
EcalRecHitCollections.h
EcnaAnalyzer::fFedTcc
Int_t fFedTcc
Definition: EcnaAnalyzer.h:210
edm::EDAnalyzer
Definition: EDAnalyzer.h:29
EcnaAnalyzer::fEvtNumber
Int_t fEvtNumber
Definition: EcnaAnalyzer.h:173
EcnaAnalyzer::fMyEBEcal
TEcnaParEcal * fMyEBEcal
Definition: EcnaAnalyzer.h:257
EcnaAnalyzer::fCurrentEventNumber
Int_t fCurrentEventNumber
Definition: EcnaAnalyzer.h:176
EcnaAnalyzer::fANY_RUN
Int_t fANY_RUN
Definition: EcnaAnalyzer.h:236
EcnaAnalyzer::EcnaAnalyzer
EcnaAnalyzer(const edm::ParameterSet &)
Definition: EcnaAnalyzer.cc:44
EcnaAnalyzer::fMgpaGainCounter
Int_t * fMgpaGainCounter
Definition: EcnaAnalyzer.h:269
EcnaAnalyzer::fDeeFromFedTcc
Int_t * fDeeFromFedTcc
Definition: EcnaAnalyzer.h:213
TEcnaParEcal.h
EcnaAnalyzer::fMyEEEcal
TEcnaParEcal * fMyEEEcal
Definition: EcnaAnalyzer.h:260
EcalRawDataCollections.h
EcnaAnalyzer::fRunTypeCounter
Int_t * fRunTypeCounter
Definition: EcnaAnalyzer.h:266
EcnaAnalyzer::fStexStatus
Int_t * fStexStatus
Definition: EcnaAnalyzer.h:224
EcnaAnalyzer::fStexIndexBegin
Int_t fStexIndexBegin
Definition: EcnaAnalyzer.h:207
EcnaAnalyzer::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: EcnaAnalyzer.cc:685
EcnaAnalyzer::fEvtNumberMemo
Int_t fEvtNumberMemo
Definition: EcnaAnalyzer.h:174
EventID.h
EcnaAnalyzer::fBuildEventDistribBad
Int_t * fBuildEventDistribBad
Definition: EcnaAnalyzer.h:179
EcalDigiCollections.h
EcnaAnalyzer::fDateLast
TString * fDateLast
Definition: EcnaAnalyzer.h:246
TEcnaObject.h
TEcnaRun
Definition: TEcnaRun.h:363
EcnaAnalyzer::fFedId
Int_t fFedId
Definition: EcnaAnalyzer.h:216
EcnaAnalyzer::fMemoDateFirstEvent
Int_t * fMemoDateFirstEvent
Definition: EcnaAnalyzer.h:248
EcnaAnalyzer::kChannels
Definition: EcnaAnalyzer.h:137
EcnaAnalyzer::runtype
TString runtype(const Int_t &)
Definition: EcnaAnalyzer.cc:1722
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcnaAnalyzer::fCfgAnalyzerParametersFilePath
TString fCfgAnalyzerParametersFilePath
Definition: EcnaAnalyzer.h:182
EcnaAnalyzer::fRunNumber
Int_t fRunNumber
Definition: EcnaAnalyzer.h:193
Time.h
EcnaAnalyzer::fFirstReqEvent
Int_t fFirstReqEvent
Definition: EcnaAnalyzer.h:195
edm::ParameterSet
Definition: ParameterSet.h:36
TEcnaObject
Definition: TEcnaObject.h:25
Timestamp.h
Event.h
EcnaAnalyzer::kFirstGainId
Definition: EcnaAnalyzer.h:137
EcnaAnalyzer::fMaxCounterQuad
Int_t fMaxCounterQuad
Definition: EcnaAnalyzer.h:274
TEcnaRun.h
EcnaAnalyzer::fFcin_f
std::ifstream fFcin_f
Definition: EcnaAnalyzer.h:185
EcnaAnalyzer::fChozenRunTypeNumber
Int_t fChozenRunTypeNumber
Definition: EcnaAnalyzer.h:189
EcnaAnalyzer::fTimeFirst
time_t * fTimeFirst
Definition: EcnaAnalyzer.h:243
EcnaAnalyzer::fReqNbOfEvts
Int_t fReqNbOfEvts
Definition: EcnaAnalyzer.h:200
EcnaAnalyzer::fFedStatus
Int_t * fFedStatus
Definition: EcnaAnalyzer.h:227
EcnaAnalyzer::fAnalysisName
TString fAnalysisName
Definition: EcnaAnalyzer.h:187
EcnaAnalyzer::fStexDigiOK
Int_t * fStexDigiOK
Definition: EcnaAnalyzer.h:222
FEDRawDataCollection.h
EcnaAnalyzer::fMyCnaEEDee
TEcnaRun ** fMyCnaEEDee
Definition: EcnaAnalyzer.h:254
EcnaAnalyzer
Definition: EcnaAnalyzer.h:135
EcnaAnalyzer::sLastReqEvent_
TString sLastReqEvent_
Definition: EcnaAnalyzer.h:166
EBDataFrame.h
edm::EventSetup
Definition: EventSetup.h:57
EcnaAnalyzer::fStexNbOfTreatedEvents
Int_t * fStexNbOfTreatedEvents
Definition: EcnaAnalyzer.h:223
EcnaAnalyzer::kGains
Definition: EcnaAnalyzer.h:137
EcalMGPASample.h
EcnaAnalyzer::fESFromFedTcc
Int_t * fESFromFedTcc
Definition: EcnaAnalyzer.h:212
EcnaAnalyzer::fMaxRunTypeCounter
Int_t fMaxRunTypeCounter
Definition: EcnaAnalyzer.h:265
EcnaAnalyzer::fTimeLast
time_t * fTimeLast
Definition: EcnaAnalyzer.h:244
TEcnaNumbering
Definition: TEcnaNumbering.h:23
EcnaAnalyzer::fDeeDS5Memo2
Int_t fDeeDS5Memo2
Definition: EcnaAnalyzer.h:221
EcnaAnalyzer::fRunTypeNumber
Int_t fRunTypeNumber
Definition: EcnaAnalyzer.h:194
EcnaAnalyzer::fDeeIndexStop
Int_t fDeeIndexStop
Definition: EcnaAnalyzer.h:206
EcnaAnalyzer::fNbOfTreatedFedsInDee
Int_t * fNbOfTreatedFedsInDee
Definition: EcnaAnalyzer.h:233
EcnaAnalyzer::fMemoCutOK
Int_t fMemoCutOK
Definition: EcnaAnalyzer.h:231
EcnaAnalyzer::fFedNbOfTreatedEvents
Int_t * fFedNbOfTreatedEvents
Definition: EcnaAnalyzer.h:229
EcnaAnalyzer::fMaxMgpaGainCounter
Int_t fMaxMgpaGainCounter
Definition: EcnaAnalyzer.h:268
EcnaAnalyzer::fSMFromFedTcc
Int_t * fSMFromFedTcc
Definition: EcnaAnalyzer.h:211
EcnaAnalyzer::fSMIndexBegin
Int_t fSMIndexBegin
Definition: EcnaAnalyzer.h:203
EcnaAnalyzer::nChannels_
Int_t nChannels_
Definition: EcnaAnalyzer.h:155
EcnaAnalyzer::fDynBaseLineSub
TString fDynBaseLineSub
Definition: EcnaAnalyzer.h:190
EcnaAnalyzer::fMgpaGainNumber
Int_t fMgpaGainNumber
Definition: EcnaAnalyzer.h:201
EcnaAnalyzer::fChozenGainNumber
Int_t fChozenGainNumber
Definition: EcnaAnalyzer.h:188
EcnaAnalyzer::fMyCnaEBSM
TEcnaRun ** fMyCnaEBSM
Definition: EcnaAnalyzer.h:253
EcnaAnalyzer::fMyEBNumbering
TEcnaNumbering * fMyEBNumbering
Definition: EcnaAnalyzer.h:256
EcnaAnalyzer::AnalysisOutcome
Bool_t AnalysisOutcome(const TString &)
Definition: EcnaAnalyzer.cc:1488
Frameworkfwd.h
EcnaAnalyzer::fLastReqEvent
Int_t fLastReqEvent
Definition: EcnaAnalyzer.h:196
EcnaAnalyzer::fDateFirst
TString * fDateFirst
Definition: EcnaAnalyzer.h:245
EcnaAnalyzer::fPHYSICS_GLOBAL
Int_t fPHYSICS_GLOBAL
Definition: EcnaAnalyzer.h:240
TEcnaNumbering.h
EcnaAnalyzer::sNbOfSamples_
TString sNbOfSamples_
Definition: EcnaAnalyzer.h:164
EcnaAnalyzer::fMaxFedUnitCounter
Int_t fMaxFedUnitCounter
Definition: EcnaAnalyzer.h:226
EcnaAnalyzer::fMaxTreatedStexCounter
Int_t fMaxTreatedStexCounter
Definition: EcnaAnalyzer.h:219
EventSetup.h
EcnaAnalyzer::gainvalue
Int_t gainvalue(const Int_t &)
Definition: EcnaAnalyzer.cc:1812
EcnaAnalyzer::sStexNumber_
TString sStexNumber_
Definition: EcnaAnalyzer.h:169
EcnaAnalyzer::fPEDESTAL_STD
Int_t fPEDESTAL_STD
Definition: EcnaAnalyzer.h:237
EcnaAnalyzer::fMyEENumbering
TEcnaNumbering * fMyEENumbering
Definition: EcnaAnalyzer.h:259
EcnaAnalyzer::fNbOfTreatedFedsInStex
Int_t * fNbOfTreatedFedsInStex
Definition: EcnaAnalyzer.h:234
ParameterSet.h
EcnaAnalyzer::fDeeIndexBegin
Int_t fDeeIndexBegin
Definition: EcnaAnalyzer.h:205
EcnaAnalyzer::fMyEcnaEEObjectManager
TEcnaObject * fMyEcnaEEObjectManager
Definition: EcnaAnalyzer.h:251
EcnaAnalyzer::fFedStatusOrder
Int_t * fFedStatusOrder
Definition: EcnaAnalyzer.h:215
EcnaAnalyzer::~EcnaAnalyzer
~EcnaAnalyzer() override
Definition: EcnaAnalyzer.cc:514
EcnaAnalyzer::fNbOfTreatedStexs
Int_t fNbOfTreatedStexs
Definition: EcnaAnalyzer.h:232
edm::Event
Definition: Event.h:73
EcnaAnalyzer::fTTBELL
TString fTTBELL
Definition: EcnaAnalyzer.h:151
EcnaAnalyzer::fRecNumber
Int_t fRecNumber
Definition: EcnaAnalyzer.h:175
EcnaAnalyzer::fMyEcnaEBObjectManager
TEcnaObject * fMyEcnaEBObjectManager
Definition: EcnaAnalyzer.h:250
EcnaAnalyzer::fLASER_STD
Int_t fLASER_STD
Definition: EcnaAnalyzer.h:239
EcnaAnalyzer::fTreatedFedOrder
Int_t fTreatedFedOrder
Definition: EcnaAnalyzer.h:214