CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
EcalStatusAnalyzer Class Reference

#include <EcalStatusAnalyzer.h>

Inheritance diagram for EcalStatusAnalyzer:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

enum  EcalLaserColorType { iBLUE = 0, iGREEN = 1, iRED = 3, iIR = 2 }
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void beginJob () override
 
 EcalStatusAnalyzer (const edm::ParameterSet &iConfig)
 
void endJob () override
 
 ~EcalStatusAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

const std::string _dataType
 
int dccID
 
std::vector< int > dccIDsLas
 
std::vector< int > dccIDsPed
 
std::vector< int > dccIDsTP
 
const edm::EDGetTokenT< EcalRawDataCollectiondccToken_
 
int event
 
const std::string eventHeaderCollection_
 
const std::string eventHeaderProducer_
 
int fedID
 
std::vector< int > fedIDsLas
 
std::vector< int > fedIDsPed
 
std::vector< int > fedIDsTP
 
const edm::EDGetTokenT< EcalTBEventHeaderheadToken_
 
int iEvent
 
std::map< int, int > isFedLasCreated
 
std::map< int, int > isFedPedCreated
 
std::map< int, int > isFedTPCreated
 
std::map< int, int > laserDelayBlue
 
std::map< int, int > laserDelayRed
 
std::map< int, int > laserFilterBlue
 
std::map< int, int > laserFilterRed
 
std::map< int, int > laserPowerBlue
 
std::map< int, int > laserPowerRed
 
std::map< int, short > MEMGainLas
 
std::map< int, short > MEMGainPed
 
std::map< int, short > MEMGainTP
 
std::map< int, short > MGPAGainLas
 
std::map< int, short > MGPAGainPed
 
std::map< int, short > MGPAGainTP
 
std::map< int, int > nBlueLas
 
std::map< int, int > nEvtsLas
 
std::map< int, int > nEvtsPed
 
std::map< int, int > nEvtsTP
 
std::map< int, int > nRedLas
 
int nSM
 
const std::string resdir_
 
int runNum
 
int runType
 
std::map< int, int > runTypeLas
 
std::map< int, int > runTypePed
 
std::map< int, int > runTypeTP
 
const std::string statusfile_
 
std::map< int, unsigned long long > timeStampBegLas
 
std::map< int, unsigned long long > timeStampBegPed
 
std::map< int, unsigned long long > timeStampBegTP
 
unsigned long long timeStampCur
 
std::map< int, unsigned long long > timeStampEndLas
 
std::map< int, unsigned long long > timeStampEndPed
 
std::map< int, unsigned long long > timeStampEndTP
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 14 of file EcalStatusAnalyzer.h.

Member Enumeration Documentation

◆ EcalLaserColorType

Enumerator
iBLUE 
iGREEN 
iRED 
iIR 

Definition at line 23 of file EcalStatusAnalyzer.h.

23  {
24  iBLUE = 0,
25  iGREEN = 1,
26  iRED = 3, // in fact should be 2
27  iIR = 2 // in fact should be 3
28  };

Constructor & Destructor Documentation

◆ EcalStatusAnalyzer()

EcalStatusAnalyzer::EcalStatusAnalyzer ( const edm::ParameterSet iConfig)
explicit

Definition at line 33 of file EcalStatusAnalyzer.cc.

