CMS 3D CMS Logo

EcnaAnalyzer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: EcalCorrelatedNoiseAnalysisModules
4 // Class: EcnaAnalyzer
5 // // class EcnaAnalyzer
6 // EcnaAnalyzer.cc
7 // CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/src/EcnaAnalyzer.cc
8 
9 // Description: <one line class summary>
10 
11 // Implementation:
12 // <Notes on implementation>
13 
14 //
15 // Original Author: Bernard Fabbro
16 // Created: Fri Jun 2 10:27:01 CEST 2006
17 // $Id: EcnaAnalyzer.cc,v 1.4 2013/04/05 20:17:20 wmtan Exp $
18 //
19 // Update: 21/07/2011
20 
21 // CMSSW include files
22 
23 //#include <signal.h>
24 
26 //#include <DataFormats/Provenance/interface/Timestamp.h>
27 
28 //--------------------------------------
29 // EcnaAnalyzer.cc
30 // Class creation: 02 June 2006
31 // Documentation: see EcnaAnalyzer.h
32 //--------------------------------------
33 //
34 // constants, enums and typedefs
35 //
36 
37 //
38 // static data member definitions
39 //
40 
41 //
42 // constructors and destructor
43 //
45  : verbosity_(pSet.getUntrackedParameter("verbosity", 1U)), nChannels_(0), iEvent_(0) {
46  // now do what ever initialization is needed
47 
48  using namespace edm;
49  using namespace std;
50 
53 
56 
57  std::cout << "*EcnaAnalyzer-constructor> Check path for resultsq Root files." << std::endl;
58 
59  if (myPathEB->GetPathForResultsRootFiles() == kFALSE) {
60  std::cout << "*EcnaAnalyzer-constructor> *** ERROR *** Path for result "
61  "files not found."
62  << std::endl;
63  kill(getpid(), SIGUSR2);
64  } else {
65  std::cout << "*EcnaAnalyzer-constructor> Path for result files found = " << myPathEB->ResultsRootFilePath()
66  << std::endl;
67  }
68 
69  if (myPathEE->GetPathForResultsRootFiles() == kFALSE) {
70  std::cout << "*EcnaAnalyzer-constructor> *** ERROR *** Path for result "
71  "files not found."
72  << std::endl;
73  kill(getpid(), SIGUSR2);
74  } else {
75  std::cout << "*EcnaAnalyzer-constructor> Path for result files found = " << myPathEE->ResultsRootFilePath()
76  << std::endl;
77  }
78 
79  std::cout << "*EcnaAnalyzer-constructor> Parameter initialization." << std::endl;
80 
81  fgMaxCar = (Int_t)512;
82  fTTBELL = '\007';
83  fOutcomeError = kFALSE;
84 
87 
90 
91  //==========================================================================================
92  //.................................. Get parameter values from python file
93  eventHeaderProducer_ = pSet.getParameter<std::string>("eventHeaderProducer");
94  digiProducer_ = pSet.getParameter<std::string>("digiProducer");
95 
96  eventHeaderCollection_ = pSet.getParameter<std::string>("eventHeaderCollection");
97  EBdigiCollection_ = pSet.getParameter<std::string>("EBdigiCollection");
98  EEdigiCollection_ = pSet.getParameter<std::string>("EEdigiCollection");
99 
100  sAnalysisName_ = pSet.getParameter<std::string>("sAnalysisName");
101  sNbOfSamples_ = pSet.getParameter<std::string>("sNbOfSamples");
102  sFirstReqEvent_ = pSet.getParameter<std::string>("sFirstReqEvent");
103  sLastReqEvent_ = pSet.getParameter<std::string>("sLastReqEvent");
104  sReqNbOfEvts_ = pSet.getParameter<std::string>("sReqNbOfEvts");
105  sStexName_ = pSet.getParameter<std::string>("sStexName");
106  sStexNumber_ = pSet.getParameter<std::string>("sStexNumber");
107 
108  fAnalysisName = sAnalysisName_.Data();
109  fNbOfSamples = atoi(sNbOfSamples_.Data());
110  fFirstReqEvent = atoi(sFirstReqEvent_.Data());
111  fLastReqEvent = atoi(sLastReqEvent_.Data());
112  fReqNbOfEvts = atoi(sReqNbOfEvts_.Data());
113  fStexName = sStexName_.Data();
114  fStexNumber = atoi(sStexNumber_.Data());
115 
116  //------------------------------- ERRORS in requested evts numbers
117  if (fFirstReqEvent < 1) {
118  fOutcomeError = AnalysisOutcome("ERR_FNEG");
119  }
120 
122  fOutcomeError = AnalysisOutcome("ERR_LREQ");
123  }
124 
125  if (fOutcomeError == kTRUE)
126  return;
127  //===========================================================================================
128 
129  fRunTypeCounter = nullptr;
130  fMaxRunTypeCounter = 26;
131  fRunTypeCounter = new Int_t[fMaxRunTypeCounter];
132  for (Int_t i = 0; i < fMaxRunTypeCounter; i++) {
133  fRunTypeCounter[i] = 0;
134  }
135 
136  fMgpaGainCounter = nullptr;
137  fMaxMgpaGainCounter = 4; // Because chozen gain = 0,1,2,3
139  for (Int_t i = 0; i < fMaxMgpaGainCounter; i++) {
140  fMgpaGainCounter[i] = 0;
141  }
142 
143  fFedIdCounter = nullptr;
144  fMaxFedIdCounter = 54;
145  fFedIdCounter = new Int_t[fMaxFedIdCounter];
146  for (Int_t i = 0; i < fMaxFedIdCounter; i++) {
147  fFedIdCounter[i] = 0;
148  }
149 
150  fEvtNumber = 0;
151  fEvtNumberMemo = -1;
152  fRecNumber = 0;
153 
154  fDeeDS5Memo1 = 0;
155  fDeeDS5Memo2 = 0;
156 
159 
160  fMemoCutOK = 0;
161  fTreatedFedOrder = 0;
162  fNbOfTreatedStexs = 0;
163 
164  //-------------- Fed
165  if (fStexName == "SM") {
167  } // EB: FED Unit = SM
168  if (fStexName == "Dee") {
170  } // EE: FED Unit = Data Sector
171 
172  fFedDigiOK = new Int_t[fMaxFedUnitCounter];
173  for (Int_t i = 0; i < fMaxFedUnitCounter; i++) {
174  fFedDigiOK[i] = 0;
175  }
176 
178  for (Int_t i = 0; i < fMaxFedUnitCounter; i++) {
180  }
181 
182  fFedStatus = new Int_t[fMaxFedUnitCounter];
183  for (Int_t i = 0; i < fMaxFedUnitCounter; i++) {
184  fFedStatus[i] = 0;
185  }
186 
187  fFedStatusOrder = new Int_t[fMaxFedUnitCounter];
188  for (Int_t i = 0; i < fMaxFedUnitCounter; i++) {
189  fFedStatusOrder[i] = 0;
190  }
191 
192  fDeeNumberString = new TString[fMaxFedUnitCounter];
193  for (Int_t i = 0; i < fMaxFedUnitCounter; i++) {
194  fDeeNumberString[i] = "SM";
195  }
196 
197  if (fStexName == "Dee") {
198  fDeeNumberString[0] = "Sector1 Dee4";
199  fDeeNumberString[1] = "Sector2 Dee4";
200  fDeeNumberString[2] = "Sector3 Dee4";
201  fDeeNumberString[3] = "Sector4 Dee4";
202  fDeeNumberString[4] = "Sector5 Dee4-Dee3";
203  fDeeNumberString[5] = "Sector6 Dee3";
204  fDeeNumberString[6] = "Sector7 Dee3";
205  fDeeNumberString[7] = "Sector8 Dee3";
206  fDeeNumberString[8] = "Sector9 Dee3";
207  fDeeNumberString[9] = "Sector1 Dee1";
208  fDeeNumberString[10] = "Sector2 Dee1";
209  fDeeNumberString[11] = "Sector3 Dee1";
210  fDeeNumberString[12] = "Sector4 Dee1";
211  fDeeNumberString[13] = "Sector5 Dee1-Dee2";
212  fDeeNumberString[14] = "Sector6 Dee2";
213  fDeeNumberString[15] = "Sector7 Dee2";
214  fDeeNumberString[16] = "Sector8 Dee2";
215  fDeeNumberString[17] = "Sector9 Dee2";
216  }
217  //............................... arrays fSMFromFedDcc and fESFromFedTcc
218  //
219  // FED-TCC: 1 2 3 4 5 6 7 8 9
220  // Dee: 3 3 3 4 4 4 4 4-3 3
221  // DS: 7 8 9 1 2 3 4 5 6
222  // ES: 7 8 9 1 2 3 4 5 6 (ES = DS)
223  //
224  // FED-TCC: 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
225  // 26 27
226  // SM: 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
227  // 35 36 SM: -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14
228  // -15 -16 -17 -18
229  //
230  // FED-TCC: 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
231  // 44 45
232  // SM: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
233  // 17 18
234  //
235  // FED-TCC: 46 47 48 49 50 51 52 53 54
236  // Dee: 2 2 2 1 1 1 1 1-2 2
237  // DS: 7 8 9 1 2 3 4 5 6
238  // ES: 16 17 18 10 11 12 13 14 15 (ES = DS + 9)
239 
240  Int_t MaxSMAndDS = fMyEBEcal->MaxSMInEB() + fMyEEEcal->MaxDSInEE();
241 
242  fSMFromFedTcc = new Int_t[MaxSMAndDS];
243  fESFromFedTcc = new Int_t[MaxSMAndDS];
244  for (Int_t nFedTcc = 1; nFedTcc <= MaxSMAndDS; nFedTcc++) {
245  fESFromFedTcc[nFedTcc - 1] = -1;
246  }
247 
248  for (Int_t nFedTcc = 1; nFedTcc <= 3; nFedTcc++) {
249  fESFromFedTcc[nFedTcc - 1] = nFedTcc + 6;
250  } // Dee3, ES 7,8,9
251  for (Int_t nFedTcc = 4; nFedTcc <= 9; nFedTcc++) {
252  fESFromFedTcc[nFedTcc - 1] = nFedTcc - 3;
253  } // Dee4, ES 1,2,3,4,5; Dee3, DS 5,6
254 
255  for (Int_t nFedTcc = 10; nFedTcc <= 27; nFedTcc++) {
256  fSMFromFedTcc[nFedTcc - 1] = nFedTcc + 9;
257  } // EB- SM 19 to 36
258  for (Int_t nFedTcc = 28; nFedTcc <= 45; nFedTcc++) {
259  fSMFromFedTcc[nFedTcc - 1] = nFedTcc - 27;
260  } // EB+ SM 1 to 18
261 
262  for (Int_t nFedTcc = 46; nFedTcc <= 48; nFedTcc++) {
263  fESFromFedTcc[nFedTcc - 1] = nFedTcc - 30;
264  } // Dee2, ES 16,17,18
265  for (Int_t nFedTcc = 49; nFedTcc <= 54; nFedTcc++) {
266  fESFromFedTcc[nFedTcc - 1] = nFedTcc - 39;
267  } // Dee1, ES 10,11,12,13,14; Dee2, ES 14,15
268 
269  //............................... Nb of treated events for "AdcPeg12" and
270  //"AdcSPeg12" analysis
271  //-------------- Stex
272  if (fStexName == "SM") {
274  } // EB: Stex = SM
275  if (fStexName == "Dee") {
277  } // EE: Stex = Dee
278 
280  for (Int_t i = 0; i < fMaxTreatedStexCounter; i++) {
282  }
283 
284  fTimeFirst = new time_t[fMaxTreatedStexCounter];
285  for (Int_t i = 0; i < fMaxTreatedStexCounter; i++) {
286  fTimeFirst[i] = 0;
287  }
288  fTimeLast = new time_t[fMaxTreatedStexCounter];
289  for (Int_t i = 0; i < fMaxTreatedStexCounter; i++) {
290  fTimeLast[i] = 0;
291  }
292 
294  ;
295  for (Int_t i = 0; i < fMaxTreatedStexCounter; i++) {
296  fMemoDateFirstEvent[i] = 0;
297  }
298 
299  Int_t MaxCar = fgMaxCar;
300  fDateFirst = new TString[fMaxTreatedStexCounter];
301  for (Int_t i = 0; i < fMaxTreatedStexCounter; i++) {
302  fDateFirst[i].Resize(MaxCar);
303  fDateFirst[i] = "*1st event date not found*";
304  }
305 
306  MaxCar = fgMaxCar;
307  fDateLast = new TString[fMaxTreatedStexCounter];
308  for (Int_t i = 0; i < fMaxTreatedStexCounter; i++) {
309  fDateLast[i].Resize(MaxCar);
310  fDateLast[i] = "*last event date not found*";
311  }
312 
313  fStexStatus = new Int_t[fMaxTreatedStexCounter];
314  for (Int_t i = 0; i < fMaxTreatedStexCounter; i++) {
315  fStexStatus[i] = 0;
316  }
317 
318  fStexDigiOK = new Int_t[fMaxTreatedStexCounter];
319  for (Int_t i = 0; i < fMaxTreatedStexCounter; i++) {
320  fStexDigiOK[i] = 0;
321  }
322 
324  for (Int_t i = 0; i < fMaxTreatedStexCounter; i++) {
326  }
327 
329  for (Int_t i = 0; i < fMaxTreatedStexCounter; i++) {
331  }
332 
333  //.......................... counters of events for GetSampleAdcValues
334  fBuildEventDistribBad = nullptr;
336  for (Int_t i = 0; i < fMaxTreatedStexCounter; i++) {
338  }
339 
340  fBuildEventDistribGood = nullptr;
342  for (Int_t i = 0; i < fMaxTreatedStexCounter; i++) {
344  }
345 
346  //----------------------------------- Analysis name codes
347  //------------------------------------------
348  //
349  // AnalysisName RunType Gain DBLS (Dynamic
350  // BaseLine Substraction)
351  //
352  // AdcAny any run type 0 no
353  //
354  // AdcPed1 fPEDESTAL_STD 3 No
355  // AdcPed6 fPEDESTAL_STD 2 No
356  // AdcPed12 fPEDESTAL_STD 1 No
357  //
358  // AdcPeg12 fPEDESTAL_GAP 1 No
359  //
360  // AdcLaser fLASER_STD 0 No
361  // AdcPes12 fPEDSIM 0 No
362  //
363  // AdcPhys fPHYSICS_GLOBAL 0 No
364  //
365  //
366  // AdcSPed1 fPEDESTAL_STD 3 Yes
367  // AdcSPed6 fPEDESTAL_STD 2 Yes
368  // AdcSPed12 fPEDESTAL_STD 1 Yes
369  //
370  // AdcSPeg12 fPEDESTAL_GAP 1 Yes
371  //
372  // AdcSLaser fLASER_STD 0 Yes
373  // AdcSPes12 fPEDSIM 0 Yes
374  //
375  //--------------------------------------------------------------------------------------------------
376 
377  //................ Run type list
378 
379  fLASER_STD = 4;
380  fPEDESTAL_STD = 9;
381  fPHYSICS_GLOBAL = 13;
382  fPEDESTAL_GAP = 18;
383  fPEDSIM = 24;
384 
385  fANY_RUN = 25;
386 
387  //................ Chozen run type from analysis name
388  fChozenRunTypeNumber = fANY_RUN; // default
389  if (fAnalysisName == "AdcAny") {
391  }
392  if (fAnalysisName == "AdcPed1" || fAnalysisName == "AdcPed6" || fAnalysisName == "AdcPed12" ||
393  fAnalysisName == "AdcSPed1" || fAnalysisName == "AdcSPed6" || fAnalysisName == "AdcSPed12") {
395  }
396  if (fAnalysisName == "AdcPeg12" || fAnalysisName == "AdcSPeg12") {
398  }
399  if (fAnalysisName == "AdcLaser" || fAnalysisName == "AdcSLaser") {
401  }
402  if (fAnalysisName == "AdcPhys") {
404  }
405  if (fAnalysisName == "AdcPes12 " || fAnalysisName == "AdcSPes12 ") {
407  }
408 
409  //................ Gains from analysis name
410  fChozenGainNumber = 0; // default => event always accepted if fChozenGainNumber = 0 ( see
411  // USER's Analysis cut in ::analyze(...) )
412  if (fAnalysisName == "AdcAny") {
413  fChozenGainNumber = 0;
414  }
415  if (fAnalysisName == "AdcPed1" || fAnalysisName == "AdcSPed1") {
416  fChozenGainNumber = 3;
417  }
418  if (fAnalysisName == "AdcPed6" || fAnalysisName == "AdcSPed6") {
419  fChozenGainNumber = 2;
420  }
421  if (fAnalysisName == "AdcPed12" || fAnalysisName == "AdcSPed12") {
422  fChozenGainNumber = 1;
423  }
424  if (fAnalysisName == "AdcPeg12" || fAnalysisName == "AdcSPeg12") {
425  fChozenGainNumber = 0;
426  }
427  if (fAnalysisName == "AdcLaser" || fAnalysisName == "AdcSLaser") {
428  fChozenGainNumber = 0;
429  }
430  if (fAnalysisName == "AdcPes12 " || fAnalysisName == "AdcSPes12 ") {
431  fChozenGainNumber = 0;
432  }
433  if (fAnalysisName == "AdcPhys") {
434  fChozenGainNumber = 0;
435  }
436 
437  //............... Flag for Dynamic BaseLine Substraction from analysis name
438  fDynBaseLineSub = "no"; // default
439  if (fAnalysisName == "AdcAny" || fAnalysisName == "AdcPed1" || fAnalysisName == "AdcPed6" ||
440  fAnalysisName == "AdcPed12" || fAnalysisName == "AdcPeg12" || fAnalysisName == "AdcLaser" ||
441  fAnalysisName == "AdcPhys" || fAnalysisName == "AdcPes12 ") {
442  fDynBaseLineSub = "no";
443  }
444  if (fAnalysisName == "AdcSPed1" || fAnalysisName == "AdcSPed6" || fAnalysisName == "AdcSPed12" ||
445  fAnalysisName == "AdcSPeg12" || fAnalysisName == "AdcSLaser" || fAnalysisName == "AdcSPes12 ") {
446  fDynBaseLineSub = "yes";
447  }
448 
449  //....................... Index range for ECNA init and for loop on
450  // GetSampleAdcValues calls
451  if (fStexNumber == 0) {
452  if (fStexName == "SM") {
453  fSMIndexBegin = 0;
457  fDeeIndexBegin = 0;
458  fDeeIndexStop = 0;
459  }
460  if (fStexName == "Dee") {
461  fSMIndexBegin = 0;
462  fSMIndexStop = 0;
463  fDeeIndexBegin = 0;
467  }
468  } else {
469  if (fStexName == "SM") {
474  fDeeIndexBegin = 0;
475  fDeeIndexStop = 0;
476  }
477  if (fStexName == "Dee") {
478  fSMIndexBegin = 0;
479  fSMIndexStop = 0;
484  }
485  }
486 
487  //......... DATA DEPENDENT PARAMETERS
488  fRunNumber = 0;
489 
490  fMyCnaEBSM = nullptr;
491  fMyCnaEEDee = nullptr;
492 
493  fRunTypeNumber = -1;
494  fMgpaGainNumber = -1;
495 
496  fFedId = -1;
497  fFedTcc = -1;
498 
499  std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fAnalysisName = " << fAnalysisName << std::endl;
500  std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fNbOfSamples = " << fNbOfSamples << std::endl;
501  std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fFirstReqEvent = " << fFirstReqEvent << std::endl;
502  std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fLastReqEvent = " << fLastReqEvent << std::endl;
503  std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fReqNbOfEvts = " << fReqNbOfEvts << std::endl;
504  std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fStexName = " << fStexName << std::endl;
505  std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fStexNumber = " << fStexNumber << std::endl;
506  std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fChozenRunTypeNumber = " << fChozenRunTypeNumber << std::endl;
507  std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fChozenGainNumber = " << fChozenGainNumber << std::endl
508  << std::endl;
509 
510  std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> Init done. " << std::endl;
511 }
512 // end of constructor
513 
515  // do anything here that needs to be done at destruction time
516  // (e.g. close files, deallocate resources etc.)
517 
518  using namespace std;
519  //..................................... format numerical values
520  std::cout << std::setiosflags(std::ios::showpoint | std::ios::uppercase);
521  std::cout << std::setprecision(3) << std::setw(6);
522  cout.setf(std::ios::dec, std::ios::basefield);
523  cout.setf(std::ios::fixed, std::ios::floatfield);
524  cout.setf(std::ios::left, std::ios::adjustfield);
525  cout.setf(std::ios::right, std::ios::adjustfield);
526 
527  std::cout << "EcnaAnalyzer::~EcnaAnalyzer()> destructor is going to be executed." << std::endl;
528 
529  if (fOutcomeError == kTRUE)
530  return;
531 
532  //-------------------------------------------------------------------------------
533 
534  //....................................................... EB (SM)
535  if (fMyCnaEBSM == nullptr && fStexName == "SM") {
536  std::cout << std::endl
537  << "!EcnaAnalyzer-destructor> **** ERROR **** fMyCnaEBSM = " << fMyCnaEBSM
538  << ". !===> ECNA HAS NOT BEEN INITIALIZED." << std::endl
539  << " Last event run type = " << runtype(fRunTypeNumber) << ", fRunTypeNumber = " << fRunTypeNumber
540  << ", last event Mgpa gain = " << gainvalue(fMgpaGainNumber) << ", fMgpaGainNumber = " << fMgpaGainNumber
541  << ", last event fFedId(+601) = " << fFedId + 601 << std::endl
542  << std::endl;
543  } else {
544  for (Int_t iSM = fSMIndexBegin; iSM < fSMIndexStop; iSM++) {
545  if (fMyCnaEBSM[iSM] != nullptr) {
546  //........................................ register dates 1 and 2
547  fMyCnaEBSM[iSM]->StartStopDate(fDateFirst[iSM], fDateLast[iSM]);
548  fMyCnaEBSM[iSM]->StartStopTime(fTimeFirst[iSM], fTimeLast[iSM]);
549 
550  //........................................ Init .root file
552  fMyCnaEBSM[iSM]->SampleValues();
553 
554  //........................................ write the sample values in
555  //.root file
556  if (fMyCnaEBSM[iSM]->WriteRootFile() == kFALSE) {
557  std::cout << "!EcnaAnalyzer-destructor> PROBLEM with write ROOT file for SM" << iSM + 1 << fTTBELL
558  << std::endl;
559  }
560  } else {
561  std::cout << "*EcnaAnalyzer-destructor> Calculations and writing on "
562  "file already done for SM "
563  << iSM + 1 << std::endl;
564  }
565  }
566  delete fMyCnaEBSM;
567  }
568  //....................................................... EE (Dee)
569 
570  if (fMyCnaEEDee == nullptr && fStexName == "Dee") {
571  std::cout << std::endl
572  << "!EcnaAnalyzer-destructor> **** ERROR **** fMyCnaEEDee = " << fMyCnaEEDee
573  << ". !===> ECNA HAS NOT BEEN INITIALIZED." << std::endl
574  << " Last event run type = " << runtype(fRunTypeNumber) << ", fRunTypeNumber = " << fRunTypeNumber
575  << ", last event Mgpa gain = " << gainvalue(fMgpaGainNumber) << ", fMgpaGainNumber = " << fMgpaGainNumber
576  << ", last event fFedId(+601) = " << fFedId + 601 << std::endl
577  << std::endl;
578  } else {
579  for (Int_t iDee = fDeeIndexBegin; iDee < fDeeIndexStop; iDee++) {
580  if (fMyCnaEEDee[iDee] != nullptr) {
581  //........................................ register dates 1 and 2
582  fMyCnaEEDee[iDee]->StartStopDate(fDateFirst[iDee], fDateLast[iDee]);
583  fMyCnaEEDee[iDee]->StartStopTime(fTimeFirst[iDee], fTimeLast[iDee]);
584 
585  //........................................ Init .root file
587  fMyCnaEEDee[iDee]->SampleValues();
588 
589  //........................................ write the sample values in
590  //.root file
591  if (fMyCnaEEDee[iDee]->WriteRootFile() == kFALSE) {
592  std::cout << "!EcnaAnalyzer-destructor> PROBLEM with write ROOT file "
593  "for Dee"
594  << iDee + 1 << fTTBELL << std::endl;
595  }
596  } else {
597  std::cout << "*EcnaAnalyzer-destructor> Calculations and writing on "
598  "file already done for Dee "
599  << iDee + 1 << std::endl;
600  }
601  }
602  delete fMyCnaEEDee;
603  }
604  std::cout << endl;
605 
606  //-----------------------------------------------------------------------------------
607 
608  std::cout << "*EcnaAnalyzer-destructor> Status of events returned by "
609  "GetSampleAdcValues(): "
610  << std::endl;
611 
612  for (Int_t i0Stex = fStexIndexBegin; i0Stex < fStexIndexStop; i0Stex++) {
613  std::cout << fStexName << i0Stex + 1 << "> Status OK: " << fBuildEventDistribGood[i0Stex]
614  << " / ERROR(S): " << fBuildEventDistribBad[i0Stex];
615  if (fBuildEventDistribBad[i0Stex] > 0) {
616  std::cout << " <=== SHOULD BE EQUAL TO ZERO ! " << fTTBELL;
617  }
618  std::cout << std::endl;
619  }
620 
621  std::cout << std::endl << "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
622 
623  std::cout << "*EcnaAnalyzer-destructor> Run types seen in event headers "
624  "before selection:"
625  << std::endl;
626 
627  for (Int_t i = 0; i < fMaxRunTypeCounter; i++) {
628  std::cout << " => " << std::setw(10) << fRunTypeCounter[i] << " event header(s) with run type " << runtype(i)
629  << std::endl;
630  }
631 
632  std::cout << std::endl << "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
633 
634  std::cout << "*EcnaAnalyzer-destructor> Mgpa gains seen in event headers "
635  "before selection:"
636  << std::endl;
637 
638  for (Int_t i = 0; i < fMaxMgpaGainCounter; i++) {
639  std::cout << " => " << std::setw(10) << fMgpaGainCounter[i] << " event header(s) with gain " << gainvalue(i)
640  << std::endl;
641  }
642 
643  std::cout << std::endl << "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
644 
645  std::cout << "*EcnaAnalyzer-destructor> Numbers of selected events for each FED:" << std::endl;
646 
647  for (Int_t i = 0; i < fMaxFedIdCounter; i++) {
648  std::cout << " => FedId " << i + 601 << ": " << std::setw(10) << fFedIdCounter[i] << " events" << std::endl;
649  }
650 
651  std::cout << std::endl << "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
652 
653  if (fStexNumber == 0) {
654  // std::cout << "*EcnaAnalyzer-destructor> fDateFirst = " << fDateFirst[0]
655  // << std::endl
656  // << " fDateLast = " <<
657  // fDateLast[fMaxTreatedStexCounter-1] << std::endl << std::endl;
658  }
659  if (fStexNumber > 0) {
660  std::cout << "*EcnaAnalyzer-destructor> fDateFirst = " << fDateFirst[fStexNumber - 1] << std::endl
661  << " fDateLast = " << fDateLast[fStexNumber - 1] << std::endl
662  << std::endl;
663  }
664 
665  std::cout << std::endl << "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
666 
667  Int_t n0 = 0;
668  CheckMsg(n0);
669 
670  delete fMyEBNumbering;
671  delete fMyEENumbering;
672 
673  delete fMyEBEcal;
674  delete fMyEEEcal;
675 
676  std::cout << "*EcnaAnalyzer-destructor> End of execution." << std::endl;
677 }
678 // end of destructor
679 
680 //
681 // member functions
682 //
683 
684 // ------------ method called to produce the data ------------
686  using namespace std;
687  //..................................... format numerical values
688  std::cout << std::setiosflags(std::ios::showpoint | std::ios::uppercase);
689  std::cout << std::setprecision(3) << std::setw(6);
690  cout.setf(std::ios::dec, std::ios::basefield);
691  cout.setf(std::ios::fixed, std::ios::floatfield);
692  cout.setf(std::ios::left, std::ios::adjustfield);
693  cout.setf(std::ios::right, std::ios::adjustfield);
694 
695  using namespace edm;
696 
697  fRecNumber++;
698 
699  Int_t iFreq = (fLastReqEvent - fFirstReqEvent + 1) / 5;
700  if (iFreq <= 0) {
701  iFreq = 10000;
702  }
703 
704  Int_t MaxSMAndDS = fMyEBEcal->MaxSMInEB() + fMyEEEcal->MaxDSInEE();
705 
706  //********************************************* EVENT TREATMENT
707  //********************************
708  Handle<EcalRawDataCollection> pEventHeader;
709  const EcalRawDataCollection *myEventHeader = nullptr;
710  try {
711  iEvent.getByLabel(eventHeaderProducer_, eventHeaderCollection_, pEventHeader);
712  myEventHeader = pEventHeader.product();
713  } catch (std::exception &ex) {
714  std::cerr << "Error! can't get the product " << eventHeaderCollection_.c_str() << std::endl;
715  }
716  //........... Decode myEventHeader infos
717  for (EcalRawDataCollection::const_iterator headerItr = myEventHeader->begin(); headerItr != myEventHeader->end();
718  ++headerItr) {
719  //===> fRunNumber, fRunTypeNumber, fMgpaGainNumber, fFedId, fEvtNumber
720  // will be used in AnalysisOutcome(...) below
721  fRunNumber = (Int_t)headerItr->getRunNumber();
722  if (fRunNumber <= 0) {
723  fRunNumber = (Int_t)iEvent.id().run();
724  }
725  fRunTypeNumber = (Int_t)headerItr->getRunType();
726  fMgpaGainNumber = (Int_t)headerItr->getMgpaGain();
727  fFedId = (Int_t)headerItr->fedId() - 601; // 1st Fed = 601, FedId = Fed number - 1
728  fEvtNumber = (Int_t)headerItr->getLV1();
729  if (fEvtNumber <= 0) {
730  fEvtNumber = (Int_t)iEvent.id().event();
731  }
732 
733  if (fEvtNumber != fEvtNumberMemo) {
735 
736  //============================================
737  // cmsRun INTERRUPTION if analysis complete
738  // or if fCurrentEventNumber >= LastReqEvent
739  //============================================
740  if (AnalysisOutcome("EVT") == kTRUE) {
741  return;
742  }
743 
744  // no interruption => event has to be analyzed
745 
747 
748  if (fRecNumber == 1 || fRecNumber == 50 || fRecNumber == 100 || fRecNumber == 500 || fRecNumber == 1000 ||
749  fRecNumber % iFreq == 0) {
750  Int_t n1 = 1;
751  CheckMsg(n1);
752  }
753 
755  return; // skip events before fFirstReqEvent
756  }
757 
758  //.................. Increment Run type and MgpaGain counters
761  }
764  }
765 
766  //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User's analysis cut
767  //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
768 
771  return;
772 
773  //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
774 
775  if (fMemoCutOK == 0) {
776  fMemoCutOK = 1;
777  }
778 
779  //---- Accelerating selection with "FED-TCC" number [ from
780  // headerItr->getDccInTCCCommand() ]
781  // Arrays fSMFromFedTcc[] and fESFromFedTcc[] are initialised in Init()
782 
783  if (fAnalysisName == "AdcPeg12" || fAnalysisName == "AdcSPeg12" || fAnalysisName == "AdcPhys" ||
784  fAnalysisName == "AdcAny") {
785  fFedTcc = (Int_t)headerItr->getDccInTCCCommand();
786 
787  if (fFedTcc >= 1 && fFedTcc <= MaxSMAndDS) {
788  if (fStexName == "SM") {
789  if (fFedTcc < 10 || fFedTcc > 45)
790  return;
791 
792  if (fSMFromFedTcc[fFedTcc - 1] >= 1 && fSMFromFedTcc[fFedTcc - 1] <= fMyEBEcal->MaxSMInEB() &&
794  return;
795  }
796 
797  if (fStexName == "Dee") {
798  if (fFedTcc >= 10 && fFedTcc <= 45)
799  return;
800 
801  if (fESFromFedTcc[fFedTcc - 1] >= 1 && fESFromFedTcc[fFedTcc - 1] <= fMyEEEcal->MaxDSInEE() &&
803  return;
804  }
805  } // end of if( fFedTcc >= 1 && fFedTcc <= MaxSMAndDS )
806  } // end of if( fAnalysisName == "AdcPeg12" || fAnalysisName == "AdcSPeg12"
807  // ...)
808 
809  //.................. Increment FedId counters
810  if (fFedId >= 0 && fFedId < fMaxFedIdCounter) {
812  }
813 
814  } // end of for(EcalRawDataCollection::const_iterator
815  // headerItr=myEventHeader->begin(); headerItr !=
816  // myEventHeader->end();++headerItr)
817 
818  if (fMemoCutOK == 0)
819  return; // return if no event passed the user's analysis cut
820 
821  //========================== SELECTED EVENTS ================================
823  if (fNbOfSelectedEvents == 1) {
824  Int_t n2 = 2;
825  CheckMsg(n2);
826  }
827 
828  //============================ Ecna init for the pointers array
829  //=================================
830  //.................................................................. EB (SM)
831  if (fMyCnaEBSM == nullptr && fStexName == "SM") {
833  for (Int_t i0SM = 0; i0SM < fMyEBEcal->MaxSMInEB(); i0SM++) {
834  fMyCnaEBSM[i0SM] = nullptr;
835  }
836  }
837  //.................................................................. EE (Dee)
838  if (fMyCnaEEDee == nullptr && fStexName == "Dee") {
840  for (Int_t iDee = 0; iDee < fMyEEEcal->MaxDeeInEE(); iDee++) {
841  fMyCnaEEDee[iDee] = nullptr;
842  }
843  }
844 
845  //============================ EVENT TREATMENT ==============================
846  Int_t MaxNbOfStex = 0;
847  if (fStexName == "SM") {
848  MaxNbOfStex = fMyEBEcal->MaxSMInEB();
849  }
850  if (fStexName == "Dee") {
851  MaxNbOfStex = fMyEEEcal->MaxDeeInEE();
852  }
853 
854  if ((fStexNumber > 0 && fNbOfTreatedStexs == 0) || (fStexNumber == 0 && fNbOfTreatedStexs < MaxNbOfStex)) {
855  //================================================================= Record
856  // type EB (SM)
857  if (fStexName == "SM" && fSMIndexBegin < fSMIndexStop) {
858  //......................................... Get digisEB
859  Handle<EBDigiCollection> pdigisEB;
860  const EBDigiCollection *digisEB = nullptr;
861  try {
862  iEvent.getByLabel(digiProducer_, EBdigiCollection_, pdigisEB);
863  digisEB = pdigisEB.product();
864  } catch (std::exception &ex) {
865  std::cerr << "Error! can't get the product " << EBdigiCollection_.c_str() << std::endl;
866  }
867 
868  // Initialize vectors if not already done
869  if (int(digisEB->size()) > nChannels_) {
870  nChannels_ = digisEB->size();
871  }
872 
873  // Int_t print_count = 0;
874  if (Int_t(digisEB->end() - digisEB->begin()) >= 0 &&
875  Int_t(digisEB->end() - digisEB->begin()) <= Int_t(digisEB->size())) {
876  //..........................................EB
877  //===============================================================================
878  //
879  // Loop over Ecal barrel digisEB (Xtals)
880  //
881  //===============================================================================
882 
883  for (EBDigiCollection::const_iterator digiItr = digisEB->begin(); digiItr != digisEB->end(); ++digiItr) {
884  EBDetId id_crystal(digiItr->id());
885  // Int_t HashedIndex = id_crystal.hashedIndex();
886 
887  Int_t i0SM = id_crystal.ism() - 1; // <============== GET the SM number - 1 here
888 
889  if (i0SM >= 0 && i0SM < fMaxTreatedStexCounter) {
890  if (fMyCnaEBSM[i0SM] == nullptr && fStexStatus[i0SM] != 2) {
891  //=============================== Init Ecna EB
892  //===============================
896 
897  std::cout << "*EcnaAnalyzer::analyze(...)> ********* INIT ECNA "
898  "EB ********* "
899  << std::endl
900  << " fAnalysisName = " << fAnalysisName << std::endl
901  << " fRunNumber = " << fRunNumber << std::endl
902  << " fFirstReqEvent = " << fFirstReqEvent << std::endl
903  << " fLastReqEvent = " << fLastReqEvent << std::endl
904  << " fReqNbOfEvts = " << fReqNbOfEvts << std::endl
905  << " SM = " << i0SM + 1 << std::endl
906  << " run type = " << runtype(fRunTypeNumber)
907  << std::endl;
908  //============================================================================
909  }
910 
911  if (fStexStatus[i0SM] < 2) // nothing to do if status=2 reached
912  {
913  fStexDigiOK[i0SM]++;
914  if (fStexDigiOK[i0SM] == 1) {
915  fStexNbOfTreatedEvents[i0SM]++;
916  }
917 
918  if (fStexNbOfTreatedEvents[i0SM] >= 1 && fStexNbOfTreatedEvents[i0SM] <= fReqNbOfEvts) {
919  //......................................... date of first event
920  //(in real time)
921  edm::Timestamp Time = iEvent.time();
922  edm::TimeValue_t t_current_ev_time = (cond::Time_t)Time.value();
923  time_t i_current_ev_time = (time_t)(t_current_ev_time >> 32);
924  const time_t *p_current_ev_time = &i_current_ev_time;
925  char *astime = ctime(p_current_ev_time);
926 
927  if (fStexDigiOK[i0SM] == 1 && fStexNbOfTreatedEvents[i0SM] == 1 &&
928  (fStexNumber == 0 || i0SM + 1 == fStexNumber)) {
929  fTimeFirst[i0SM] = i_current_ev_time;
930  fDateFirst[i0SM] = astime;
931  fTimeLast[i0SM] = i_current_ev_time;
932  fDateLast[i0SM] = astime;
933  std::cout << "*----> beginning of analysis for " << fStexName << i0SM + 1
934  << ". First analyzed event date : " << astime << std::endl;
935  // << " t_current_ev_time = " << t_current_ev_time <<
936  // std::endl
937  // << " i_current_ev_time = " << i_current_ev_time <<
938  // std::endl
939  // << " p_current_ev_time = " << p_current_ev_time <<
940  // std::endl
941  }
942 
943  if (i_current_ev_time < fTimeFirst[i0SM]) {
944  fTimeFirst[i0SM] = i_current_ev_time;
945  fDateFirst[i0SM] = astime;
946  }
947  if (i_current_ev_time > fTimeLast[i0SM]) {
948  fTimeLast[i0SM] = i_current_ev_time;
949  fDateLast[i0SM] = astime;
950  }
951 
952  //=============================================> CUT on i0SM
953  // value
954  if ((fStexNumber > 0 && i0SM == fStexNumber - 1) || (fStexNumber == 0)) {
955  Int_t iEta = id_crystal.ietaSM(); // ietaSM() : range = [1,85]
956  Int_t iPhi = id_crystal.iphiSM(); // iphiSM() : range = [1,20]
957 
958  Int_t n1SMCrys = (iEta - 1) * (fMyEBEcal->MaxTowPhiInSM() * fMyEBEcal->MaxCrysPhiInTow()) +
959  iPhi; // range = [1,1700]
960  Int_t n1SMTow = fMyEBNumbering->Get1SMTowFrom1SMCrys(n1SMCrys); // range = [1,68]
961  Int_t i0TowEcha = fMyEBNumbering->Get0TowEchaFrom1SMCrys(n1SMCrys); // range = [0,24]
962 
963  Int_t NbOfSamplesFromDigis = digiItr->size();
964 
965  EBDataFrame df(*digiItr);
966 
967  if (NbOfSamplesFromDigis > 0 && NbOfSamplesFromDigis <= fMyEBEcal->MaxSampADC()) {
968  Double_t adcDBLS = (Double_t)0;
969  // Three 1st samples mean value for Dynamic Base Line
970  // Substraction (DBLS)
971  if (fDynBaseLineSub == "yes") {
972  for (Int_t i0Sample = 0; i0Sample < 3; i0Sample++) {
973  adcDBLS += (Double_t)(df.sample(i0Sample).adc());
974  }
975  adcDBLS /= (Double_t)3;
976  }
977  // Loop over the samples
978  for (Int_t i0Sample = 0; i0Sample < fNbOfSamples; i0Sample++) {
979  Double_t adc = (Double_t)(df.sample(i0Sample).adc()) - adcDBLS;
980  //................................................. Calls
981  // to GetSampleAdcValues
982  if (fMyCnaEBSM[i0SM]->GetSampleAdcValues(
983  fStexNbOfTreatedEvents[i0SM], n1SMTow, i0TowEcha, i0Sample, adc) == kTRUE) {
984  fBuildEventDistribGood[i0SM]++;
985  } else {
986  fBuildEventDistribBad[i0SM]++;
987  }
988  }
989  } else {
990  std::cout << "EcnaAnalyzer::analyze(...)> "
991  "NbOfSamplesFromDigis out of bounds = "
992  << NbOfSamplesFromDigis << std::endl;
993  }
994  } // end of if( (fStexNumber > 0 && i0SM == fStexNumber-1) ||
995  // (fStexNumber == 0) )
996  } // end of if( fStexNbOfTreatedEvents[i0SM] >= 1 &&
997  // fStexNbOfTreatedEvents[i0SM] <= fReqNbOfEvts )
998  } // end of if( fStexStatus[i0SM] < 2 )
999  } // end of if( i0SM >= 0 && i0SM<fMaxTreatedStexCounter )
1000  } // end of for (EBDigiCollection::const_iterator digiItr =
1001  // digisEB->begin();
1002  // digiItr != digisEB->end(); ++digiItr)
1003 
1004  for (Int_t i0SM = 0; i0SM < fMaxTreatedStexCounter; i0SM++) {
1005  fStexDigiOK[i0SM] = 0; // reset fStexDigiOK[i0SM] after loop on digis
1006  }
1007 
1008  } // end of if( Int_t(digisEB->end()-digisEB->begin()) >= 0 &&
1009  // Int_t(digisEB->end()-digisEB->begin()) <= Int_t(digisEB->size()) )
1010  } // end of if( fStexName == "SM" && fSMIndexBegin < fSMIndexStop )
1011 
1012  //=============================================================== Record
1013  // type EE (Dee)
1014  if (fStexName == "Dee" && fDeeIndexBegin < fDeeIndexStop) {
1015  //......................................... Get digisEE
1016  Handle<EEDigiCollection> pdigisEE;
1017  const EEDigiCollection *digisEE = nullptr;
1018  try {
1019  iEvent.getByLabel(digiProducer_, EEdigiCollection_, pdigisEE);
1020  digisEE = pdigisEE.product();
1021  } catch (std::exception &ex) {
1022  std::cerr << "Error! can't get the product " << EEdigiCollection_.c_str() << std::endl;
1023  }
1024 
1025  // Initialize vectors if not already done
1026  if (int(digisEE->size()) > nChannels_) {
1027  nChannels_ = digisEE->size();
1028  }
1029 
1030  // Int_t print_count = 0;
1031  if (Int_t(digisEE->end() - digisEE->begin()) >= 0 &&
1032  Int_t(digisEE->end() - digisEE->begin()) <= Int_t(digisEE->size())) {
1033  //======================================================================================
1034  //
1035  // Loop over Ecal endcap digisEE (Xtals)
1036  //
1037  //======================================================================================
1038 
1039  for (EEDigiCollection::const_iterator digiItr = digisEE->begin(); digiItr != digisEE->end(); ++digiItr) {
1040  EEDetId id_crystal(digiItr->id());
1041 
1042  Int_t iX_data = id_crystal.ix(); // iX_data : range = [1,100]
1043  Int_t iY_data = id_crystal.iy(); // iY_data : range = [1,100]
1044  Int_t i_quad = id_crystal.iquadrant(); // iquadrant() : range = [1,4]
1045  Int_t i_sgnZ = id_crystal.zside(); // zside() : values = -1,+1
1046 
1047  Int_t iX = iX_data;
1048  Int_t iY = iY_data; // iY : range = [1,100]
1049 
1050  //.......... See
1051  // CMSSW/DataFormats/EcalDetId/src/EEDetId.cc::ixQuadrantOne() [ in
1052  // which ix() = iX_data ]
1053  if (i_quad == 1 || i_quad == 4) {
1054  iX = iX_data - 50;
1055  } // iX_data : range = [51,100], iX : range = [1,50]
1056  if (i_quad == 3 || i_quad == 2) {
1057  iX = 51 - iX_data;
1058  } // iX_data : range = [50,1], iX : range = [1,50]
1059 
1060  Int_t n1DeeCrys =
1061  (iX - 1) * (fMyEEEcal->MaxSCIYInDee() * fMyEEEcal->MaxCrysIYInSC()) + iY; // n1DeeCrys: range = [1,5000]
1062 
1063  Int_t n1DeeNumber = 0;
1064  if (i_quad == 1 && i_sgnZ == 1) {
1065  n1DeeNumber = 2;
1066  }
1067  if (i_quad == 1 && i_sgnZ == -1) {
1068  n1DeeNumber = 3;
1069  }
1070  if (i_quad == 2 && i_sgnZ == 1) {
1071  n1DeeNumber = 1;
1072  }
1073  if (i_quad == 2 && i_sgnZ == -1) {
1074  n1DeeNumber = 4;
1075  }
1076  if (i_quad == 3 && i_sgnZ == 1) {
1077  n1DeeNumber = 1;
1078  }
1079  if (i_quad == 3 && i_sgnZ == -1) {
1080  n1DeeNumber = 4;
1081  }
1082  if (i_quad == 4 && i_sgnZ == 1) {
1083  n1DeeNumber = 2;
1084  }
1085  if (i_quad == 4 && i_sgnZ == -1) {
1086  n1DeeNumber = 3;
1087  }
1088 
1089  Int_t i0Dee = n1DeeNumber - 1; // <============== GET the Dee number - 1 here
1090 
1091  if (i0Dee >= 0 && i0Dee < fMaxTreatedStexCounter) {
1092  if (fMyCnaEEDee[i0Dee] == nullptr && fStexStatus[i0Dee] != 2) {
1093  //=============================== Init Ecna EE
1094  //===============================
1098 
1099  std::cout << "*EcnaAnalyzer::analyze(...)> ********* INIT ECNA "
1100  "EE ********* "
1101  << std::endl
1102  << " fAnalysisName = " << fAnalysisName << std::endl
1103  << " fRunNumber = " << fRunNumber << std::endl
1104  << " fFirstReqEvent = " << fFirstReqEvent << std::endl
1105  << " fLastReqEvent = " << fLastReqEvent << std::endl
1106  << " fReqNbOfEvts = " << fReqNbOfEvts << std::endl
1107  << " Dee = " << i0Dee + 1 << std::endl
1108  << " run type = " << runtype(fRunTypeNumber)
1109  << std::endl;
1110  //============================================================================
1111  }
1112 
1113  if (fStexStatus[i0Dee] < 2) // nothing to do if status=2 reached
1114  {
1115  Bool_t cOKForTreatment = kFALSE;
1116 
1117  if (fAnalysisName == "AdcPeg12" || fAnalysisName == "AdcSPeg12" || fAnalysisName == "AdcPhys" ||
1118  fAnalysisName == "AdcAny") {
1119  if (fFedTcc >= 1 && fFedTcc <= MaxSMAndDS) {
1120  fFedDigiOK[fESFromFedTcc[fFedTcc - 1] - 1]++;
1121 
1122  if (!(fESFromFedTcc[fFedTcc - 1] == 5 || fESFromFedTcc[fFedTcc - 1] == 14)) {
1123  if (fFedDigiOK[fESFromFedTcc[fFedTcc - 1] - 1] == 1) {
1125  }
1126  if (fFedNbOfTreatedEvents[fESFromFedTcc[fFedTcc - 1] - 1] >= 1 &&
1129  cOKForTreatment = kTRUE;
1130  }
1131  }
1132  if (fESFromFedTcc[fFedTcc - 1] == 5 || fESFromFedTcc[fFedTcc - 1] == 14) {
1133  if (fFedDigiOK[fESFromFedTcc[fFedTcc - 1] - 1] == 1) {
1135  fDeeDS5Memo1 = n1DeeNumber;
1137  } else {
1138  if (fDeeDS5Memo2 == 0) {
1139  if (n1DeeNumber != fDeeDS5Memo1) {
1140  // change of Dee in Data sector 5
1141  fDeeDS5Memo2 = n1DeeNumber;
1143  }
1144  }
1145  }
1146  if (fFedNbOfTreatedEvents[fESFromFedTcc[fFedTcc - 1] - 1] >= 1 &&
1148  cOKForTreatment = kTRUE;
1149  }
1150  }
1151  } // end of if( fFedTcc >= 1 && fFedTcc <= MaxSMAndDS )
1152  } // end of if( fAnalysisName == "AdcPeg12" || fAnalysisName ==
1153  // "AdcSPeg12" .... )
1154  else {
1155  fStexDigiOK[i0Dee]++;
1156  if (fStexDigiOK[i0Dee] == 1) {
1157  fStexNbOfTreatedEvents[i0Dee]++;
1158  }
1159  if (fStexNbOfTreatedEvents[i0Dee] >= 1 && fStexNbOfTreatedEvents[i0Dee] <= fReqNbOfEvts) {
1160  cOKForTreatment = kTRUE;
1161  }
1162  }
1163 
1164  if (cOKForTreatment == kTRUE) {
1165  //......................................... date of first event
1166  //(in real time)
1167  edm::Timestamp Time = iEvent.time();
1168  edm::TimeValue_t t_current_ev_time = (cond::Time_t)Time.value();
1169  time_t i_current_ev_time = (time_t)(t_current_ev_time >> 32);
1170  const time_t *p_current_ev_time = &i_current_ev_time;
1171  char *astime = ctime(p_current_ev_time);
1172 
1173  if ((!(fAnalysisName == "AdcPeg12" || fAnalysisName == "AdcSPeg12" || fAnalysisName == "AdcPhys" ||
1174  fAnalysisName == "AdcAny") &&
1175  fStexDigiOK[i0Dee] == 1 && fStexNbOfTreatedEvents[i0Dee] == 1) ||
1176  ((fAnalysisName == "AdcPeg12" || fAnalysisName == "AdcSPeg12" || fAnalysisName == "AdcPhys" ||
1177  fAnalysisName == "AdcAny") &&
1178  fFedDigiOK[fESFromFedTcc[fFedTcc - 1] - 1] == 1 && fStexNbOfTreatedEvents[i0Dee] == 1 &&
1179  fMemoDateFirstEvent[i0Dee] == 0)) {
1180  fTimeFirst[i0Dee] = i_current_ev_time;
1181  fDateFirst[i0Dee] = astime;
1182  fTimeLast[i0Dee] = i_current_ev_time;
1183  fDateLast[i0Dee] = astime;
1184  std::cout << "----- beginning of analysis for " << fStexName << i0Dee + 1 << "-------"
1185  << std::endl
1186  //<< " t_current_ev_time = " << t_current_ev_time <<
1187  // std::endl
1188  //<< " i_current_ev_time = " << i_current_ev_time <<
1189  // std::endl
1190  //<< " p_current_ev_time = " << p_current_ev_time <<
1191  // std::endl
1192  << " First event date = " << astime << std::endl
1193  << " Nb of selected evts = " << fNbOfSelectedEvents << std::endl
1194  << "-----------------------------------------------"
1195  "----------------"
1196  << std::endl;
1197  fMemoDateFirstEvent[i0Dee]++;
1198  }
1199 
1200  if (i_current_ev_time < fTimeFirst[i0Dee]) {
1201  fTimeFirst[i0Dee] = i_current_ev_time;
1202  fDateFirst[i0Dee] = astime;
1203  }
1204  if (i_current_ev_time > fTimeLast[i0Dee]) {
1205  fTimeLast[i0Dee] = i_current_ev_time;
1206  fDateLast[i0Dee] = astime;
1207  }
1208 
1209  //=============================================> cut on i0Dee
1210  // value
1211  if ((fStexNumber > 0 && i0Dee == fStexNumber - 1) || (fStexNumber == 0)) {
1212  TString sDir = fMyEENumbering->GetDeeDirViewedFromIP(n1DeeNumber);
1213  Int_t n1DeeSCEcna = fMyEENumbering->Get1DeeSCEcnaFrom1DeeCrys(n1DeeCrys, sDir);
1214  Int_t i0SCEcha = fMyEENumbering->Get1SCEchaFrom1DeeCrys(n1DeeCrys, sDir) - 1;
1215 
1216  Int_t NbOfSamplesFromDigis = digiItr->size();
1217 
1218  EEDataFrame df(*digiItr);
1219 
1220  if (NbOfSamplesFromDigis > 0 && NbOfSamplesFromDigis <= fMyEEEcal->MaxSampADC()) {
1221  Double_t adcDBLS = (Double_t)0;
1222  // Three 1st samples mean value for Dynamic Base Line
1223  // Substraction (DBLS)
1224  if (fDynBaseLineSub == "yes") {
1225  for (Int_t i0Sample = 0; i0Sample < 3; i0Sample++) {
1226  adcDBLS += (Double_t)(df.sample(i0Sample).adc());
1227  }
1228  adcDBLS /= (Double_t)3;
1229  }
1230  // Loop over the samples
1231  for (Int_t i0Sample = 0; i0Sample < fNbOfSamples; i0Sample++) {
1232  Double_t adc = (Double_t)(df.sample(i0Sample).adc()) - adcDBLS;
1233  //................................................. Calls
1234  // to GetSampleAdcValues
1235  if (fMyCnaEEDee[i0Dee]->GetSampleAdcValues(
1236  fStexNbOfTreatedEvents[i0Dee], n1DeeSCEcna, i0SCEcha, i0Sample, adc) == kTRUE) {
1237  fBuildEventDistribGood[i0Dee]++;
1238  } else {
1239  fBuildEventDistribBad[i0Dee]++;
1240  }
1241  }
1242  } else {
1243  std::cout << "EcnaAnalyzer::analyze(...)> "
1244  "NbOfSamplesFromDigis out of bounds = "
1245  << NbOfSamplesFromDigis << std::endl;
1246  }
1247  } // end of if( (fStexNumber > 0 && i0Dee == fStexNumber-1) ||
1248  // (fStexNumber == 0) )
1249  } // end of if( fFedNbOfTreatedEvents[fESFromFedTcc[fFedTcc-1]-1]
1250  // >= 1 &&
1251  // fFedNbOfTreatedEvents[fESFromFedTcc[fFedTcc-1]-1] <=
1252  // fReqNbOfEvts )
1253  } // end of if( fStexStatus[i0Dee] < 2 )
1254  } // end of if( i0Dee >= 0 && i0Dee<fMaxTreatedStexCounter )
1255  } // end of for (EBDigiCollection::const_iterator digiItr =
1256  // digisEB->begin();
1257  // digiItr != digisEB->end(); ++digiItr)
1258 
1259  // reset fStexDigiOK[i0Dee] or fFedDigiOK[i0Dee] to zero after loop on
1260  // digis
1261  if (fAnalysisName == "AdcPeg12" || fAnalysisName == "AdcSPeg12" || fAnalysisName == "AdcPhys" ||
1262  fAnalysisName == "AdcAny") {
1263  for (Int_t i0FedES = 0; i0FedES < fMaxFedUnitCounter; i0FedES++) {
1264  fFedDigiOK[i0FedES] = 0;
1265  }
1266 
1267  // reset fDeeDS5Memo1 and fDeeDS5Memo2 (for Data sector 5 versus Dee
1268  // number management)
1269  fDeeDS5Memo1 = 0;
1270  fDeeDS5Memo2 = 0;
1271  } else {
1272  for (Int_t i0Dee = 0; i0Dee < fMaxTreatedStexCounter; i0Dee++) {
1273  fStexDigiOK[i0Dee] = 0;
1274  }
1275  }
1276 
1277  } // end of if( Int_t(digisEB->end()-digisEB->begin()) >= 0 &&
1278  // Int_t(digisEB->end()-digisEB->begin()) <= Int_t(digisEB->size()) )
1279 
1280  } // end of if( fStexName == "Dee" && fDeeIndexBegin < fDeeIndexStop )
1281  } // end of if( (fStexNumber > 0 && fNbOfTreatedStexs == 0) || (fStexNumber ==
1282  // 0 && fNbOfTreatedStexs < MaxNbOfStex) )
1283 
1284  //=============================================================================================
1285  //
1286  // Number of treated events. Setting Stex and Fed status.
1287  //
1288  //=============================================================================================
1289 
1290  // (take into account the "Accelerating selection with FED number" section -
1291  // see above -)
1292  if (fStexName == "SM" || (fStexName == "Dee" &&
1293  !(fAnalysisName == "AdcPeg12" || fAnalysisName == "AdcSPeg12" ||
1294  fAnalysisName == "AdcPhys" || fAnalysisName == "AdcAny"))) // one FED = one SM = one Stex
1295  {
1296  for (Int_t i0Stex = fStexIndexBegin; i0Stex < fStexIndexStop; i0Stex++) {
1297  if (fStexStatus[i0Stex] != 2) // do not change fStexStatus[i0Stex] if already set to 2
1298  // even if fStexNbOfTreatedEvents[i0Stex] == fReqNbOfEvts
1299  {
1300  if (fStexNbOfTreatedEvents[i0Stex] == fReqNbOfEvts) {
1301  fStexStatus[i0Stex] = 1;
1302  }
1303  if (fStexNbOfTreatedEvents[i0Stex] > fReqNbOfEvts) {
1304  fStexStatus[i0Stex] = 2;
1305  }
1306  }
1307  }
1308  }
1309 
1310  // one FED = one Data Sector (DS or ES)
1311  if (fStexName == "Dee" && (fAnalysisName == "AdcPeg12" || fAnalysisName == "AdcSPeg12" ||
1312  fAnalysisName == "AdcPhys" || fAnalysisName == "AdcAny")) {
1313  for (Int_t i0FedES = 0; i0FedES < fMaxFedUnitCounter; i0FedES++) {
1314  if (fFedStatus[i0FedES] != 2) // do not change fFedStatus[i0FedES] if already set to 2
1315  // even if fFedNbOfTreatedEvents[i0FedES] == fReqNbOfEvts
1316  {
1317  if (fFedNbOfTreatedEvents[i0FedES] == fReqNbOfEvts) {
1318  fFedStatus[i0FedES] = 1;
1319  fTreatedFedOrder++;
1320  fFedStatusOrder[i0FedES] = fTreatedFedOrder;
1321  }
1322  if (fFedNbOfTreatedEvents[i0FedES] > fReqNbOfEvts) {
1323  fFedStatus[i0FedES] = 2;
1324  }
1325  }
1326  }
1327 
1328  Int_t j0Fed = 4;
1329  //..................................................... Dee 4 (DS 1,2,3,4 ;
1330  // ES 1,2,3,4)
1331  for (Int_t i0FedES = 0; i0FedES <= 3; i0FedES++) {
1332  if (fFedStatus[i0FedES] == 1) {
1333  fNbOfTreatedFedsInDee[3]++;
1334  fFedStatus[i0FedES] = 2;
1335  }
1336  }
1337 
1338  //..................................................... Dee 3, Dee 4 (DS 5 ;
1339  // ES 5)
1340  j0Fed = 4;
1341  if (fFedStatus[j0Fed] == 1) {
1342  fNbOfTreatedFedsInDee[3]++;
1343  fNbOfTreatedFedsInDee[2]++;
1344  fFedStatus[j0Fed] = 2;
1345  }
1346 
1347  //.................................................... Dee 3 (DS 6,7,8,9 ;
1348  // ES 6,7,8,9)
1349  for (Int_t i0FedES = 5; i0FedES <= 8; i0FedES++) {
1350  if (fFedStatus[i0FedES] == 1) {
1351  fNbOfTreatedFedsInDee[2]++;
1352  fFedStatus[i0FedES] = 2;
1353  }
1354  }
1355 
1356  //..................................................... Dee 1 (DS 1,2,3,4 ;
1357  // ES 10,11,12,13)
1358  for (Int_t i0FedES = 9; i0FedES <= 12; i0FedES++) {
1359  if (fFedStatus[i0FedES] == 1) {
1360  fNbOfTreatedFedsInDee[0]++;
1361  fFedStatus[i0FedES] = 2;
1362  }
1363  }
1364 
1365  //..................................................... Dee 1, Dee 2 (DS 5 ;
1366  // ES 5)
1367  j0Fed = 13;
1368  if (fFedStatus[j0Fed] == 1) {
1369  fNbOfTreatedFedsInDee[0]++;
1370  fNbOfTreatedFedsInDee[1]++;
1371  fFedStatus[j0Fed] = 2;
1372  }
1373 
1374  //..................................................... Dee 2 (DS 6,7,8,9 ;
1375  // ES 15,16,17,18)
1376  for (Int_t i0FedES = 14; i0FedES <= 17; i0FedES++) {
1377  if (fFedStatus[i0FedES] == 1) {
1378  fNbOfTreatedFedsInDee[1]++;
1379  fFedStatus[i0FedES] = 2;
1380  }
1381  }
1382 
1383  //-----------------------------------------------------
1384  for (Int_t i0Dee = 0; i0Dee < 4; i0Dee++) {
1385  if (fNbOfTreatedFedsInStex[i0Dee] >= 0 && fNbOfTreatedFedsInStex[i0Dee] < 5) {
1387  }
1388  if (fNbOfTreatedFedsInDee[i0Dee] == 5) {
1389  fStexStatus[i0Dee] = 1;
1390  fNbOfTreatedFedsInDee[i0Dee] = 0;
1391  }
1392  }
1393 
1394  } // end of if( fStexName == "Dee" &&
1395  // ( fAnalysisName == "AdcPeg12" || fAnalysisName == "AdcSPeg12" ... ) )
1396 
1397  //----------------------------------------------------------------------------------------------
1398  for (Int_t i0Stex = fStexIndexBegin; i0Stex < fStexIndexStop; i0Stex++) {
1399  if (fStexStatus[i0Stex] == 1) {
1400  fNbOfTreatedStexs++; // increase nb of treated Stex's only if
1401  // fStexStatus[i0Stex] == 1
1402  //....................................................... date of last
1403  // event edm::Timestamp Time = iEvent.time(); edm::TimeValue_t
1404  // t_current_ev_time = (cond::Time_t)Time.value(); time_t
1405  // i_current_ev_time = (time_t)(t_current_ev_time>>32); const time_t*
1406  // p_current_ev_time = &i_current_ev_time; char* astime =
1407  // ctime(p_current_ev_time); fTimeLast[i0Stex] = i_current_ev_time;
1408  // fDateLast[i0Stex] = astime;
1409 
1410  // if( i_current_ev_time > fTimeLast[i0Stex] )
1411  // {fTimeLast[i0Stex] = i_current_ev_time; fDateLast[i0Stex] = astime;}
1412 
1413  std::cout << "---------- End of analysis for " << fStexName << i0Stex + 1 << " -----------" << std::endl;
1414  Int_t n3 = 3;
1415  CheckMsg(n3, i0Stex);
1416  // std::cout << " t_current_ev_time = " << t_current_ev_time <<
1417  // std::endl
1418  //<< " i_current_ev_time = " << i_current_ev_time << std::endl
1419  //<< " p_current_ev_time = " << p_current_ev_time << std::endl
1420  // std::cout << " Last analyzed event date = " << astime <<
1421  // std::endl;
1422  std::cout << " Number of selected events = " << fNbOfSelectedEvents << std::endl;
1423  std::cout << std::endl
1424  << fNbOfTreatedStexs << " " << fStexName << "'s with " << fReqNbOfEvts << " events analyzed."
1425  << std::endl
1426  << "---------------------------------------------------------" << std::endl;
1427 
1428  //================================= WRITE RESULTS FILE
1429  if (fStexName == "SM") {
1430  if (fMyCnaEBSM[i0Stex] != nullptr) {
1431  //........................................ register dates 1 and 2
1432  fMyCnaEBSM[i0Stex]->StartStopDate(fDateFirst[i0Stex], fDateLast[i0Stex]);
1433  fMyCnaEBSM[i0Stex]->StartStopTime(fTimeFirst[i0Stex], fTimeLast[i0Stex]);
1434 
1435  //........................................ Init .root file
1436  fMyCnaEBSM[i0Stex]->GetReadyToCompute();
1437  fMyCnaEBSM[i0Stex]->SampleValues();
1438 
1439  //........................................ write the sample values in
1440  //.root file
1441  if (fMyCnaEBSM[i0Stex]->WriteRootFile() == kFALSE) {
1442  std::cout << "!EcnaAnalyzer::analyze> PROBLEM with write ROOT file for SM" << i0Stex + 1 << fTTBELL
1443  << std::endl;
1444  }
1445  }
1446  // set pointer to zero in order to avoid recalculation and rewriting at
1447  // the destructor level
1448  delete fMyCnaEBSM[i0Stex];
1449  fMyCnaEBSM[i0Stex] = nullptr;
1450  std::cout << "!EcnaAnalyzer::analyze> Set memory free: delete done for SM " << i0Stex + 1 << std::endl;
1451  }
1452 
1453  if (fStexName == "Dee") {
1454  if (fMyCnaEEDee[i0Stex] != nullptr) {
1455  //........................................ register dates 1 and 2
1456  fMyCnaEEDee[i0Stex]->StartStopDate(fDateFirst[i0Stex], fDateLast[i0Stex]);
1457  fMyCnaEEDee[i0Stex]->StartStopTime(fTimeFirst[i0Stex], fTimeLast[i0Stex]);
1458 
1459  //........................................ Init .root file
1460  fMyCnaEEDee[i0Stex]->GetReadyToCompute();
1461  fMyCnaEEDee[i0Stex]->SampleValues();
1462 
1463  //........................................ write the sample values in
1464  //.root file
1465  if (fMyCnaEEDee[i0Stex]->WriteRootFile() == kFALSE) {
1466  std::cout << "!EcnaAnalyzer::analyze> PROBLEM with write ROOT file "
1467  "for Dee"
1468  << i0Stex + 1 << fTTBELL << std::endl;
1469  }
1470  }
1471  // set pointer to zero in order to avoid recalculation and rewriting at
1472  // the destructor level
1473  delete fMyCnaEEDee[i0Stex];
1474  fMyCnaEEDee[i0Stex] = nullptr;
1475  std::cout << "!EcnaAnalyzer::analyze> Set memory free: delete done for Dee " << i0Stex + 1 << std::endl;
1476  }
1477 
1478  fStexStatus[i0Stex] = 2; // set fStexStatus[i0Stex] to 2 definitively
1479  std::cout << "*----------------------------------------------------------"
1480  "------------------ "
1481  << std::endl;
1482 
1483  } // end of if( fStexStatus[i0Stex] == 1 )
1484  } // end of for(Int_t i0Stex=fStexIndexBegin; i0Stex<fStexIndexStop; i0Stex++)
1485 }
1486 // end of EcnaAnalyzer::analyse(...)
1487 
1488 Bool_t EcnaAnalyzer::AnalysisOutcome(const TString &s_opt) {
1489  //---- STOP if end of analysis
1490 
1491  Bool_t result = kFALSE;
1492 
1493  if (s_opt == "EVT") {
1494  Int_t MaxNbOfStex = 0;
1495  if (fStexName == "SM") {
1496  MaxNbOfStex = fMyEBEcal->MaxSMInEB();
1497  }
1498  if (fStexName == "Dee") {
1499  MaxNbOfStex = fMyEEEcal->MaxDeeInEE();
1500  }
1501 
1502  if (((fStexNumber > 0 && fNbOfTreatedStexs == 1) || (fStexNumber == 0 && fNbOfTreatedStexs == MaxNbOfStex)) &&
1505  std::cout << std::endl
1506  << "**************************** ANALYSIS REPORT > OK "
1507  "**************************************"
1508  << std::endl
1509  << "*EcnaAnalyzer::AnalysisOutcome(...)> The maximum requested "
1510  "number of events and the maximum"
1511  << std::endl
1512  << " number of treated " << fStexName << "'s have been reached."
1513  << std::endl
1514  << " Analysis successfully "
1515  "ended from EcnaAnalyzer "
1516  << std::endl
1517  << " by SIGNAL: "
1518  "kill(getpid(),SIGUSR2)."
1519  << std::endl
1520  << " Number of selected "
1521  "events = "
1522  << fNbOfSelectedEvents << std::endl
1523  << " Last requested event "
1524  "number = "
1525  << fLastReqEvent << std::endl
1526  << " Current event number "
1527  " = "
1528  << fCurrentEventNumber << std::endl;
1529 
1530  Int_t n0 = 0;
1531  CheckMsg(n0);
1532 
1533  std::cout << "***********************************************************"
1534  "*****************************"
1535  << std::endl
1536  << std::endl;
1537 
1538  result = kTRUE;
1539  kill(getpid(), SIGUSR2);
1540  }
1541 
1543  !((fStexNumber > 0 && fNbOfTreatedStexs == 1) || (fStexNumber == 0 && fNbOfTreatedStexs == MaxNbOfStex))) {
1544  std::cout << std::endl
1545  << "**************************** ANALYSIS REPORT >>> *** "
1546  "WARNING *** WARNING *** WARNING ***"
1547  << std::endl
1548  << "*EcnaAnalyzer::AnalysisOutcome(...)> Last event reached "
1549  "before completion of analysis."
1550  << std::endl
1551  << " Analysis ended from "
1552  "EcnaAnalyzer "
1553  << std::endl
1554  << " by SIGNAL: "
1555  "kill(getpid(),SIGUSR2)."
1556  << std::endl
1557  << " Number of selected "
1558  "events = "
1559  << fNbOfSelectedEvents << std::endl
1560  << " Last requested event "
1561  "number = "
1562  << fLastReqEvent << std::endl
1563  << " Current event number "
1564  " = "
1565  << fCurrentEventNumber << std::endl;
1566 
1567  Int_t n0 = 0;
1568  CheckMsg(n0);
1569 
1570  std::cout << "***********************************************************"
1571  "*****************************"
1572  << std::endl
1573  << std::endl;
1574 
1575  result = kTRUE;
1576  kill(getpid(), SIGUSR2);
1577  }
1578  } else {
1579  if (s_opt == "ERR_FNEG") {
1580  std::cout << std::endl
1581  << "**************************** ANALYSIS REPORT >>> **** ERROR **** "
1582  "ERROR **** ERROR ******"
1583  << std::endl
1584  << "*EcnaAnalyzer::AnalysisOutcome(...)> First event number = " << fFirstReqEvent
1585  << ". Should be strictly potitive." << std::endl
1586  << " Analysis ended from EcnaAnalyzer " << std::endl
1587  << " by SIGNAL: kill(getpid(),SIGUSR2)." << std::endl;
1588 
1589  std::cout << "***********************************************************"
1590  "*****************************"
1591  << std::endl
1592  << std::endl;
1593 
1594  result = kTRUE;
1595  kill(getpid(), SIGUSR2);
1596  }
1597  if (s_opt == "ERR_LREQ") {
1598  std::cout << std::endl
1599  << "**************************** ANALYSIS REPORT >>> **** ERROR **** "
1600  "ERROR **** ERROR ******"
1601  << std::endl
1602  << "*EcnaAnalyzer::analyze(...)> Requested number of events = " << fReqNbOfEvts << "." << std::endl
1603  << " Too large compared to the event "
1604  "range: "
1605  << fFirstReqEvent << " - " << fLastReqEvent << std::endl
1606  << " Analysis ended from EcnaAnalyzer " << std::endl
1607  << " by SIGNAL: kill(getpid(),SIGUSR2)." << std::endl;
1608 
1609  std::cout << "***********************************************************"
1610  "*****************************"
1611  << std::endl
1612  << std::endl;
1613 
1614  result = kTRUE;
1615  kill(getpid(), SIGUSR2);
1616  }
1617  }
1618  return result;
1619 } // end of EcnaAnalyzer::AnalysisOutcome(const Int_t& n_option)
1620 
1621 void EcnaAnalyzer::CheckMsg(const Int_t &MsgNum) {
1622  Int_t nm1 = -1;
1623  CheckMsg(MsgNum, nm1);
1624 }
1625 
1626 void EcnaAnalyzer::CheckMsg(const Int_t &MsgNum, const Int_t &i0Stex) {
1627  //------ Cross-check messages
1628 
1629  if (MsgNum == 1) {
1630  std::cout << "---------------- CROSS-CHECK A ------------------ " << std::endl
1631  << "**************** CURRENT EVENT ****************** " << std::endl;
1632  }
1633  if (MsgNum == 2) {
1634  std::cout << "---------------- CROSS-CHECK B ------------------ " << std::endl
1635  << "**** FIRST EVENT PASSING USER'S ANALYSIS CUT **** " << std::endl;
1636  }
1637  if (MsgNum == 3) {
1638  std::cout << "---------------- CROSS-CHECK C ------------------ " << std::endl
1639  << "*** CURRENT VALUES BEFORE RESULT FILE WRITING *** " << std::endl;
1640  }
1641  if (MsgNum == 3 || MsgNum == 4) {
1642  std::cout << " fRecNumber = " << fRecNumber << std::endl
1643  << " fEvtNumber = " << fEvtNumber << std::endl;
1644  }
1645 
1646  std::cout << " fCurrentEventNumber = " << fCurrentEventNumber << std::endl
1647  << " fNbOfSelectedEvents = " << fNbOfSelectedEvents << std::endl
1648  << " fRunNumber = " << fRunNumber << std::endl
1649  << " Chozen run type = " << runtype(fChozenRunTypeNumber) << std::endl
1650  << " Run type = " << runtype(fRunTypeNumber) << std::endl
1651  << " fFedTcc = " << fFedTcc << std::endl
1652  << " fFedId(+601) = " << fFedId + 601 << std::endl
1653  << " fStexName = " << fStexName << std::endl
1654  << " Chozen gain = " << gainvalue(fChozenGainNumber) << std::endl
1655  << " Mgpa Gain = " << gainvalue(fMgpaGainNumber) << std::endl
1656  << std::endl;
1657 
1658  if (fAnalysisName == "AdcPeg12" || fAnalysisName == "AdcSPeg12" || fAnalysisName == "AdcPhys" ||
1659  fAnalysisName == "AdcAny") {
1660  if (fStexName == "SM") {
1661  for (Int_t j0Stex = fStexIndexBegin; j0Stex < fStexIndexStop; j0Stex++) {
1662  Int_t nStexNbOfTreatedEvents = fStexNbOfTreatedEvents[j0Stex];
1663  if (fStexStatus[j0Stex] == 1) {
1664  nStexNbOfTreatedEvents = fStexNbOfTreatedEvents[j0Stex];
1665  }
1666  if (fStexStatus[j0Stex] == 2) {
1667  nStexNbOfTreatedEvents = fStexNbOfTreatedEvents[j0Stex];
1668  }
1669 
1670  std::cout << fStexName << std::setw(3) << j0Stex + 1 << ": " << std::setw(5) << nStexNbOfTreatedEvents
1671  << " events. " << fStexName << " status: " << fStexStatus[j0Stex];
1672  if (j0Stex == i0Stex) {
1673  std::cout << " (going to write file for this " << fStexName << ").";
1674  }
1675  std::cout << std::endl;
1676  }
1677  }
1678 
1679  if (fStexName == "Dee") {
1680  for (Int_t i0FedES = 0; i0FedES < fMaxFedUnitCounter; i0FedES++) {
1681  Int_t nFedNbOfTreatedEvents = fFedNbOfTreatedEvents[i0FedES];
1682  if (fFedStatus[i0FedES] == 1) {
1683  nFedNbOfTreatedEvents = fFedNbOfTreatedEvents[i0FedES];
1684  }
1685  if (fFedStatus[i0FedES] == 2) {
1686  nFedNbOfTreatedEvents = fFedNbOfTreatedEvents[i0FedES];
1687  }
1688 
1689  std::cout << "Fed (ES) " << std::setw(3) << i0FedES + 1 << ": " << std::setw(5) << nFedNbOfTreatedEvents
1690  << " events."
1691  << " Fed status: " << fFedStatus[i0FedES] << ", order: " << std::setw(3) << fFedStatusOrder[i0FedES]
1692  << " (" << fDeeNumberString[i0FedES] << ")" << std::endl;
1693  }
1694 
1695  for (Int_t j0Stex = fStexIndexBegin; j0Stex < fStexIndexStop; j0Stex++) {
1696  std::cout << fStexName << std::setw(3) << j0Stex + 1 << ": " << std::setw(5) << fNbOfTreatedFedsInStex[j0Stex]
1697  << " analyzed Fed(s). " << fStexName << " status: " << fStexStatus[j0Stex];
1698  if (j0Stex == i0Stex) {
1699  std::cout << " (going to write file for this " << fStexName << ").";
1700  }
1701  std::cout << std::endl;
1702  }
1703  }
1704 
1705  std::cout << "Number of " << fStexName << "'s with " << fReqNbOfEvts << " events analyzed: " << fNbOfTreatedStexs
1706  << std::endl;
1707  }
1708 
1709  if (MsgNum == 1 || MsgNum == 2) {
1710  std::cout << "*------------------------------------------------------------"
1711  "---------------- "
1712  << std::endl;
1713  }
1714  if (MsgNum == 3) {
1715  std::cout << "*............................................................"
1716  "................ "
1717  << std::endl;
1718  }
1719 
1720 } // end of EcnaAnalyzer::CheckMsg(const Int_t& MsgNum, const Int_t& i0Stex)
1721 
1722 TString EcnaAnalyzer::runtype(const Int_t &numtype) {
1723  TString cType = "?";
1724 
1725  if (numtype == 0) {
1726  cType = "COSMICS";
1727  }
1728  if (numtype == 1) {
1729  cType = "BEAMH4";
1730  }
1731  if (numtype == 2) {
1732  cType = "BEAMH2";
1733  }
1734  if (numtype == 3) {
1735  cType = "MTCC";
1736  }
1737  if (numtype == 4) {
1738  cType = "LASER_STD";
1739  }
1740  if (numtype == 5) {
1741  cType = "LASER_POWER_SCAN";
1742  }
1743  if (numtype == 6) {
1744  cType = "LASER_DELAY_SCAN";
1745  }
1746  if (numtype == 7) {
1747  cType = "TESTPULSE_SCAN_MEM";
1748  }
1749  if (numtype == 8) {
1750  cType = "TESTPULSE_MGPA";
1751  }
1752  if (numtype == 9) {
1753  cType = "PEDESTAL_STD";
1754  }
1755  if (numtype == 10) {
1756  cType = "PEDESTAL_OFFSET_SCAN";
1757  }
1758  if (numtype == 11) {
1759  cType = "PEDESTAL_25NS_SCAN";
1760  }
1761  if (numtype == 12) {
1762  cType = "LED_STD";
1763  }
1764 
1765  if (numtype == 13) {
1766  cType = "PHYSICS_GLOBAL";
1767  }
1768  if (numtype == 14) {
1769  cType = "COSMICS_GLOBAL";
1770  }
1771  if (numtype == 15) {
1772  cType = "HALO_GLOBAL";
1773  }
1774 
1775  if (numtype == 16) {
1776  cType = "LASER_GAP";
1777  }
1778  if (numtype == 17) {
1779  cType = "TESTPULSE_GAP";
1780  }
1781  if (numtype == 18) {
1782  cType = "PEDESTAL_GAP";
1783  }
1784  if (numtype == 19) {
1785  cType = "LED_GAP";
1786  }
1787 
1788  if (numtype == 20) {
1789  cType = "PHYSICS_LOCAL";
1790  }
1791  if (numtype == 21) {
1792  cType = "COSMICS_LOCAL";
1793  }
1794  if (numtype == 22) {
1795  cType = "HALO_LOCAL";
1796  }
1797  if (numtype == 23) {
1798  cType = "CALIB_LOCAL";
1799  }
1800 
1801  //.......................................... non-CMS types
1802  if (numtype == 24) {
1803  cType = "PEDSIM";
1804  } // SIMULATION
1805  if (numtype == 25) {
1806  cType = "ANY_RUN";
1807  } // ANY RUN (ALL TYPES ACCEPTED)
1808 
1809  return cType;
1810 }
1811 
1812 Int_t EcnaAnalyzer::gainvalue(const Int_t &numgain) {
1813  Int_t value = 0;
1814 
1815  if (numgain == 1) {
1816  value = 12;
1817  }
1818  if (numgain == 2) {
1819  value = 6;
1820  }
1821  if (numgain == 3) {
1822  value = 1;
1823  }
1824 
1825  return value;
1826 }
EcnaAnalyzer::fPEDESTAL_GAP
Int_t fPEDESTAL_GAP
Definition: EcnaAnalyzer.h:238
EcnaAnalyzer::sAnalysisName_
TString sAnalysisName_
Definition: EcnaAnalyzer.h:163
TEcnaParEcal::MaxCrysPhiInTow
Int_t MaxCrysPhiInTow()
Definition: TEcnaParEcal.cc:304
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
EcnaAnalyzer::EBdigiCollection_
std::string EBdigiCollection_
Definition: EcnaAnalyzer.h:160
EcnaAnalyzer.h
EcnaAnalyzer::digiProducer_
std::string digiProducer_
Definition: EcnaAnalyzer.h:158
EcnaAnalyzer::eventHeaderCollection_
std::string eventHeaderCollection_
Definition: EcnaAnalyzer.h:159
mps_fire.i
i
Definition: mps_fire.py:428
EcnaAnalyzer::CheckMsg
void CheckMsg(const Int_t &, const Int_t &)
Definition: EcnaAnalyzer.cc:1626
EcnaAnalyzer::fStexName
TString fStexName
Definition: EcnaAnalyzer.h:197
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
edm::Handle::product
T const * product() const
Definition: Handle.h:70
edm::DataFrameContainer::const_iterator
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
Definition: DataFrameContainer.h:61
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
TEcnaNumbering::Get1DeeSCEcnaFrom1DeeCrys
Int_t Get1DeeSCEcnaFrom1DeeCrys(const Int_t &, const TString &)
Definition: TEcnaNumbering.cc:2345
TEcnaRun::SampleValues
void SampleValues()
Definition: TEcnaRun.cc:1424
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
EBDetId
Definition: EBDetId.h:17
edm
HLT enums.
Definition: AlignableModifier.h:19
gpuClustering::adc
uint16_t *__restrict__ uint16_t const *__restrict__ adc
Definition: gpuClusterChargeCut.h:20
EcnaAnalyzer::fBuildEventDistribGood
Int_t * fBuildEventDistribGood
Definition: EcnaAnalyzer.h:180
TEcnaNumbering::GetDeeDirViewedFromIP
TString GetDeeDirViewedFromIP(const Int_t &)
Definition: TEcnaNumbering.cc:2699
EBDataFrame
Definition: EBDataFrame.h:11
EcnaAnalyzer::fFedIdCounter
Int_t * fFedIdCounter
Definition: EcnaAnalyzer.h:272
TEcnaParEcal
Definition: TEcnaParEcal.h:24
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EcnaAnalyzer::fDeeDS5Memo1
Int_t fDeeDS5Memo1
Definition: EcnaAnalyzer.h:220
EcnaAnalyzer::fNbOfSelectedEvents
Int_t fNbOfSelectedEvents
Definition: EcnaAnalyzer.h:177
EcnaAnalyzer::fMaxFedIdCounter
Int_t fMaxFedIdCounter
Definition: EcnaAnalyzer.h:271
EcnaAnalyzer::fgMaxCar
Int_t fgMaxCar
Definition: EcnaAnalyzer.h:150
n0
int n0
Definition: AMPTWrapper.h:44
EcnaAnalyzer::fSMIndexStop
Int_t fSMIndexStop
Definition: EcnaAnalyzer.h:204
EcnaAnalyzer::fPEDSIM
Int_t fPEDSIM
Definition: EcnaAnalyzer.h:241
TEcnaParEcal::MaxDeeInEE
Int_t MaxDeeInEE()
Definition: TEcnaParEcal.cc:322
edm::SortedCollection
Definition: SortedCollection.h:49
TEcnaParEcal::MaxCrysIYInSC
Int_t MaxCrysIYInSC()
Definition: TEcnaParEcal.cc:341
EcnaAnalyzer::fStexIndexStop
Int_t fStexIndexStop
Definition: EcnaAnalyzer.h:208
EcnaAnalyzer::fFedDigiOK
Int_t * fFedDigiOK
Definition: EcnaAnalyzer.h:228
EcnaAnalyzer::sReqNbOfEvts_
TString sReqNbOfEvts_
Definition: EcnaAnalyzer.h:167
EEDetId::ix
int ix() const
Definition: EEDetId.h:77
EcnaAnalyzer::sStexName_
TString sStexName_
Definition: EcnaAnalyzer.h:168
edm::Handle
Definition: AssociativeIterator.h:50
TEcnaRun::StartStopTime
void StartStopTime(time_t, time_t)
Definition: TEcnaRun.cc:1368
TEcnaNumbering::Get1SMTowFrom1SMCrys
Int_t Get1SMTowFrom1SMCrys(const Int_t &)
Definition: TEcnaNumbering.cc:531
EcnaAnalyzer::fDeeNumberString
TString * fDeeNumberString
Definition: EcnaAnalyzer.h:217
EcnaAnalyzer::fFedTcc
Int_t fFedTcc
Definition: EcnaAnalyzer.h:210
b2gDoubleLeptonHLTEventValidation_cfi.sDir
sDir
Definition: b2gDoubleLeptonHLTEventValidation_cfi.py:7
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::fMyEEEcal
TEcnaParEcal * fMyEEEcal
Definition: EcnaAnalyzer.h:260
TEcnaNumbering::Get1SCEchaFrom1DeeCrys
Int_t Get1SCEchaFrom1DeeCrys(const Int_t &, const TString &)
Definition: TEcnaNumbering.cc:2329
TEcnaParEcal::MaxTowPhiInSM
Int_t MaxTowPhiInSM()
Definition: TEcnaParEcal.cc:300
EcnaAnalyzer::fRunTypeCounter
Int_t * fRunTypeCounter
Definition: EcnaAnalyzer.h:266
EcnaAnalyzer::fStexStatus
Int_t * fStexStatus
Definition: EcnaAnalyzer.h:224
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
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
EcnaAnalyzer::fBuildEventDistribBad
Int_t * fBuildEventDistribBad
Definition: EcnaAnalyzer.h:179
EcnaAnalyzer::fDateLast
TString * fDateLast
Definition: EcnaAnalyzer.h:246
TEcnaRun
Definition: TEcnaRun.h:363
EcnaAnalyzer::fFedId
Int_t fFedId
Definition: EcnaAnalyzer.h:216
callgraph.n2
n2
Definition: callgraph.py:50
TEcnaParEcal::MaxSCIYInDee
Int_t MaxSCIYInDee()
Definition: TEcnaParEcal.cc:333
EcnaAnalyzer::fMemoDateFirstEvent
Int_t * fMemoDateFirstEvent
Definition: EcnaAnalyzer.h:248
TEcnaParPaths
Definition: TEcnaParPaths.h:24
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
EEDetId
Definition: EEDetId.h:14
EcnaAnalyzer::runtype
TString runtype(const Int_t &)
Definition: EcnaAnalyzer.cc:1722
TEcnaParEcal::MaxDSInEE
Int_t MaxDSInEE()
Definition: TEcnaParEcal.cc:357
EcnaAnalyzer::fRunNumber
Int_t fRunNumber
Definition: EcnaAnalyzer.h:193
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
EcnaAnalyzer::fFirstReqEvent
Int_t fFirstReqEvent
Definition: EcnaAnalyzer.h:195
edm::ParameterSet
Definition: ParameterSet.h:47
TEcnaObject
Definition: TEcnaObject.h:25
EBDigiCollection
Definition: EcalDigiCollections.h:56
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
EEDigiCollection
Definition: EcalDigiCollections.h:69
EcnaAnalyzer::fChozenRunTypeNumber
Int_t fChozenRunTypeNumber
Definition: EcnaAnalyzer.h:189
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
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
iEvent
int iEvent
Definition: GenABIO.cc:224
EcnaAnalyzer::fAnalysisName
TString fAnalysisName
Definition: EcnaAnalyzer.h:187
EcnaAnalyzer::fStexDigiOK
Int_t * fStexDigiOK
Definition: EcnaAnalyzer.h:222
value
Definition: value.py:1
edm::DataFrameContainer::begin
const_iterator begin() const
The iterator returned can not safely be used across threads.
Definition: DataFrameContainer.h:149
EcnaAnalyzer::fMyCnaEEDee
TEcnaRun ** fMyCnaEEDee
Definition: EcnaAnalyzer.h:254
EcnaAnalyzer::sLastReqEvent_
TString sLastReqEvent_
Definition: EcnaAnalyzer.h:166
edm::EventSetup
Definition: EventSetup.h:58
EcnaAnalyzer::fStexNbOfTreatedEvents
Int_t * fStexNbOfTreatedEvents
Definition: EcnaAnalyzer.h:223
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
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TEcnaRun::GetReadyToReadData
void GetReadyToReadData(const TString &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaRun.cc:695
EcnaAnalyzer::fRunTypeNumber
Int_t fRunTypeNumber
Definition: EcnaAnalyzer.h:194
TEcnaParEcal::MaxSMInEB
Int_t MaxSMInEB()
Definition: TEcnaParEcal.cc:293
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
std
Definition: JetResolutionObject.h:76
EcnaAnalyzer::fChozenGainNumber
Int_t fChozenGainNumber
Definition: EcnaAnalyzer.h:188
TEcnaRun::GetReadyToCompute
void GetReadyToCompute()
Definition: TEcnaRun.cc:1387
EcnaAnalyzer::fMyCnaEBSM
TEcnaRun ** fMyCnaEBSM
Definition: EcnaAnalyzer.h:253
hgcalPerformanceValidation.df
df
Definition: hgcalPerformanceValidation.py:733
EcnaAnalyzer::fMyEBNumbering
TEcnaNumbering * fMyEBNumbering
Definition: EcnaAnalyzer.h:256
EcnaAnalyzer::AnalysisOutcome
Bool_t AnalysisOutcome(const TString &)
Definition: EcnaAnalyzer.cc:1488
EcnaAnalyzer::fLastReqEvent
Int_t fLastReqEvent
Definition: EcnaAnalyzer.h:196
relativeConstraints.value
value
Definition: relativeConstraints.py:53
EcnaAnalyzer::fDateFirst
TString * fDateFirst
Definition: EcnaAnalyzer.h:245
EcnaAnalyzer::fPHYSICS_GLOBAL
Int_t fPHYSICS_GLOBAL
Definition: EcnaAnalyzer.h:240
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
TEcnaParPaths::ResultsRootFilePath
TString ResultsRootFilePath()
Definition: TEcnaParPaths.cc:352
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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
RecoSummaryTask_cfi.Time
Time
Definition: RecoSummaryTask_cfi.py:34
TEcnaParPaths::GetPathForResultsRootFiles
Bool_t GetPathForResultsRootFiles()
Definition: TEcnaParPaths.cc:83
EBDetId::ism
int ism() const
get the ECAL/SM id
Definition: EBDetId.h:59
L1TowerCalibrationProducer_cfi.iEta
iEta
Definition: L1TowerCalibrationProducer_cfi.py:60
mps_fire.result
result
Definition: mps_fire.py:311
EcnaAnalyzer::fMyEENumbering
TEcnaNumbering * fMyEENumbering
Definition: EcnaAnalyzer.h:259
EcnaAnalyzer::fNbOfTreatedFedsInStex
Int_t * fNbOfTreatedFedsInStex
Definition: EcnaAnalyzer.h:234
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
TEcnaNumbering::Get0TowEchaFrom1SMCrys
Int_t Get0TowEchaFrom1SMCrys(const Int_t &)
Definition: TEcnaNumbering.cc:516
EcnaAnalyzer::fNbOfTreatedStexs
Int_t fNbOfTreatedStexs
Definition: EcnaAnalyzer.h:232
EEDataFrame
Definition: EEDataFrame.h:12
edm::Event
Definition: Event.h:73
TEcnaRun::StartStopDate
void StartStopDate(const TString &, const TString &)
Definition: TEcnaRun.cc:1375
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
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
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
edm::DataFrameContainer::end
const_iterator end() const
Definition: DataFrameContainer.h:152
EcnaAnalyzer::fLASER_STD
Int_t fLASER_STD
Definition: EcnaAnalyzer.h:239
edm::TimeValue_t
unsigned long long TimeValue_t
Definition: Timestamp.h:28
EcnaAnalyzer::fTreatedFedOrder
Int_t fTreatedFedOrder
Definition: EcnaAnalyzer.h:214
edm::DataFrameContainer::size
size_type size() const
Definition: DataFrameContainer.h:162
edm::Timestamp
Definition: Timestamp.h:30