test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
CastorMonitorModule Class Reference

#include <CastorMonitorModule.h>

Inheritance diagram for CastorMonitorModule:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 CastorMonitorModule (const edm::ParameterSet &ps)
 
 ~CastorMonitorModule ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &iEvent, const edm::EventSetup &eventSetup)
 
void beginJob ()
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &eventSetup)
 
void beginRun (const edm::Run &iRun, const edm::EventSetup &eventSetup)
 
void CheckCastorStatus (const FEDRawDataCollection &rawraw, const HcalUnpackerReport &report, const CastorElectronicsMap &emap, const CastorDigiCollection &castordigi)
 
void endJob (void)
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &eventSetup)
 
void endRun (const edm::Run &run, const edm::EventSetup &eventSetup)
 
bool prescale ()
 
void reset (void)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
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)
 

Private Attributes

bool actonLS_
 
MonitorElementCastorEventProduct
 
const CastorElectronicsMapCastorReadoutMap_
 
CastorChannelQualitychanquality_
 
bool checkCASTOR_
 
edm::ESHandle< CastorDbServiceconditions_
 
edm::CPUTimer cpu_timer
 
CastorChannelQualityMonitorCQMon_
 
CastorDataIntegrityMonitorDataIntMon_
 
DQMStoredbe_
 
edm::ESHandle< CastorPedestalsdbPedestals
 
std::map< uint32_t,
std::vector< HcalCastorDetId > > 
DCCtoCell
 
CastorDigiMonitorDigiMon_
 
bool digiOK_
 
bool dump2database_
 
bool EDMonOn_
 
CastorMonitorSelectorevtSel_
 
bool fedsListed_
 
float fPedestalNSigmaAverage [14][16]
 
int fVerbosity
 
CastorHIMonitorHIMon_
 
std::map< std::pair< int, int >
, std::vector< HcalCastorDetId > > 
HTRtoCell
 
int ibunch_
 
int ievent_
 
int ievt_
 
int ievt_pre_
 
int ilumisec_
 
edm::InputTag inputLabelBasicJetCASTOR_
 
edm::InputTag inputLabelCastorBasicJets_
 
edm::InputTag inputLabelCastorJetIDs_
 
edm::InputTag inputLabelCastorTowers_
 
edm::InputTag inputLabelDigi_
 
edm::EDGetTokenT
< CastorDigiCollection
inputLabelDigiToken_
 
edm::InputTag inputLabelJetIdCASTOR_
 
edm::InputTag inputLabelRaw_
 
edm::EDGetTokenT
< FEDRawDataCollection
inputLabelRawToken_
 
edm::InputTag inputLabelRecHitCASTOR_
 
edm::EDGetTokenT
< CastorRecHitCollection
inputLabelRecHitCASTORToken_
 
edm::InputTag inputLabelReport_
 
edm::EDGetTokenT
< HcalUnpackerReport
inputLabelReportToken_
 
edm::InputTag inputLabelTowerCASTOR_
 
int irun_
 
int itime_
 
bool jetIdOK_
 
bool jetOK_
 
CastorLEDMonitorLedMon_
 
std::vector< HcalGenericDetIdlistEMap
 
std::ofstream m_logFile
 
MonitorElementmeCASTOR_
 
MonitorElementmeEVT_
 
MonitorElementmeEvtMask_
 
MonitorElementmeFEDS_
 
MonitorElementmeLatency_
 
MonitorElementmeQuality_
 
MonitorElementmeRunType_
 
MonitorElementmeStatus_
 
MonitorElementmeTrigger_
 
std::string monitorName_
 
std::map< HcalCastorDetId,
unsigned int > 
myquality_
 
int nDigi
 
int nevt_
 
int nJet
 
int nJetId
 
int nlumisecs_
 
int nRaw
 
int nRechit
 
int nTower
 
int prescaleEvt_
 
int prescaleLS_
 
int prescaleTime_
 
int prescaleUpdate_
 
CastorPSMonitorPSMon_
 
struct {
   double   elapsedTime
 
   timeval   startTV
 
   double   updateTime
 
   timeval   updateTV
 