35  : iEvent(0),
36 
37  // framework parameters with default values
38  _dataType(iConfig.getUntrackedParameter<std::string>("dataType", "h4")), // h4 or p5
39  resdir_(iConfig.getUntrackedParameter<std::string>("resDir")),
40  statusfile_(iConfig.getUntrackedParameter<std::string>("statusFile")),
41  eventHeaderCollection_(iConfig.getParameter<std::string>("eventHeaderCollection")),
42  eventHeaderProducer_(iConfig.getParameter<std::string>("eventHeaderProducer")),
43  dccToken_(consumes<EcalRawDataCollection>(edm::InputTag(eventHeaderProducer_, eventHeaderCollection_))),
44  headToken_(consumes<EcalTBEventHeader>(edm::InputTag(eventHeaderProducer_)))
45 //========================================================================
46 
47 {
48  //now do what ever initialization is needed
49 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const std::string eventHeaderCollection_
T getUntrackedParameter(std::string const &, T const &) const
const std::string statusfile_
const std::string eventHeaderProducer_
const std::string _dataType
const edm::EDGetTokenT< EcalTBEventHeader > headToken_
const std::string resdir_
const edm::EDGetTokenT< EcalRawDataCollection > dccToken_

◆ ~EcalStatusAnalyzer()

EcalStatusAnalyzer::~EcalStatusAnalyzer ( )
overridedefault

Member Function Documentation

◆ analyze()

void EcalStatusAnalyzer::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 65 of file EcalStatusAnalyzer.cc.

References _dataType, EcalTBEventHeader::begBurstTimeSec(), edm::SortedCollection< T, SORT >::begin(), dccID, dccIDsLas, dccIDsPed, dccIDsTP, dccToken_, EcalDCCHeaderBlock::EcalDCCEventSettings::delay, MillePedeFileConverter_cfg::e, edm::SortedCollection< T, SORT >::end(), eventHeaderCollection_, eventHeaderProducer_, fedID, fedIDsLas, fedIDsPed, fedIDsTP, headToken_, iBLUE, iEvent, iIR, isFedLasCreated, isFedPedCreated, isFedTPCreated, edm::HandleBase::isValid(), EcalDCCHeaderBlock::LASER_DELAY_SCAN, EcalDCCHeaderBlock::LASER_GAP, EcalDCCHeaderBlock::LASER_POWER_SCAN, EcalDCCHeaderBlock::LASER_STD, laserDelayBlue, laserDelayRed, EcalDCCHeaderBlock::EcalDCCEventSettings::LaserFilter, laserFilterBlue, laserFilterRed, EcalDCCHeaderBlock::EcalDCCEventSettings::LaserPower, laserPowerBlue, laserPowerRed, PNIntegrityClient_cfi::MEMGain, MEMGainLas, MEMGainPed, MEMGainTP, MGPAGainLas, MGPAGainPed, MGPAGainTP, nBlueLas, nEvtsLas, nEvtsPed, nEvtsTP, nRedLas, nSM, EcalDCCHeaderBlock::PEDESTAL_25NS_SCAN, EcalDCCHeaderBlock::PEDESTAL_OFFSET_SCAN, EcalDCCHeaderBlock::PEDESTAL_STD, edm::Handle< T >::product(), runNum, runType, runTypeLas, runTypePed, runTypeTP, EcalTBEventHeader::smInBeam(), EcalDCCHeaderBlock::TESTPULSE_GAP, EcalDCCHeaderBlock::TESTPULSE_MGPA, EcalDCCHeaderBlock::TESTPULSE_SCAN_MEM, RecoSummaryTask_cfi::Time, timeStampBegLas, timeStampBegPed, timeStampBegTP, timeStampCur, timeStampEndLas, timeStampEndPed, timeStampEndTP, and EcalDCCHeaderBlock::EcalDCCEventSettings::wavelength.

65  {
66  //========================================================================
67 
68  ++iEvent;
69 
70  // retrieving DCC header
71  const edm::Handle<EcalRawDataCollection>& pDCCHeader = e.getHandle(dccToken_);
72  const EcalRawDataCollection* DCCHeader = (pDCCHeader.isValid()) ? pDCCHeader.product() : nullptr;
73  if (!pDCCHeader.isValid()) {
74  edm::LogWarning("EcalStatusAnalyzer")
75  << "Error! can't get the product retrieving DCC header " << eventHeaderCollection_.c_str();
76  }
77 
78  // retrieving TB event header
79 
80  const edm::Handle<EcalTBEventHeader>& pEventHeader = e.getHandle(headToken_);
81  const EcalTBEventHeader* evtHeader = (pEventHeader.isValid()) ? pEventHeader.product() : nullptr;
82  if (_dataType == "h4") {
83  if (!pEventHeader.isValid()) {
84  edm::LogWarning("EcalStatusAnalyzer") << "Error! can't get the product " << eventHeaderProducer_.c_str();
85  }
86  timeStampCur = evtHeader->begBurstTimeSec();
87  nSM = evtHeader->smInBeam();
88  }
89 
90  // Get Timestamp
91 
92  edm::Timestamp Time = e.time();
93 
94  if (_dataType != "h4") {
95  timeStampCur = Time.value();
96  }
97 
98  // ====================================
99  // Decode Basic DCCHeader Information
100  // ====================================
101 
102  for (EcalRawDataCollection::const_iterator headerItr = DCCHeader->begin(); headerItr != DCCHeader->end();
103  ++headerItr) {
104  // Get run type and run number
105  runType = headerItr->getRunType();
106  runNum = headerItr->getRunNumber();
107  event = headerItr->getLV1();
108  dccID = headerItr->getDccInTCCCommand();
109  fedID = headerItr->fedId();
110 
111  short VFEGain = headerItr->getMgpaGain();
112  short MEMGain = headerItr->getMemGain();
113 
114  // Retrieve laser color and event number
115 
116  EcalDCCHeaderBlock::EcalDCCEventSettings settings = headerItr->getEventSettings();
117 
118  int laser_color = settings.wavelength;
119  int laser_power = settings.LaserPower;
120  int laser_filter = settings.LaserFilter;
121  int laser_delay = settings.delay;
122  if (laser_color < 0)
123  return;
124  // int laser_ = settings.MEMVinj;
125 
126  bool isLas = false;
127  bool isTP = false;
128  bool isPed = false;
129 
132  isLas = true;
133 
136  isTP = true;
137 
140  isPed = true;
141 
142  // take event only if the fed corresponds to the DCC in TCC
143  // and fill gain stuff with value of 1st event
144 
145  if (600 + dccID != fedID)
146  continue;
147 
148  bool doesExist = false;
149 
150  if ((isFedLasCreated.count(fedID) == 1 && isLas) || (isFedTPCreated.count(fedID) == 1 && isTP) ||
151  (isFedPedCreated.count(fedID) == 1 && isPed))
152  doesExist = true;
153  else if (isLas)
154  isFedLasCreated[fedID] = 1;
155  else if (isTP)
156  isFedTPCreated[fedID] = 1;
157  else if (isPed)
158  isFedPedCreated[fedID] = 1;
159 
160  if (!doesExist) {
161  // create new entry for laser
162 
163  if (isLas) {
164  fedIDsLas.push_back(fedID);
165  dccIDsLas.push_back(dccID);
166 
169 
170  nEvtsLas[fedID] = 1;
172 
173  if (laser_color == iBLUE) {
174  nBlueLas[fedID] = 1;
175  laserPowerBlue[fedID] = laser_power;
176  laserFilterBlue[fedID] = laser_filter;
177  laserDelayBlue[fedID] = laser_delay;
178  } else if (laser_color == iIR) {
179  nRedLas[fedID] = 1;
180  laserPowerRed[fedID] = laser_power;
181  laserFilterRed[fedID] = laser_filter;
182  laserDelayRed[fedID] = laser_delay;
183  }
184 
185  MGPAGainLas[fedID] = VFEGain;
187 
188  }
189 
190  // or create new entry for test-pulse
191  else if (isTP) {
192  fedIDsTP.push_back(fedID);
193  dccIDsTP.push_back(dccID);
194 
195  nEvtsTP[fedID] = 1;
197 
200 
201  MGPAGainTP[fedID] = VFEGain;
203 
204  // or create new entry for pedestal
205 
206  } else if (isPed) {
207  fedIDsPed.push_back(fedID);
208  dccIDsPed.push_back(dccID);
209 
210  nEvtsPed[fedID] = 1;
212 
215 
216  MGPAGainPed[fedID] = VFEGain;
218  }
219 
220  } else {
221  if (isLas) {
222  nEvtsLas[fedID]++;
223  if (laser_color == iBLUE)
224  nBlueLas[fedID]++;
225  else if (laser_color == iIR)
226  nRedLas[fedID]++;
227 
232 
233  } else if (isTP) {
234  nEvtsTP[fedID]++;
239  } else if (isPed) {
240  nEvtsPed[fedID]++;
245  }
246  }
247  }
248 
249 } // analyze
std::map< int, int > nRedLas
std::map< int, int > laserDelayRed
std::vector< int > dccIDsPed
std::map< int, short > MGPAGainLas
std::map< int, int > laserPowerRed
std::map< int, int > runTypePed
std::vector< int > fedIDsTP
std::map< int, unsigned long long > timeStampEndTP
T const * product() const
Definition: Handle.h:70
std::vector< T >::const_iterator const_iterator
const std::string eventHeaderCollection_
std::map< int, unsigned long long > timeStampEndLas
std::map< int, short > MEMGainTP
std::map< int, int > nEvtsLas
std::map< int, unsigned long long > timeStampBegTP
std::map< int, int > isFedLasCreated
std::vector< int > dccIDsTP
std::map< int, short > MEMGainLas
std::map< int, int > isFedPedCreated
std::map< int, unsigned long long > timeStampBegPed
std::map< int, int > nEvtsTP
std::vector< int > fedIDsLas
int begBurstTimeSec() const
Returns the begin burst time (sec)
std::vector< int > fedIDsPed
std::map< int, int > runTypeTP
const std::string eventHeaderProducer_
std::map< int, int > runTypeLas
std::map< int, unsigned long long > timeStampBegLas
std::map< int, int > nBlueLas
short smInBeam() const
Returns the burst number.
std::map< int, int > isFedTPCreated
const_iterator begin() const
std::map< int, int > laserDelayBlue
const std::string _dataType
const_iterator end() const
const edm::EDGetTokenT< EcalTBEventHeader > headToken_
std::map< int, int > laserFilterRed
std::map< int, short > MGPAGainPed
std::map< int, unsigned long long > timeStampEndPed
std::map< int, short > MEMGainPed
bool isValid() const
Definition: HandleBase.h:70
std::map< int, short > MGPAGainTP
std::vector< int > dccIDsLas
unsigned long long timeStampCur
const edm::EDGetTokenT< EcalRawDataCollection > dccToken_
Log< level::Warning, false > LogWarning
std::map< int, int > nEvtsPed
std::map< int, int > laserFilterBlue
std::map< int, int > laserPowerBlue

◆ beginJob()

void EcalStatusAnalyzer::beginJob ( )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 52 of file EcalStatusAnalyzer.cc.

References fedID, nSM, runNum, and runType.

52  {
53  //========================================================================
54 
55  // Initializations
56 
57  nSM = 0;
58  fedID = 0;
59  runType = -999;
60  runNum = -999;
61  event = 0;
62 }

◆ endJob()

void EcalStatusAnalyzer::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 252 of file EcalStatusAnalyzer.cc.

References dccIDsLas, dccIDsPed, dccIDsTP, fedIDsLas, fedIDsPed, fedIDsTP, mps_fire::i, laserDelayBlue, laserDelayRed, laserFilterBlue, laserFilterRed, laserPowerBlue, laserPowerRed, MEMGainLas, MEMGainPed, MEMGainTP, MGPAGainLas, MGPAGainPed, MGPAGainTP, nBlueLas, nEvtsLas, nEvtsPed, nEvtsTP, nRedLas, MillePedeFileConverter_cfg::out, resdir_, runTypeLas, runTypePed, runTypeTP, statusfile_, AlCaHLTBitMon_QueryRunRegistry::string, timeStampBegLas, timeStampBegPed, timeStampBegTP, timeStampEndLas, timeStampEndPed, and timeStampEndTP.

Referenced by o2olib.O2ORunMgr::executeJob().

252  {
253  //========================================================================
254 
255  // Create output status file
256 
257  std::stringstream namefile;
258  namefile << resdir_ << "/" << statusfile_;
259 
260  std::string statusfile = namefile.str();
261 
262  std::ofstream statusFile(statusfile.c_str(), std::ofstream::out);
263 
264  if (!fedIDsLas.empty() && fedIDsLas.size() == dccIDsLas.size()) {
265  statusFile << "+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=" << std::endl;
266  statusFile << " LASER Events " << std::endl;
267  statusFile << "+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=" << std::endl;
268 
269  for (unsigned int i = 0; i < fedIDsLas.size(); i++) {
270  statusFile << "RUNTYPE = " << runTypeLas[fedIDsLas.at(i)] << std::endl;
271  statusFile << "FEDID = " << fedIDsLas.at(i) << std::endl;
272  statusFile << "DCCID = " << dccIDsLas.at(i) << std::endl;
273  statusFile << "TIMESTAMP_BEG = " << timeStampBegLas[fedIDsLas.at(i)] << std::endl;
274  statusFile << "TIMESTAMP_END = " << timeStampEndLas[fedIDsLas.at(i)] << std::endl;
275  statusFile << "MPGA_GAIN = " << MGPAGainLas[fedIDsLas.at(i)] << std::endl;
276  statusFile << "MEM_GAIN = " << MEMGainLas[fedIDsLas.at(i)] << std::endl;
277  statusFile << "EVENTS = " << nEvtsLas[fedIDsLas.at(i)] << std::endl;
278 
279  if (nBlueLas[fedIDsLas.at(i)] > 0) {
280  statusFile << " blue laser events = " << nBlueLas[fedIDsLas.at(i)] << std::endl;
281  statusFile << " blue laser power = " << laserPowerBlue[fedIDsLas.at(i)] << std::endl;
282  statusFile << " blue laser filter = " << laserFilterBlue[fedIDsLas.at(i)] << std::endl;
283  statusFile << " blue laser delay = " << laserDelayBlue[fedIDsLas.at(i)] << std::endl;
284  }
285 
286  if (nRedLas[fedIDsLas.at(i)] > 0) {
287  statusFile << " ired laser events = " << nRedLas[fedIDsLas.at(i)] << std::endl;
288  statusFile << " ired laser power = " << laserPowerRed[fedIDsLas.at(i)] << std::endl;
289  statusFile << " ired laser filter = " << laserFilterRed[fedIDsLas.at(i)] << std::endl;
290  statusFile << " ired laser delay = " << laserDelayRed[fedIDsLas.at(i)] << std::endl;
291  }
292 
293  if (i < fedIDsLas.size() - 1)
294  statusFile << "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" << std::endl;
295  else
296  statusFile << " " << std::endl;
297  }
298  }
299 
300  if (!fedIDsTP.empty() && fedIDsTP.size() == dccIDsTP.size()) {
301  statusFile << "+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=" << std::endl;
302  statusFile << " TESTPULSE Events " << std::endl;
303  statusFile << "+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=" << std::endl;
304 
305  for (unsigned int i = 0; i < fedIDsTP.size(); i++) {
306  statusFile << "RUNTYPE = " << runTypeTP[fedIDsTP.at(i)] << std::endl;
307  statusFile << "FEDID = " << fedIDsTP.at(i) << std::endl;
308  statusFile << "DCCID = " << dccIDsTP.at(i) << std::endl;
309  statusFile << "TIMESTAMP_BEG = " << timeStampBegTP[fedIDsTP.at(i)] << std::endl;
310  statusFile << "TIMESTAMP_END = " << timeStampEndTP[fedIDsTP.at(i)] << std::endl;
311  statusFile << "MPGA_GAIN = " << MGPAGainTP[fedIDsTP.at(i)] << std::endl;
312  statusFile << "MEM_GAIN = " << MEMGainTP[fedIDsTP.at(i)] << std::endl;
313  statusFile << "EVENTS = " << nEvtsTP[fedIDsTP.at(i)] << std::endl;
314  if (i < fedIDsTP.size() - 1)
315  statusFile << "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" << std::endl;
316  else
317  statusFile << " " << std::endl;
318  }
319  }
320 
321  if (!fedIDsPed.empty() && fedIDsPed.size() == dccIDsPed.size()) {
322  statusFile << "+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=" << std::endl;
323  statusFile << " PEDESTAL Events " << std::endl;
324  statusFile << "+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=" << std::endl;
325 
326  for (unsigned int i = 0; i < fedIDsPed.size(); i++) {
327  statusFile << "RUNTYPE = " << runTypePed[fedIDsPed.at(i)] << std::endl;
328  statusFile << "FEDID = " << fedIDsPed.at(i) << std::endl;
329  statusFile << "DCCID = " << dccIDsPed.at(i) << std::endl;
330  statusFile << "TIMESTAMP_BEG = " << timeStampBegPed[fedIDsPed.at(i)] << std::endl;
331  statusFile << "TIMESTAMP_END = " << timeStampEndPed[fedIDsPed.at(i)] << std::endl;
332  statusFile << "MPGA_GAIN = " << MGPAGainPed[fedIDsPed.at(i)] << std::endl;
333  statusFile << "MEM_GAIN = " << MEMGainPed[fedIDsPed.at(i)] << std::endl;
334  statusFile << "EVENTS = " << nEvtsPed[fedIDsPed.at(i)] << std::endl;
335  if (i < fedIDsPed.size() - 1)
336  statusFile << "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" << std::endl;
337  else
338  statusFile << " " << std::endl;
339  }
340  }
341  statusFile << " ... header done" << std::endl;
342 
343  statusFile.close();
344 }
std::map< int, int > nRedLas
std::map< int, int > laserDelayRed
std::vector< int > dccIDsPed
std::map< int, short > MGPAGainLas
std::map< int, int > laserPowerRed
std::map< int, int > runTypePed
std::vector< int > fedIDsTP
std::map< int, unsigned long long > timeStampEndTP
std::map< int, unsigned long long > timeStampEndLas
std::map< int, short > MEMGainTP
std::map< int, int > nEvtsLas
std::map< int, unsigned long long > timeStampBegTP
std::vector< int > dccIDsTP
std::map< int, short > MEMGainLas
std::map< int, unsigned long long > timeStampBegPed
std::map< int, int > nEvtsTP
std::vector< int > fedIDsLas
const std::string statusfile_
std::vector< int > fedIDsPed
std::map< int, int > runTypeTP
std::map< int, int > runTypeLas
std::map< int, unsigned long long > timeStampBegLas
std::map< int, int > nBlueLas
std::map< int, int > laserDelayBlue
std::map< int, int > laserFilterRed
std::map< int, short > MGPAGainPed
std::map< int, unsigned long long > timeStampEndPed
const std::string resdir_
std::map< int, short > MEMGainPed
std::map< int, short > MGPAGainTP
std::vector< int > dccIDsLas
std::map< int, int > nEvtsPed
std::map< int, int > laserFilterBlue
std::map< int, int > laserPowerBlue

Member Data Documentation

◆ _dataType

const std::string EcalStatusAnalyzer::_dataType
private

Definition at line 33 of file EcalStatusAnalyzer.h.

Referenced by analyze().

◆ dccID

int EcalStatusAnalyzer::dccID
private

Definition at line 60 of file EcalStatusAnalyzer.h.

Referenced by analyze().

◆ dccIDsLas

std::vector<int> EcalStatusAnalyzer::dccIDsLas
private

Definition at line 49 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ dccIDsPed

std::vector<int> EcalStatusAnalyzer::dccIDsPed
private

Definition at line 51 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ dccIDsTP

std::vector<int> EcalStatusAnalyzer::dccIDsTP
private

Definition at line 50 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ dccToken_

const edm::EDGetTokenT<EcalRawDataCollection> EcalStatusAnalyzer::dccToken_
private

Definition at line 39 of file EcalStatusAnalyzer.h.

Referenced by analyze().

◆ event

int EcalStatusAnalyzer::event
private

◆ eventHeaderCollection_

const std::string EcalStatusAnalyzer::eventHeaderCollection_
private

Definition at line 37 of file EcalStatusAnalyzer.h.

Referenced by analyze().

◆ eventHeaderProducer_

const std::string EcalStatusAnalyzer::eventHeaderProducer_
private

Definition at line 38 of file EcalStatusAnalyzer.h.

Referenced by analyze().

◆ fedID

int EcalStatusAnalyzer::fedID
private

Definition at line 59 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and beginJob().

◆ fedIDsLas

std::vector<int> EcalStatusAnalyzer::fedIDsLas
private

Definition at line 46 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ fedIDsPed

std::vector<int> EcalStatusAnalyzer::fedIDsPed
private

Definition at line 48 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ fedIDsTP

std::vector<int> EcalStatusAnalyzer::fedIDsTP
private

Definition at line 47 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ headToken_

const edm::EDGetTokenT<EcalTBEventHeader> EcalStatusAnalyzer::headToken_
private

Definition at line 40 of file EcalStatusAnalyzer.h.

Referenced by analyze().

◆ iEvent

int EcalStatusAnalyzer::iEvent
private

Definition at line 31 of file EcalStatusAnalyzer.h.

Referenced by analyze().

◆ isFedLasCreated

std::map<int, int> EcalStatusAnalyzer::isFedLasCreated
private

Definition at line 42 of file EcalStatusAnalyzer.h.

Referenced by analyze().

◆ isFedPedCreated

std::map<int, int> EcalStatusAnalyzer::isFedPedCreated
private

Definition at line 44 of file EcalStatusAnalyzer.h.

Referenced by analyze().

◆ isFedTPCreated

std::map<int, int> EcalStatusAnalyzer::isFedTPCreated
private

Definition at line 43 of file EcalStatusAnalyzer.h.

Referenced by analyze().

◆ laserDelayBlue

std::map<int, int> EcalStatusAnalyzer::laserDelayBlue
private

Definition at line 84 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ laserDelayRed

std::map<int, int> EcalStatusAnalyzer::laserDelayRed
private

Definition at line 88 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ laserFilterBlue

std::map<int, int> EcalStatusAnalyzer::laserFilterBlue
private

Definition at line 83 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ laserFilterRed

std::map<int, int> EcalStatusAnalyzer::laserFilterRed
private

Definition at line 87 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ laserPowerBlue

std::map<int, int> EcalStatusAnalyzer::laserPowerBlue
private

Definition at line 82 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ laserPowerRed

std::map<int, int> EcalStatusAnalyzer::laserPowerRed
private

Definition at line 86 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ MEMGainLas

std::map<int, short> EcalStatusAnalyzer::MEMGainLas
private

Definition at line 74 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ MEMGainPed

std::map<int, short> EcalStatusAnalyzer::MEMGainPed
private

Definition at line 80 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ MEMGainTP

std::map<int, short> EcalStatusAnalyzer::MEMGainTP
private

Definition at line 77 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ MGPAGainLas

std::map<int, short> EcalStatusAnalyzer::MGPAGainLas
private

Definition at line 73 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ MGPAGainPed

std::map<int, short> EcalStatusAnalyzer::MGPAGainPed
private

Definition at line 79 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ MGPAGainTP

std::map<int, short> EcalStatusAnalyzer::MGPAGainTP
private

Definition at line 76 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ nBlueLas

std::map<int, int> EcalStatusAnalyzer::nBlueLas
private

Definition at line 91 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ nEvtsLas

std::map<int, int> EcalStatusAnalyzer::nEvtsLas
private

Definition at line 90 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ nEvtsPed

std::map<int, int> EcalStatusAnalyzer::nEvtsPed
private

Definition at line 98 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ nEvtsTP

std::map<int, int> EcalStatusAnalyzer::nEvtsTP
private

Definition at line 95 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ nRedLas

std::map<int, int> EcalStatusAnalyzer::nRedLas
private

Definition at line 92 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ nSM

int EcalStatusAnalyzer::nSM
private

Definition at line 58 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and beginJob().

◆ resdir_

const std::string EcalStatusAnalyzer::resdir_
private

Definition at line 35 of file EcalStatusAnalyzer.h.

Referenced by endJob().

◆ runNum

int EcalStatusAnalyzer::runNum
private

Definition at line 56 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and beginJob().

◆ runType

int EcalStatusAnalyzer::runType
private

Definition at line 55 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and beginJob().

◆ runTypeLas

std::map<int, int> EcalStatusAnalyzer::runTypeLas
private

Definition at line 93 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ runTypePed

std::map<int, int> EcalStatusAnalyzer::runTypePed
private

Definition at line 99 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ runTypeTP

std::map<int, int> EcalStatusAnalyzer::runTypeTP
private

Definition at line 96 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ statusfile_

const std::string EcalStatusAnalyzer::statusfile_
private

Definition at line 36 of file EcalStatusAnalyzer.h.

Referenced by endJob().

◆ timeStampBegLas

std::map<int, unsigned long long> EcalStatusAnalyzer::timeStampBegLas
private

Definition at line 64 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ timeStampBegPed

std::map<int, unsigned long long> EcalStatusAnalyzer::timeStampBegPed
private

Definition at line 70 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ timeStampBegTP

std::map<int, unsigned long long> EcalStatusAnalyzer::timeStampBegTP
private

Definition at line 67 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ timeStampCur

unsigned long long EcalStatusAnalyzer::timeStampCur
private

Definition at line 62 of file EcalStatusAnalyzer.h.

Referenced by analyze().

◆ timeStampEndLas

std::map<int, unsigned long long> EcalStatusAnalyzer::timeStampEndLas
private

Definition at line 65 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ timeStampEndPed

std::map<int, unsigned long long> EcalStatusAnalyzer::timeStampEndPed
private

Definition at line 71 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().

◆ timeStampEndTP

std::map<int, unsigned long long> EcalStatusAnalyzer::timeStampEndTP
private

Definition at line 68 of file EcalStatusAnalyzer.h.

Referenced by analyze(), and endJob().