   double   vetoTime
 
psTime_
 
bool rawOK_
 
CastorRecHitMonitorRecHitMon_
 
bool rechitOK_
 
bool reportOK_
 
std::string rootFolder_
 
bool saved_
 
bool showTiming_
 
std::map< uint32_t,
std::vector< HcalCastorDetId >
>::iterator 
thisDCC
 
std::map< std::pair< int, int >
, std::vector< HcalCastorDetId >
>::iterator 
thisHTR
 
CastorTowerJetMonitorTowerJetMon_
 
bool towerOK_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 76 of file CastorMonitorModule.h.

Constructor & Destructor Documentation

CastorMonitorModule::CastorMonitorModule ( const edm::ParameterSet ps)

Definition at line 21 of file CastorMonitorModule.cc.

References actonLS_, gather_cfg::cout, CQMon_, DataIntMon_, dbe_, DigiMon_, dump2database_, evtSel_, fedsListed_, fVerbosity, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HIMon_, ibunch_, ievent_, ilumisec_, inputLabelCastorTowers_, inputLabelDigi_, inputLabelDigiToken_, inputLabelRaw_, inputLabelRawToken_, inputLabelRecHitCASTOR_, inputLabelRecHitCASTORToken_, inputLabelReport_, inputLabelReportToken_, irun_, itime_, LedMon_, meEvtMask_, meFEDS_, meQuality_, meRunType_, meStatus_, NULL, cppFunctionSkipper::operator, prescaleEvt_, prescaleLS_, prescaleTime_, prescaleUpdate_, PSMon_, psTime_, RecHitMon_, rootFolder_, DQMStore::setCurrentFolder(), CastorHIMonitor::setup(), CastorRecHitMonitor::setup(), CastorDataIntegrityMonitor::setup(), CastorPSMonitor::setup(), CastorDigiMonitor::setup(), CastorTowerJetMonitor::setup(), CastorChannelQualityMonitor::setup(), CastorLEDMonitor::setup(), showTiming_, AlCaHLTBitMon_QueryRunRegistry::string, and TowerJetMon_.

22  {
23 
24 
26  inputLabelRaw_ = ps.getParameter<edm::InputTag>("rawLabel");
27  inputLabelReport_ = ps.getParameter<edm::InputTag>("unpackerReportLabel");
28  inputLabelDigi_ = ps.getParameter<edm::InputTag>("digiLabel");
29  inputLabelRecHitCASTOR_ = ps.getParameter<edm::InputTag>("CastorRecHitLabel");
30  inputLabelCastorTowers_ = ps.getParameter<edm::InputTag>("CastorTowerLabel");
31  fVerbosity = ps.getUntrackedParameter<int>("debug", 0); //-- show debug
32  showTiming_ = ps.getUntrackedParameter<bool>("showTiming", false); //-- show CPU time
33  dump2database_ = ps.getUntrackedParameter<bool>("dump2database",false); //-- dumps output to database file
34 
35  if(fVerbosity>0) std::cout << "CastorMonitorModule Constructor (start)" << std::endl;
36 
38  irun_=0;
39  ilumisec_=0;
40  ievent_=0;
41  itime_=0;
42  ibunch_=0;
43  actonLS_=false;
44 
45  meStatus_=0; meRunType_=0;
46  meEvtMask_=0; meFEDS_=0;
47  // meLatency_=0; // PK: eliminate - proposed change from reproducibility tests; is it needed?
48  meQuality_=0;
49  fedsListed_ = false;
50 
51  DigiMon_ = NULL;
52  RecHitMon_ = NULL;
53  CQMon_ = NULL;
54  HIMon_ = NULL;
55  PSMon_ = NULL;
56  //I think Event products is done by default
58  DataIntMon_ = NULL;
59 
60  LedMon_ = NULL; //not used for the time being
61 
64 
67 
68  //set Tokens
69  inputLabelRawToken_ = consumes<FEDRawDataCollection>(ps.getParameter<edm::InputTag>("rawLabel"));
70  inputLabelReportToken_ = consumes<HcalUnpackerReport>(ps.getParameter<edm::InputTag>("unpackerReportLabel"));
71  inputLabelDigiToken_ = consumes<CastorDigiCollection>(ps.getParameter<edm::InputTag>("digiLabel"));
72  inputLabelRecHitCASTORToken_ = consumes<CastorRecHitCollection>(ps.getParameter<edm::InputTag>("CastorRecHitLabel"));
73 
74  //---------------------- DigiMonitor ----------------------//
75  if ( ps.getUntrackedParameter<bool>("DigiMonitor", false) ) {
76  if(fVerbosity>0) std::cout << "CastorMonitorModule: Digi monitor flag is on...." << std::endl;
78  DigiMon_->setup(ps, dbe_);
79  }
80  //------------------------------------------------------------//
81 
83  if ( ps.getUntrackedParameter<bool>("RecHitMonitor", false) ) {
84  if(fVerbosity>0) std::cout << "CastorMonitorModule: RecHit monitor flag is on...." << std::endl;
86  RecHitMon_->setup(ps, dbe_);
87  }
88  //-------------------------------------------------------------//
89 
91  if ( ps.getUntrackedParameter<bool>("ChannelQualityMonitor", false) ) {
92  if(fVerbosity>0) std::cout << "CastorChannelQualityMonitor: CQ monitor flag is on...." << std::endl;
94  CQMon_->setup(ps, dbe_);
95  }
96  //-------------------------------------------------------------//
97 
99  if ( ps.getUntrackedParameter<bool>("HIMonitor", false) ) {
100  if(fVerbosity>0) std::cout << "CastorMonitorModule: HI monitor flag is on...." << std::endl;
101  HIMon_ = new CastorHIMonitor();
102  HIMon_->setup(ps, dbe_);
103  }
104  //-------------------------------------------------------------//
105 
106  //---------------------- PSMonitor ----------------------//
107  if ( ps.getUntrackedParameter<bool>("PSMonitor", false) ) {
108  if(fVerbosity>0) std::cout << "CastorMonitorModule: PS monitor flag is on...." << std::endl;
109  PSMon_ = new CastorPSMonitor();
110  PSMon_->setup(ps, dbe_);
111  }
112  //------------------------------------------------------------//
113 
114 
115  //---------------------- Tower Jet Monitor --------------------//
116  if ( ps.getUntrackedParameter<bool>("TowerJetMonitor", false) ) {
117  if(fVerbosity>0) std::cout << "CastorMonitorModule: Tower Jet monitor flag is on...." << std::endl;
119  TowerJetMon_->setup(ps, dbe_);
120  }
121  //------------------------------------------------------------//
122 
123 //---------------------- Data Integrity Monitor ----------------------//
124  if ( ps.getUntrackedParameter<bool>("DataIntMonitor", false) ) {
125  if(fVerbosity>0) std::cout << "CastorMonitorModule: Data Integrity Monitor flag is on...." << std::endl;
127  DataIntMon_->setup(ps, dbe_);
128  }
129  //------------------------------------------------------------//
130 
131  // take it away for the time being
133  if ( ps.getUntrackedParameter<bool>("LEDMonitor", false) ) {
134  if(fVerbosity>0) std::cout << "CastorMonitorModule: LED monitor flag is on...." << std::endl;
135  LedMon_ = new CastorLEDMonitor();
136  LedMon_->setup(ps, dbe_);
137  }
138  //-------------------------------------------------------------//
139 
140 
141 
143 
145  prescaleEvt_ = ps.getUntrackedParameter<int>("diagnosticPrescaleEvt", -1);
146  if(fVerbosity>1) std::cout << "===>CastorMonitor event prescale = " << prescaleEvt_ << " event(s)"<< std::endl;
147 
148  prescaleLS_ = ps.getUntrackedParameter<int>("diagnosticPrescaleLS", -1);
149  if(fVerbosity>1) std::cout << "===>CastorMonitor lumi section prescale = " << prescaleLS_ << " lumi section(s)"<< std::endl;
150  if (prescaleLS_>0) actonLS_=true;
151 
152  prescaleUpdate_ = ps.getUntrackedParameter<int>("diagnosticPrescaleUpdate", -1);
153  if(fVerbosity>1) std::cout << "===>CastorMonitor update prescale = " << prescaleUpdate_ << " update(s)"<< std::endl;
154 
155  prescaleTime_ = ps.getUntrackedParameter<int>("diagnosticPrescaleTime", -1);
156  if(fVerbosity>1) std::cout << "===>CastorMonitor time prescale = " << prescaleTime_ << " minute(s)"<< std::endl;
157 
159  std::string subsystemname = ps.getUntrackedParameter<std::string>("subSystemFolder", "Castor") ;
160  if(fVerbosity>1) std::cout << "===>CastorMonitor name = " << subsystemname << std::endl;
161  rootFolder_ = subsystemname + "/";
162 
163  if ( dbe_ != NULL ){
165  }
166 
167 
168  gettimeofday(&psTime_.updateTV,NULL);
170  psTime_.updateTime = (psTime_.updateTV.tv_sec*1000.0+psTime_.updateTV.tv_usec/1000.0);
171  psTime_.updateTime /= 1000.0;
172  psTime_.elapsedTime=0;
173  psTime_.vetoTime=psTime_.updateTime;
174 
175  if(fVerbosity>0) std::cout << "CastorMonitorModule Constructor (end)" << std::endl;
176 
177 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meQuality_
edm::InputTag inputLabelCastorTowers_
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
edm::EDGetTokenT< CastorRecHitCollection > inputLabelRecHitCASTORToken_
CastorLEDMonitor * LedMon_
#define NULL
Definition: scimark2.h:8
MonitorElement * meRunType_
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
edm::InputTag inputLabelRaw_
edm::InputTag inputLabelDigi_
CastorTowerJetMonitor * TowerJetMon_
edm::InputTag inputLabelRecHitCASTOR_
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
edm::InputTag inputLabelReport_
CastorMonitorSelector * evtSel_
CastorDigiMonitor * DigiMon_
struct CastorMonitorModule::@276 psTime_
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
MonitorElement * meFEDS_
edm::EDGetTokenT< CastorDigiCollection > inputLabelDigiToken_
MonitorElement * meEvtMask_
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
MonitorElement * meStatus_
CastorDataIntegrityMonitor * DataIntMon_
edm::EDGetTokenT< FEDRawDataCollection > inputLabelRawToken_
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
CastorPSMonitor * PSMon_
CastorChannelQualityMonitor * CQMon_
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
CastorRecHitMonitor * RecHitMon_
tuple cout
Definition: gather_cfg.py:121
CastorHIMonitor * HIMon_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
edm::EDGetTokenT< HcalUnpackerReport > inputLabelReportToken_
CastorMonitorModule::~CastorMonitorModule ( )

Definition at line 183 of file CastorMonitorModule.cc.

183  {
184 
185 // if (dbe_){
186 // if(DigiMon_!=NULL) { DigiMon_->clearME();}
187 // if(RecHitMon_!=NULL) { RecHitMon_->clearME();}
188 // if(LedMon_!=NULL) { LedMon_->clearME();}
189 // if(PSMon_!=NULL) { LedMon_->clearME();}
190 // if(HIMon_!=NULL) { HIMon_->clearME();}
191 // dbe_->setCurrentFolder(rootFolder_);
192 // dbe_->removeContents();
193 // }
194 //
195 // if(DigiMon_!=NULL) { delete DigiMon_; DigiMon_=NULL; }
196 // if(RecHitMon_!=NULL) { delete RecHitMon_; RecHitMon_=NULL; }
197 // if(HIMon_!=NULL) { delete HIMon_; HIMon_=NULL; }
198 // if(LedMon_!=NULL) { delete LedMon_; LedMon_=NULL; }
199 // delete evtSel_; evtSel_ = NULL;
200 
201 }

Member Function Documentation

void CastorMonitorModule::analyze ( const edm::Event iEvent,
const edm::EventSetup eventSetup 
)
protectedvirtual

Implements edm::EDAnalyzer.

Definition at line 409 of file CastorMonitorModule.cc.

References edm::EventBase::bunchCrossing(), CastorEventProduct, conditions_, gather_cfg::cout, cpu_timer, edm::CPUTimer::cpuTime(), CQMon_, DataIntMon_, dbe_, DigiMon_, digiOK_, DO_CASTOR_PED_CALIBMON, DO_CASTOR_RECHITMON, edm::EventID::event(), f, fedsListed_, MonitorElement::Fill(), fPedestalNSigmaAverage, fVerbosity, edm::EventSetup::get(), edm::Event::getByToken(), MonitorElement::getTH2F(), HIMon_, ibunch_, edm::EventBase::id(), ievent_, ievt_, ievt_pre_, ilumisec_, inputLabelDigiToken_, inputLabelRawToken_, inputLabelRecHitCASTORToken_, inputLabelReportToken_, irun_, itime_, LedMon_, listEMap, edm::EventBase::luminosityBlock(), meEVT_, meEvtMask_, meFEDS_, meStatus_, nevt_, NULL, prescale(), CastorRecHitMonitor::processEvent(), CastorHIMonitor::processEvent(), CastorDataIntegrityMonitor::processEvent(), CastorPSMonitor::processEvent(), CastorDigiMonitor::processEvent(), CastorChannelQualityMonitor::processEvent(), CastorLEDMonitor::processEvent(), PSMon_, rawOK_, RecHitMon_, rechitOK_, zeeHLT_cff::report, edm::CPUTimer::reset(), edm::EventID::run(), showTiming_, edm::CPUTimer::start(), edm::CPUTimer::stop(), edm::EventBase::time(), TowerJetMon_, and edm::Timestamp::value().

410  {
411  if (fVerbosity>0) std::cout <<" "<<std::endl;
412  if (fVerbosity>0) std::cout <<"CastorMonitorModule::analyze (start)"<<std::endl;
413 
414  using namespace edm;
415 
416 
418  irun_ = iEvent.id().run();
419  ilumisec_ = iEvent.luminosityBlock();
420  ievent_ = iEvent.id().event();
421  itime_ = iEvent.time().value();
422  ibunch_ = iEvent.bunchCrossing();
423 
424 
425  if (fVerbosity>1) {
426  std::cout << "==> CastorMonitorModule: evts: "<< nevt_ << ", run: " << irun_ << ", LS: " << ilumisec_ << std::endl;
427  std::cout << " evt: " << ievent_ << ", time: " << itime_ <<"\t counter = "<< ievt_pre_<< "\t total count = "<<ievt_<<std::endl;
428  }
429 
431  ievt_++;
432 
434  ievt_pre_++; // need to increment counter before calling prescale
435  if(prescale()) return;
436 
437 
438  // meLatency_->Fill(psTime_.elapsedTime);
439 
440 
442  // add in DO_HCAL_TPMON, DO_HCAL_CTMON ?(in CastorMonitorSelector.h)
443  /* FIX
444  // int trigMask=0;
445  if(mtccMon_==NULL){
446  evtSel_->processEvent(e);
447  evtMask = evtSel_->getEventMask();
448  // trigMask = evtSel_->getTriggerMask();
449  }
450  */
451  if ( dbe_ ){
452  meStatus_->Fill(1);
453  meEvtMask_->Fill(evtMask);
454  }
455 
457  bool rawOK_ = true;
458  bool digiOK_ = true;
459  bool rechitOK_ = true;
460 
461  //-- TAKE IT AWAY for the time being
464  iEvent.getByToken(inputLabelRawToken_, RawData);
465  if (!RawData.isValid()) {
466  rawOK_=false;
467  if (fVerbosity>0) std::cout << "RAW DATA NOT FOUND!" << std::endl;
468  }
469 
470 
473  if (!report.isValid()) {
474  rawOK_=false;
475  if (fVerbosity>0) std::cout << "UNPACK REPORT HAS FAILED!" << std::endl;
476  }
477  else
478  {
479  if(!fedsListed_){
480  const std::vector<int> feds = (*report).getFedsUnpacked();
481  for(unsigned int f=0; f<feds.size(); f++){
482  meFEDS_->Fill(feds[f]);
483  }
484  fedsListed_ = true;
485  }
486  }
487 
488  //---------------------------------------------------------------//
489  //------------------- try to get digis ------------------------//
490  //---------------------------------------------------------------//
491 
493  iEvent.getByToken(inputLabelDigiToken_, CastorDigi);
494  if (!CastorDigi.isValid()) {
495  digiOK_=false;
496  if (fVerbosity>0) std::cout << "DIGI DATA NOT FOUND!" << std::endl;
497  }
498 
499 
500 
503  //if ( checkCASTOR_ )
504  // CheckCastorStatus(*RawData,*report,*readoutMap_,*CastorDigi);
505 
506 
507  //---------------------------------------------------------------//
508  //------------------- try to get RecHits ------------------------//
509  //---------------------------------------------------------------//
511  iEvent.getByToken(inputLabelRecHitCASTORToken_, CastorHits);
512  if (!CastorHits.isValid()) {
513  rechitOK_ = false;
514  if (fVerbosity>0) std::cout << "RECO DATA NOT FOUND!" << std::endl;
515  }
516 
517 
519  if(ievt_%10 == 0) {
520 
521  TH2F* hCastorEventProduct=CastorEventProduct->getTH2F();
522  hCastorEventProduct->SetBinContent(1,1,int(rawOK_));
523  hCastorEventProduct->SetBinContent(2,1,int(digiOK_));
524  hCastorEventProduct->SetBinContent(3,1,int(rechitOK_));
525 
526  if(fVerbosity>1) {
527  std::cout << " RAW Data ==> " << rawOK_<< std::endl;
528  std::cout << " Digis ==> " << digiOK_<< std::endl;
529  std::cout << " RecHits ==> " << rechitOK_<< std::endl;
530  }
531 
532  }
533 
534  //------------------------------------------------------------//
535  //---------------- Run the configured tasks ------------------//
536  //-------------- protect against missing products -----------//
537  //-----------------------------------------------------------//
538 
539  if (showTiming_){
541  }
542 
543  //----------------- Digi monitor task ------------------//
544  // if((DigiMon_!=NULL) && (evtMask&DO_CASTOR_PED_CALIBMON) && digiOK_)
545  if(digiOK_) DigiMon_->processEvent(*CastorDigi,*conditions_);
546  if (showTiming_){
547  cpu_timer.stop();
548  if (DigiMon_!=NULL) std::cout <<"TIMER:: DIGI MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
550  }
551 
552 
553  //----------------- Rec Hit monitor task -------------------------//
554  // if((RecHitMon_ != NULL) && (evtMask&DO_CASTOR_RECHITMON) && rechitOK_)
555  if(rechitOK_) RecHitMon_->processEvent(*CastorHits);
556  if (showTiming_){
557  cpu_timer.stop();
558  if (RecHitMon_!=NULL) std::cout <<"TIMER:: RECHIT MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
560  }
561 
562  //----------------- Channel Quality Monitor task -------------------------//
563  if(rechitOK_) CQMon_->processEvent(*CastorHits);
564  if (showTiming_){
565  cpu_timer.stop();
566  if (CQMon_!=NULL) std::cout <<"TIMER:: CHANNELQUALITY MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
568  }
569 
571 
573  eventSetup.get<CastorElectronicsMapRcd>().get(refEMap);
574  const CastorElectronicsMap* myRefEMap = refEMap.product();
575  listEMap = myRefEMap->allPrecisionId();
576 
577 //----------------- Heavy Ion monitor task -------------------------//
578  if(rechitOK_ && digiOK_ ) HIMon_->processEvent(*CastorHits, *CastorDigi, *conditions_);
579  if (showTiming_){
580  cpu_timer.stop();
581  if (HIMon_!=NULL) std::cout <<"TIMER:: HI MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
583  }
584 
585 //----------------- PS monitor task -------------------------//
587  if (showTiming_) {
588  cpu_timer.stop();
589  if (PSMon_!=NULL) std::cout <<"TIMER:: PULSE SHAPE ->"<<cpu_timer.cpuTime()<<std::endl;
591  }
592 
593 //----------------- PS monitor task -------------------------//
594 // if(rechitOK_ && digiOK_ ) PSMon_->processEvent(*CastorDigi, *conditions_, listEMap, ibunch_, fPedestalNSigmaAverage);
595 
596 
597 //----------------- Tower Jet monitor task -------------------------//
598 
599  if(rechitOK_)
600  {
601  if (showTiming_){
602  cpu_timer.stop();
603  if (TowerJetMon_!=NULL) std::cout <<"TIMER:: TOWER JET MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
605  }
606  }
607 
608 
609 
610 
611 //----------------- Data Integrity monitor task -------------------------//
612  if(rechitOK_ && digiOK_ ) DataIntMon_->processEvent(*RawData, *report, *myRefEMap);
613  if (showTiming_){
614  cpu_timer.stop();
615  if (DataIntMon_!=NULL) std::cout <<"TIMER:: DATA INTEGRITY MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
617  }
618 
619 
621 
622  //---------------- LED monitor task ------------------------//
623  // if((LedMon_!=NULL) && (evtMask&DO_HCAL_LED_CALIBMON) && digiOK_)
624  if(digiOK_) LedMon_->processEvent(*CastorDigi,*conditions_);
625  if (showTiming_){
626  cpu_timer.stop();
627  if (LedMon_!=NULL) std::cout <<"TIMER:: LED MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
629  }
630 
631  //---------------- Pulse Shape monitor task ------------------------//
632 
633  if(fVerbosity>1 && ievt_%100 == 0)
634  std::cout << "CastorMonitorModule: processed " << ievt_ << " events" << std::endl;
635 
636 
638  meEVT_->Fill(ievt_);
639 
640  if (fVerbosity>0) std::cout <<"CastorMonitorModule::analyze (end)"<<std::endl;
641 
642  return;
643  }
RunNumber_t run() const
Definition: EventID.h:42
EventNumber_t event() const
Definition: EventID.h:44
void processEvent(const CastorRecHitCollection &castorHits, const CastorDigiCollection &cast, const CastorDbService &cond)
void start()
Definition: CPUTimer.cc:74
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
void processEvent(const CastorDigiCollection &castorDigis, const CastorDbService &conditions, const std::vector< HcalGenericDetId > &listEMap, int iBunch, float PedSigmaInChannel[14][16])
edm::EDGetTokenT< CastorRecHitCollection > inputLabelRecHitCASTORToken_
edm::ESHandle< CastorDbService > conditions_
int bunchCrossing() const
Definition: EventBase.h:62
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
CastorLEDMonitor * LedMon_
void reset()
Definition: CPUTimer.cc:107
#define NULL
Definition: scimark2.h:8
void Fill(long long x)
tuple report
Definition: zeeHLT_cff.py:9
static const int DO_CASTOR_RECHITMON
CastorTowerJetMonitor * TowerJetMon_
std::vector< HcalGenericDetId > listEMap
void processEvent(const CastorDigiCollection &cast, const CastorDbService &cond)
double f[11][100]
CastorDigiMonitor * DigiMon_
Times stop()
Definition: CPUTimer.cc:94
MonitorElement * meFEDS_
edm::EDGetTokenT< CastorDigiCollection > inputLabelDigiToken_
MonitorElement * meEvtMask_
MonitorElement * meStatus_
double cpuTime() const
Definition: CPUTimer.cc:158
CastorDataIntegrityMonitor * DataIntMon_
void processEvent(const CastorRecHitCollection &castorHits)
const T & get() const
Definition: EventSetup.h:55
edm::EDGetTokenT< FEDRawDataCollection > inputLabelRawToken_
void processEvent(const FEDRawDataCollection &RawData, const HcalUnpackerReport &report, const CastorElectronicsMap &emap)
static const int DO_CASTOR_PED_CALIBMON
MonitorElement * CastorEventProduct
edm::EventID id() const
Definition: EventBase.h:56
CastorPSMonitor * PSMon_
CastorChannelQualityMonitor * CQMon_
void processEvent(const CastorDigiCollection &cast, const CastorDbService &cond)
float fPedestalNSigmaAverage[14][16]
CastorRecHitMonitor * RecHitMon_
tuple cout
Definition: gather_cfg.py:121
void processEvent(const CastorRecHitCollection &castorHits)
TH2F * getTH2F(void) const
CastorHIMonitor * HIMon_
TimeValue_t value() const
Definition: Timestamp.h:56
edm::Timestamp time() const
Definition: EventBase.h:57
MonitorElement * meEVT_
edm::EDGetTokenT< HcalUnpackerReport > inputLabelReportToken_
void CastorMonitorModule::beginJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 207 of file CastorMonitorModule.cc.

References gather_cfg::cout, fVerbosity, ievt_, and ievt_pre_.

208  {
209  if (fVerbosity>0) std::cout << " " << std::endl;
210  if (fVerbosity>0) std::cout << "CastorMonitorModule::beginJob (start)" << std::endl;
211 
212  ievt_ = 0;
213  ievt_pre_=0;
214 
215  if (fVerbosity>0) std::cout << "CastorMonitorModule::beginJob (end)" << std::endl;
216 
217  return;
218 }
tuple cout
Definition: gather_cfg.py:121
void CastorMonitorModule::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup eventSetup 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 317 of file CastorMonitorModule.cc.

References actonLS_, and prescale().

318  {
319 
320  if(actonLS_ && !prescale()){
322  }
323 }
void CastorMonitorModule::beginRun ( const edm::Run iRun,
const edm::EventSetup eventSetup 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 224 of file CastorMonitorModule.cc.

References CastorRecHitMonitor::beginRun(), CastorHIMonitor::beginRun(), CastorDataIntegrityMonitor::beginRun(), CastorPSMonitor::beginRun(), CastorDigiMonitor::beginRun(), CastorTowerJetMonitor::beginRun(), CastorChannelQualityMonitor::beginRun(), CastorLEDMonitor::beginRun(), DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookInt(), CastorEventProduct, conditions_, gather_cfg::cout, CQMon_, DataIntMon_, dbe_, dbPedestals, DigiMon_, fedsListed_, MonitorElement::Fill(), fPedestalNSigmaAverage, fVerbosity, edm::EventSetup::get(), MonitorElement::getTH2F(), CastorPedestal::getWidth(), HIMon_, edm::ESHandleBase::isValid(), LedMon_, meCASTOR_, meEVT_, meEvtMask_, meFEDS_, meQuality_, meRunType_, meStatus_, HcalCastorDetId::module(), NULL, PSMon_, RecHitMon_, reset(), rootFolder_, HcalCastorDetId::sector(), DQMStore::setCurrentFolder(), mathSSE::sqrt(), and TowerJetMon_.

225  {
226  if (fVerbosity>0) std::cout <<" "<<std::endl;
227  if (fVerbosity>0) std::cout << "CastorMonitorModule::beginRun (start)" << std::endl;
228 
229  fedsListed_ = false;
230  reset();
231 
232  if ( dbe_ != NULL )
233  {
234 
236  dbe_->setCurrentFolder(rootFolder_+"CastorEventProducts");
237  meEVT_ = dbe_->bookInt("Event Number");
238  CastorEventProduct =dbe_->book2D("CastorEventProduct","CastorEventProduct",3,0,3,1,0,1);
239  TH2F* hCastorEventProduct =CastorEventProduct->getTH2F();
240  hCastorEventProduct->GetXaxis()->SetBinLabel(1,"RawData");
241  hCastorEventProduct->GetXaxis()->SetBinLabel(2,"CastorDigi");
242  hCastorEventProduct->GetXaxis()->SetBinLabel(3,"CastorRecHits");
243  hCastorEventProduct->GetYaxis()->SetBinLabel(1,"Status");
244  hCastorEventProduct->SetBinContent(1,1,-1);
245  hCastorEventProduct->SetBinContent(2,1,-1);
246  hCastorEventProduct->SetBinContent(3,1,-1);
247  hCastorEventProduct->SetOption("textcolz");
248 
249  dbe_->setCurrentFolder(rootFolder_+"DQM Job Status" );
250  meStatus_ = dbe_->bookInt("STATUS");
251  meRunType_ = dbe_->bookInt("RUN TYPE");
252  meEvtMask_ = dbe_->bookInt("EVT MASK");
253  meFEDS_ = dbe_->book1D("FEDs Unpacked","FEDs Unpacked",100,660,759);
254  meCASTOR_ = dbe_->bookInt("CASTORpresent");
256  // meLatency_ = dbe_->book1D("Process Latency","Process Latency",2000,0,10); // PK: eliminate
257  meQuality_ = dbe_->book1D("Quality Status","Quality Status",100,0,1);
258  meStatus_->Fill(0);
259  meRunType_->Fill(-1);
260  meEvtMask_->Fill(-1);
262  meCASTOR_->Fill(0);
263  }
264  else{
265  if(fVerbosity>0) std::cout << "CastorMonitorModule::beginRun - NO DQMStore service" << std::endl;
266  }
267 
268 
269 // beginRun initiations for all modules
270  if (DigiMon_ != NULL) { DigiMon_->beginRun(iSetup); }
271  if (RecHitMon_ != NULL) { RecHitMon_->beginRun(iSetup); }
272  if (CQMon_ != NULL) { CQMon_->beginRun(iRun, iSetup); }
273  if (HIMon_ != NULL) { HIMon_->beginRun(iSetup); }
274  if (PSMon_ != NULL) { PSMon_->beginRun(iRun, iSetup); }
275  if (TowerJetMon_!= NULL) { TowerJetMon_->beginRun(iRun, iSetup); }
276  if (DataIntMon_ != NULL) { DataIntMon_->beginRun(iSetup); }
277 
278  if (LedMon_ != NULL) { LedMon_->beginRun(iSetup); }
279 
281  iSetup.get<CastorDbRecord>().get(conditions_);
282 
284  iSetup.get<CastorPedestalsRcd>().get(dbPedestals);
285  if(!dbPedestals.isValid() && fVerbosity>0) std::cout << "CASTOR has no CastorPedestals in the CondDB !!!" << std::endl;
286 
288  float sigma_averaged;
289  unsigned int iChannel = 0;
290  std::vector<DetId> channels = dbPedestals->getAllChannels();
291 
293  for (std::vector<DetId>::iterator ch=channels.begin(); ch!=channels.end(); ch++) {
294  const CastorPedestal * pedestals_mean = dbPedestals->getValues(*ch);
295  sigma_averaged = 0.;
296 
298  for (short unsigned int iCapId = 0; iCapId < 4; iCapId++){
299  sigma_averaged += sqrt(pedestals_mean->getWidth(iCapId));
300  };
301 
303  fPedestalNSigmaAverage[HcalCastorDetId(*ch).module()-1][HcalCastorDetId(*ch).sector()-1] = sigma_averaged/4;
304  iChannel++;
305  };
306 
307  if(iChannel<224 && fVerbosity>0) std::cout << "There are less that 224 channels in CastorPedestalsRcd record !!!" << std::endl;
308 
309  if(fVerbosity>0) std::cout << "CastorMonitorModule::beginRun (end)" << std::endl;
310 
311  return;
312 }
MonitorElement * meCASTOR_
MonitorElement * meQuality_
int sector() const
get the sector (1-16)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:954
void beginRun(const edm::Run &iRun, const edm::EventSetup &iSetup)
void beginRun(const edm::EventSetup &iSetup)
edm::ESHandle< CastorDbService > conditions_
void beginRun(const edm::Run &iRun, const edm::EventSetup &iSetup)
CastorLEDMonitor * LedMon_
#define NULL
Definition: scimark2.h:8
MonitorElement * meRunType_
int module() const
get the module (1-2 for EM, 1-12 for HAD)
edm::ESHandle< CastorPedestals > dbPedestals
float getWidth(int fCapId) const
get width for capId = 0..3
void beginRun(const edm::EventSetup &iSetup)
void beginRun(const edm::Run &iRun, const edm::EventSetup &iSetup)
void Fill(long long x)
CastorTowerJetMonitor * TowerJetMon_
T sqrt(T t)
Definition: SSEVec.h:48
CastorDigiMonitor * DigiMon_
MonitorElement * meFEDS_
MonitorElement * meEvtMask_
void beginRun(const edm::EventSetup &iSetup)
MonitorElement * meStatus_
CastorDataIntegrityMonitor * DataIntMon_
void beginRun(const edm::EventSetup &iSetup)
MonitorElement * CastorEventProduct
CastorPSMonitor * PSMon_
CastorChannelQualityMonitor * CQMon_
void beginRun(const edm::EventSetup &iSetup)
float fPedestalNSigmaAverage[14][16]
CastorRecHitMonitor * RecHitMon_
tuple cout
Definition: gather_cfg.py:121
TH2F * getTH2F(void) const
bool isValid() const
Definition: ESHandle.h:37
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:861
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1082
CastorHIMonitor * HIMon_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
MonitorElement * meEVT_
void CastorMonitorModule::CheckCastorStatus ( const FEDRawDataCollection rawraw,
const HcalUnpackerReport report,
const CastorElectronicsMap emap,
const CastorDigiCollection castordigi 
)
protected

Definition at line 711 of file CastorMonitorModule.cc.

716 {
717 
719  //vector<int> fedUnpackList;
721  // for (int i=FEDNumbering::getHcalFEDIds().first; i<=FEDNumbering::getHcalFEDIds().second; i++)
722  // {
723  // fedUnpackList.push_back(i);
724  // }
725  // for (std::vector<int>::const_iterator i=fedUnpackList.begin(); i!=fedUnpackList.end();++i)
726  // {
727  // const FEDRawData& fed = RawData.FEDData(*i);
728  // if (fed.size()<12) continue; //-- Was 16 !
730  // const HcalDCCHeader* dccHeader=(const HcalDCCHeader*)(fed.data());
731  // if (!dccHeader) return;
732  // int dccid=dccHeader->getSourceId();
733 
735  // ////---- Castor FED numbering of DCCs= [690 -693]
736  // if (dccid >= 690 && dccid <=693){
737  // if ( CastorDigi.size()>0){
738  // meCASTOR_->Fill(1);
739  // }
740  // else {meCASTOR_->Fill(0); }
741  // }
742  // else{ meCASTOR_->Fill(-1); }
743  // }
744  return;
745 }
void CastorMonitorModule::endJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 355 of file CastorMonitorModule.cc.

References gather_cfg::cout, CQMon_, DataIntMon_, DigiMon_, CastorDigiMonitor::done(), CastorTowerJetMonitor::done(), CastorBaseMonitor::done(), CastorLEDMonitor::done(), fVerbosity, HIMon_, LedMon_, NULL, PSMon_, RecHitMon_, and TowerJetMon_.

356  {
357  if (fVerbosity>0) std::cout <<"CastorMonitorModule::endJob (start)"<<std::endl;
358 
359  //if ( meStatus_ ) meStatus_->Fill(2);
360 
361  if(DigiMon_!=NULL) DigiMon_->done();
362  if(RecHitMon_!=NULL) RecHitMon_->done();
363  if(CQMon_!=NULL) CQMon_->done();
364  if(HIMon_!=NULL) HIMon_->done();
365  if(PSMon_!=NULL) PSMon_->done();
367  if(DataIntMon_!=NULL) DataIntMon_ ->done();
368 
369  if(LedMon_!=NULL) LedMon_->done();
370 
371  /* LEAVE IT OUT FOR THE MOMENT
372  // TO DUMP THE OUTPUT TO DATABASE FILE
373  if (dump2database_){
374 
375  }
376  */
377 
378  if (fVerbosity>0) std::cout <<"CastorMonitorModule::endJob (end)"<<std::endl;
379 
380  return;
381 }
CastorLEDMonitor * LedMon_
#define NULL
Definition: scimark2.h:8
CastorTowerJetMonitor * TowerJetMon_
CastorDigiMonitor * DigiMon_
CastorDataIntegrityMonitor * DataIntMon_
CastorPSMonitor * PSMon_
CastorChannelQualityMonitor * CQMon_
CastorRecHitMonitor * RecHitMon_
tuple cout
Definition: gather_cfg.py:121
virtual void done()
CastorHIMonitor * HIMon_
void CastorMonitorModule::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup eventSetup 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 329 of file CastorMonitorModule.cc.

References actonLS_, and prescale().

330  {
331  if(actonLS_ && !prescale()){
333  }
334 }
void CastorMonitorModule::endRun ( const edm::Run run,
const edm::EventSetup eventSetup 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 339 of file CastorMonitorModule.cc.

References gather_cfg::cout, DigiMon_, fVerbosity, and NULL.

340 {
341  if (fVerbosity>0) std::cout <<" "<<std::endl;
342  if (fVerbosity>0) std::cout <<"CastorMonitorModule::endRun (start)"<<std::endl;
343 
345  if (DigiMon_!=NULL) //************ DigiMon_->fillPedestalHistos(); //FIX
346 
347  if (fVerbosity>0) std::cout <<"CastorMonitorModule::endRun (end)"<<std::endl;
348 
349  return;
350 }
#define NULL
Definition: scimark2.h:8
CastorDigiMonitor * DigiMon_
tuple cout
Definition: gather_cfg.py:121
bool CastorMonitorModule::prescale ( )
protected

in seconds

Definition at line 653 of file CastorMonitorModule.cc.

References gather_cfg::cout, fVerbosity, ievent_, ievt_pre_, ilumisec_, NULL, prescaleEvt_, prescaleLS_, prescaleTime_, prescaleUpdate_, psTime_, and cond::rpcobgas::time.

Referenced by analyze(), beginLuminosityBlock(), and endLuminosityBlock().

654  {
655  if (fVerbosity>0) std::cout <<"CastorMonitorModule::prescale (start)"<<std::endl;
656 
657  gettimeofday(&psTime_.updateTV,NULL);
658  double time = (psTime_.updateTV.tv_sec*1000.0+psTime_.updateTV.tv_usec/1000.0);
659  time/= (1000.0);
660  psTime_.elapsedTime = time - psTime_.updateTime;
661  psTime_.updateTime = time;
663  bool evtPS = prescaleEvt_>0;
664  bool lsPS = prescaleLS_>0;
665  bool timePS = prescaleTime_>0;
666  bool updatePS = prescaleUpdate_>0;
667 
669  if(!evtPS && !lsPS && !timePS && !updatePS)
670  {
671  if (fVerbosity>0) std::cout <<"CastorMonitorModule::prescale (end - permature but fine!)"<<std::endl;
672  return false;
673  }
675  if(lsPS && (ilumisec_%prescaleLS_)!=0) lsPS = false; //-- LS veto
676  //if(evtPS && (ievent_%prescaleEvt_)!=0) evtPS = false; //evt # veto
677  if (evtPS && (ievt_pre_%prescaleEvt_)!=0) evtPS = false;
678  if(timePS)
679  {
680  double elapsed = (psTime_.updateTime - psTime_.vetoTime)/60.0;
681  if(elapsed<prescaleTime_){
682  timePS = false; //-- timestamp veto
683  psTime_.vetoTime = psTime_.updateTime;
684  }
685  }
686 
687  // if(prescaleUpdate_>0 && (nupdates_%prescaleUpdate_)==0) updatePS=false; ///need to define what "updates" means
688 
689  if (fVerbosity>1)
690  {
691  std::cout<<"CastorMonitorModule::prescale evt: "<<ievent_<<"/"<<evtPS<<", ";
692  std::cout <<"ls: "<<ilumisec_<<"/"<<lsPS<<",";
693  std::cout <<"time: "<<psTime_.updateTime - psTime_.vetoTime<<"/"<<timePS<<std::endl;
694  }
695 
696  if (fVerbosity>0) std::cout <<"CastorMonitorModule::prescale (end)"<<std::endl;
697 
699  if(evtPS || lsPS || timePS) return false;
700  return true;
701 }
#define NULL
Definition: scimark2.h:8
struct CastorMonitorModule::@276 psTime_
tuple cout
Definition: gather_cfg.py:121
void CastorMonitorModule::reset ( void  )
protected

Definition at line 387 of file CastorMonitorModule.cc.

References gather_cfg::cout, CQMon_, DataIntMon_, DigiMon_, fVerbosity, HIMon_, LedMon_, NULL, PSMon_, RecHitMon_, CastorHIMonitor::reset(), CastorRecHitMonitor::reset(), CastorPSMonitor::reset(), CastorDigiMonitor::reset(), CastorDataIntegrityMonitor::reset(), CastorTowerJetMonitor::reset(), CastorChannelQualityMonitor::reset(), CastorLEDMonitor::reset(), and TowerJetMon_.

Referenced by beginRun().

388  {
389  if (fVerbosity>0) std::cout <<" "<<std::endl;
390  if (fVerbosity>0) std::cout <<"CastorMonitorModule::reset (start)"<<std::endl;
391 
392  if(DigiMon_!=NULL) DigiMon_->reset();
394  if(CQMon_!=NULL) CQMon_->reset();
395  if(HIMon_!=NULL) HIMon_->reset();
396  if(PSMon_!=NULL) PSMon_->reset();
399 
400  if(LedMon_!=NULL) LedMon_->reset();
401 
402  if (fVerbosity>0) std::cout <<"CastorMonitorModule::reset (end)"<<std::endl;
403  }
CastorLEDMonitor * LedMon_
#define NULL
Definition: scimark2.h:8
CastorTowerJetMonitor * TowerJetMon_
CastorDigiMonitor * DigiMon_
CastorDataIntegrityMonitor * DataIntMon_
CastorPSMonitor * PSMon_
CastorChannelQualityMonitor * CQMon_
CastorRecHitMonitor * RecHitMon_
tuple cout
Definition: gather_cfg.py:121
CastorHIMonitor * HIMon_

Member Data Documentation

bool CastorMonitorModule::actonLS_
private
MonitorElement* CastorMonitorModule::CastorEventProduct
private

Definition at line 222 of file CastorMonitorModule.h.

Referenced by analyze(), and beginRun().

const CastorElectronicsMap* CastorMonitorModule::CastorReadoutMap_
private

Definition at line 239 of file CastorMonitorModule.h.

CastorChannelQuality* CastorMonitorModule::chanquality_
private

Definition at line 268 of file CastorMonitorModule.h.

bool CastorMonitorModule::checkCASTOR_
private

Definition at line 255 of file CastorMonitorModule.h.

edm::ESHandle<CastorDbService> CastorMonitorModule::conditions_
private

Definition at line 238 of file CastorMonitorModule.h.

Referenced by analyze(), and beginRun().

edm::CPUTimer CastorMonitorModule::cpu_timer
private

Definition at line 169 of file CastorMonitorModule.h.

Referenced by analyze().

CastorChannelQualityMonitor* CastorMonitorModule::CQMon_
private

Definition at line 228 of file CastorMonitorModule.h.

Referenced by analyze(), beginRun(), CastorMonitorModule(), endJob(), and reset().

CastorDataIntegrityMonitor* CastorMonitorModule::DataIntMon_
private

Definition at line 233 of file CastorMonitorModule.h.

Referenced by analyze(), beginRun(), CastorMonitorModule(), endJob(), and reset().

DQMStore* CastorMonitorModule::dbe_
private

Definition at line 181 of file CastorMonitorModule.h.

Referenced by analyze(), beginRun(), and CastorMonitorModule().

edm::ESHandle<CastorPedestals> CastorMonitorModule::dbPedestals
private

Definition at line 242 of file CastorMonitorModule.h.

Referenced by beginRun().

std::map<uint32_t, std::vector<HcalCastorDetId> > CastorMonitorModule::DCCtoCell
private

Definition at line 209 of file CastorMonitorModule.h.

CastorDigiMonitor* CastorMonitorModule::DigiMon_
private

Definition at line 229 of file CastorMonitorModule.h.

Referenced by analyze(), beginRun(), CastorMonitorModule(), endJob(), endRun(), and reset().

bool CastorMonitorModule::digiOK_
private

Definition at line 153 of file CastorMonitorModule.h.

Referenced by analyze().

bool CastorMonitorModule::dump2database_
private

Definition at line 266 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule().

bool CastorMonitorModule::EDMonOn_
private

Definition at line 263 of file CastorMonitorModule.h.

double CastorMonitorModule::elapsedTime

Definition at line 174 of file CastorMonitorModule.h.

CastorMonitorSelector* CastorMonitorModule::evtSel_
private

Definition at line 226 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule().

bool CastorMonitorModule::fedsListed_
private

Definition at line 190 of file CastorMonitorModule.h.

Referenced by analyze(), beginRun(), and CastorMonitorModule().

float CastorMonitorModule::fPedestalNSigmaAverage[14][16]
private

Definition at line 247 of file CastorMonitorModule.h.

Referenced by analyze(), and beginRun().

int CastorMonitorModule::fVerbosity
private
CastorHIMonitor* CastorMonitorModule::HIMon_
private

Definition at line 232 of file CastorMonitorModule.h.

Referenced by analyze(), beginRun(), CastorMonitorModule(), endJob(), and reset().

std::map<std::pair <int,int> , std::vector<HcalCastorDetId> > CastorMonitorModule::HTRtoCell
private

Definition at line 211 of file CastorMonitorModule.h.

int CastorMonitorModule::ibunch_
private

Definition at line 184 of file CastorMonitorModule.h.

Referenced by analyze(), and CastorMonitorModule().

int CastorMonitorModule::ievent_
private

Definition at line 184 of file CastorMonitorModule.h.

Referenced by analyze(), CastorMonitorModule(), and prescale().

int CastorMonitorModule::ievt_
private

Definition at line 188 of file CastorMonitorModule.h.

Referenced by analyze(), and beginJob().

int CastorMonitorModule::ievt_pre_
private

Definition at line 189 of file CastorMonitorModule.h.

Referenced by analyze(), beginJob(), and prescale().

int CastorMonitorModule::ilumisec_
private

Definition at line 184 of file CastorMonitorModule.h.

Referenced by analyze(), CastorMonitorModule(), and prescale().

edm::InputTag CastorMonitorModule::inputLabelBasicJetCASTOR_
private

Definition at line 197 of file CastorMonitorModule.h.

edm::InputTag CastorMonitorModule::inputLabelCastorBasicJets_
private

Definition at line 200 of file CastorMonitorModule.h.

edm::InputTag CastorMonitorModule::inputLabelCastorJetIDs_
private

Definition at line 201 of file CastorMonitorModule.h.

edm::InputTag CastorMonitorModule::inputLabelCastorTowers_
private

Definition at line 199 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule().

edm::InputTag CastorMonitorModule::inputLabelDigi_
private

Definition at line 194 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule().

edm::EDGetTokenT<CastorDigiCollection> CastorMonitorModule::inputLabelDigiToken_
private

Definition at line 273 of file CastorMonitorModule.h.

Referenced by analyze(), and CastorMonitorModule().

edm::InputTag CastorMonitorModule::inputLabelJetIdCASTOR_
private

Definition at line 198 of file CastorMonitorModule.h.

edm::InputTag CastorMonitorModule::inputLabelRaw_
private

Definition at line 192 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule().

edm::EDGetTokenT<FEDRawDataCollection> CastorMonitorModule::inputLabelRawToken_
private

Definition at line 271 of file CastorMonitorModule.h.

Referenced by analyze(), and CastorMonitorModule().

edm::InputTag CastorMonitorModule::inputLabelRecHitCASTOR_
private

Definition at line 195 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule().

edm::EDGetTokenT<CastorRecHitCollection> CastorMonitorModule::inputLabelRecHitCASTORToken_
private

Definition at line 274 of file CastorMonitorModule.h.

Referenced by analyze(), and CastorMonitorModule().

edm::InputTag CastorMonitorModule::inputLabelReport_
private

Definition at line 193 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule().

edm::EDGetTokenT<HcalUnpackerReport> CastorMonitorModule::inputLabelReportToken_
private

Definition at line 272 of file CastorMonitorModule.h.

Referenced by analyze(), and CastorMonitorModule().

edm::InputTag CastorMonitorModule::inputLabelTowerCASTOR_
private

Definition at line 196 of file CastorMonitorModule.h.

int CastorMonitorModule::irun_
private

Definition at line 184 of file CastorMonitorModule.h.

Referenced by analyze(), and CastorMonitorModule().

int CastorMonitorModule::itime_
private

Definition at line 184 of file CastorMonitorModule.h.

Referenced by analyze(), and CastorMonitorModule().

bool CastorMonitorModule::jetIdOK_
private

Definition at line 157 of file CastorMonitorModule.h.

bool CastorMonitorModule::jetOK_
private

Definition at line 156 of file CastorMonitorModule.h.

CastorLEDMonitor* CastorMonitorModule::LedMon_
private

Definition at line 230 of file CastorMonitorModule.h.

Referenced by analyze(), beginRun(), CastorMonitorModule(), endJob(), and reset().

std::vector<HcalGenericDetId> CastorMonitorModule::listEMap
private

Definition at line 249 of file CastorMonitorModule.h.

Referenced by analyze().

std::ofstream CastorMonitorModule::m_logFile
private

Definition at line 252 of file CastorMonitorModule.h.

MonitorElement* CastorMonitorModule::meCASTOR_
private

Definition at line 260 of file CastorMonitorModule.h.

Referenced by beginRun().

MonitorElement* CastorMonitorModule::meEVT_
private

Definition at line 236 of file CastorMonitorModule.h.

Referenced by analyze(), and beginRun().

MonitorElement* CastorMonitorModule::meEvtMask_
private

Definition at line 218 of file CastorMonitorModule.h.

Referenced by analyze(), beginRun(), and CastorMonitorModule().

MonitorElement* CastorMonitorModule::meFEDS_
private

Definition at line 215 of file CastorMonitorModule.h.

Referenced by analyze(), beginRun(), and CastorMonitorModule().

MonitorElement* CastorMonitorModule::meLatency_
private

Definition at line 220 of file CastorMonitorModule.h.

MonitorElement* CastorMonitorModule::meQuality_
private

Definition at line 221 of file CastorMonitorModule.h.

Referenced by beginRun(), and CastorMonitorModule().

MonitorElement* CastorMonitorModule::meRunType_
private

Definition at line 217 of file CastorMonitorModule.h.

Referenced by beginRun(), and CastorMonitorModule().

MonitorElement* CastorMonitorModule::meStatus_
private

Definition at line 216 of file CastorMonitorModule.h.

Referenced by analyze(), beginRun(), and CastorMonitorModule().

MonitorElement* CastorMonitorModule::meTrigger_
private

Definition at line 219 of file CastorMonitorModule.h.

std::string CastorMonitorModule::monitorName_
private

Definition at line 140 of file CastorMonitorModule.h.

std::map<HcalCastorDetId, unsigned int> CastorMonitorModule::myquality_
private

Definition at line 267 of file CastorMonitorModule.h.

int CastorMonitorModule::nDigi
private

Definition at line 160 of file CastorMonitorModule.h.

int CastorMonitorModule::nevt_
private

Definition at line 146 of file CastorMonitorModule.h.

Referenced by analyze().

int CastorMonitorModule::nJet
private

Definition at line 163 of file CastorMonitorModule.h.

int CastorMonitorModule::nJetId
private

Definition at line 164 of file CastorMonitorModule.h.

int CastorMonitorModule::nlumisecs_
private

Definition at line 147 of file CastorMonitorModule.h.

int CastorMonitorModule::nRaw
private

Definition at line 159 of file CastorMonitorModule.h.

int CastorMonitorModule::nRechit
private

Definition at line 161 of file CastorMonitorModule.h.

int CastorMonitorModule::nTower
private

Definition at line 162 of file CastorMonitorModule.h.

int CastorMonitorModule::prescaleEvt_
private

Definition at line 133 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule(), and prescale().

int CastorMonitorModule::prescaleLS_
private

Definition at line 134 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule(), and prescale().

int CastorMonitorModule::prescaleTime_
private

Definition at line 135 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule(), and prescale().

int CastorMonitorModule::prescaleUpdate_
private

Definition at line 136 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule(), and prescale().

CastorPSMonitor* CastorMonitorModule::PSMon_
private

Definition at line 231 of file CastorMonitorModule.h.

Referenced by analyze(), beginRun(), CastorMonitorModule(), endJob(), and reset().

struct { ... } CastorMonitorModule::psTime_

Referenced by CastorMonitorModule(), and prescale().

bool CastorMonitorModule::rawOK_
private

Definition at line 151 of file CastorMonitorModule.h.

Referenced by analyze().

CastorRecHitMonitor* CastorMonitorModule::RecHitMon_
private

Definition at line 227 of file CastorMonitorModule.h.

Referenced by analyze(), beginRun(), CastorMonitorModule(), endJob(), and reset().

bool CastorMonitorModule::rechitOK_
private

Definition at line 154 of file CastorMonitorModule.h.

Referenced by analyze().

bool CastorMonitorModule::reportOK_
private

Definition at line 152 of file CastorMonitorModule.h.

std::string CastorMonitorModule::rootFolder_
private

Definition at line 186 of file CastorMonitorModule.h.

Referenced by beginRun(), and CastorMonitorModule().

bool CastorMonitorModule::saved_
private

Definition at line 148 of file CastorMonitorModule.h.

bool CastorMonitorModule::showTiming_
private

Definition at line 168 of file CastorMonitorModule.h.

Referenced by analyze(), and CastorMonitorModule().

timeval CastorMonitorModule::startTV

Definition at line 173 of file CastorMonitorModule.h.

std::map<uint32_t, std::vector<HcalCastorDetId> >::iterator CastorMonitorModule::thisDCC
private

Definition at line 210 of file CastorMonitorModule.h.

std::map<std::pair <int,int> , std::vector<HcalCastorDetId> >::iterator CastorMonitorModule::thisHTR
private

Definition at line 212 of file CastorMonitorModule.h.

CastorTowerJetMonitor* CastorMonitorModule::TowerJetMon_
private

Definition at line 234 of file CastorMonitorModule.h.

Referenced by analyze(), beginRun(), CastorMonitorModule(), endJob(), and reset().

bool CastorMonitorModule::towerOK_
private

Definition at line 155 of file CastorMonitorModule.h.

double CastorMonitorModule::updateTime

Definition at line 176 of file CastorMonitorModule.h.

timeval CastorMonitorModule::updateTV

Definition at line 173 of file CastorMonitorModule.h.

double CastorMonitorModule::vetoTime

Definition at line 175 of file CastorMonitorModule.h.