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

Definition at line 181 of file CastorMonitorModule.cc.

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

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 407 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().

408  {
409  if (fVerbosity>0) std::cout <<" "<<std::endl;
410  if (fVerbosity>0) std::cout <<"CastorMonitorModule::analyze (start)"<<std::endl;
411 
412  using namespace edm;
413 
414 
416  irun_ = iEvent.id().run();
417  ilumisec_ = iEvent.luminosityBlock();
418  ievent_ = iEvent.id().event();
419  itime_ = iEvent.time().value();
420  ibunch_ = iEvent.bunchCrossing();
421 
422 
423  if (fVerbosity>1) {
424  std::cout << "==> CastorMonitorModule: evts: "<< nevt_ << ", run: " << irun_ << ", LS: " << ilumisec_ << std::endl;
425  std::cout << " evt: " << ievent_ << ", time: " << itime_ <<"\t counter = "<< ievt_pre_<< "\t total count = "<<ievt_<<std::endl;
426  }
427 
429  ievt_++;
430 
432  ievt_pre_++; // need to increment counter before calling prescale
433  if(prescale()) return;
434 
435 
436  // meLatency_->Fill(psTime_.elapsedTime);
437 
438 
440  // add in DO_HCAL_TPMON, DO_HCAL_CTMON ?(in CastorMonitorSelector.h)
441  /* FIX
442  // int trigMask=0;
443  if(mtccMon_==NULL){
444  evtSel_->processEvent(e);
445  evtMask = evtSel_->getEventMask();
446  // trigMask = evtSel_->getTriggerMask();
447  }
448  */
449  if ( dbe_ ){
450  meStatus_->Fill(1);
451  meEvtMask_->Fill(evtMask);
452  }
453 
455  bool rawOK_ = true;
456  bool digiOK_ = true;
457  bool rechitOK_ = true;
458 
459  //-- TAKE IT AWAY for the time being
462  iEvent.getByToken(inputLabelRawToken_, RawData);
463  if (!RawData.isValid()) {
464  rawOK_=false;
465  if (fVerbosity>0) std::cout << "RAW DATA NOT FOUND!" << std::endl;
466  }
467 
468 
471  if (!report.isValid()) {
472  rawOK_=false;
473  if (fVerbosity>0) std::cout << "UNPACK REPORT HAS FAILED!" << std::endl;
474  }
475  else
476  {
477  if(!fedsListed_){
478  const std::vector<int> feds = (*report).getFedsUnpacked();
479  for(unsigned int f=0; f<feds.size(); f++){
480  meFEDS_->Fill(feds[f]);
481  }
482  fedsListed_ = true;
483  }
484  }
485 
486  //---------------------------------------------------------------//
487  //------------------- try to get digis ------------------------//
488  //---------------------------------------------------------------//
489 
491  iEvent.getByToken(inputLabelDigiToken_, CastorDigi);
492  if (!CastorDigi.isValid()) {
493  digiOK_=false;
494  if (fVerbosity>0) std::cout << "DIGI DATA NOT FOUND!" << std::endl;
495  }
496 
497 
498 
501  //if ( checkCASTOR_ )
502  // CheckCastorStatus(*RawData,*report,*readoutMap_,*CastorDigi);
503 
504 
505  //---------------------------------------------------------------//
506  //------------------- try to get RecHits ------------------------//
507  //---------------------------------------------------------------//
509  iEvent.getByToken(inputLabelRecHitCASTORToken_, CastorHits);
510  if (!CastorHits.isValid()) {
511  rechitOK_ = false;
512  if (fVerbosity>0) std::cout << "RECO DATA NOT FOUND!" << std::endl;
513  }
514 
515 
517  if(ievt_%10 == 0) {
518 
519  TH2F* hCastorEventProduct=CastorEventProduct->getTH2F();
520  hCastorEventProduct->SetBinContent(1,1,int(rawOK_));
521  hCastorEventProduct->SetBinContent(2,1,int(digiOK_));
522  hCastorEventProduct->SetBinContent(3,1,int(rechitOK_));
523 
524  if(fVerbosity>1) {
525  std::cout << " RAW Data ==> " << rawOK_<< std::endl;
526  std::cout << " Digis ==> " << digiOK_<< std::endl;
527  std::cout << " RecHits ==> " << rechitOK_<< std::endl;
528  }
529 
530  }
531 
532  //------------------------------------------------------------//
533  //---------------- Run the configured tasks ------------------//
534  //-------------- protect against missing products -----------//
535  //-----------------------------------------------------------//
536 
537  if (showTiming_){
539  }
540 
541  //----------------- Digi monitor task ------------------//
542  // if((DigiMon_!=NULL) && (evtMask&DO_CASTOR_PED_CALIBMON) && digiOK_)
543  if(digiOK_) DigiMon_->processEvent(*CastorDigi,*conditions_);
544  if (showTiming_){
545  cpu_timer.stop();
546  if (DigiMon_!=NULL) std::cout <<"TIMER:: DIGI MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
548  }
549 
550 
551  //----------------- Rec Hit monitor task -------------------------//
552  // if((RecHitMon_ != NULL) && (evtMask&DO_CASTOR_RECHITMON) && rechitOK_)
553  if(rechitOK_) RecHitMon_->processEvent(*CastorHits);
554  if (showTiming_){
555  cpu_timer.stop();
556  if (RecHitMon_!=NULL) std::cout <<"TIMER:: RECHIT MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
558  }
559 
560  //----------------- Channel Quality Monitor task -------------------------//
561  if(rechitOK_) CQMon_->processEvent(*CastorHits);
562  if (showTiming_){
563  cpu_timer.stop();
564  if (CQMon_!=NULL) std::cout <<"TIMER:: CHANNELQUALITY MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
566  }
567 
569 
571  eventSetup.get<CastorElectronicsMapRcd>().get(refEMap);
572  const CastorElectronicsMap* myRefEMap = refEMap.product();
573  listEMap = myRefEMap->allPrecisionId();
574 
575 //----------------- Heavy Ion monitor task -------------------------//
576  if(rechitOK_ && digiOK_ ) HIMon_->processEvent(*CastorHits, *CastorDigi, *conditions_);
577  if (showTiming_){
578  cpu_timer.stop();
579  if (HIMon_!=NULL) std::cout <<"TIMER:: HI MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
581  }
582 
583 //----------------- PS monitor task -------------------------//
585  if (showTiming_) {
586  cpu_timer.stop();
587  if (PSMon_!=NULL) std::cout <<"TIMER:: PULSE SHAPE ->"<<cpu_timer.cpuTime()<<std::endl;
589  }
590 
591 //----------------- PS monitor task -------------------------//
592 // if(rechitOK_ && digiOK_ ) PSMon_->processEvent(*CastorDigi, *conditions_, listEMap, ibunch_, fPedestalNSigmaAverage);
593 
594 
595 //----------------- Tower Jet monitor task -------------------------//
596 
597  if(rechitOK_)
598  {
599  if (showTiming_){
600  cpu_timer.stop();
601  if (TowerJetMon_!=NULL) std::cout <<"TIMER:: TOWER JET MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
603  }
604  }
605 
606 
607 
608 
609 //----------------- Data Integrity monitor task -------------------------//
610  if(rechitOK_ && digiOK_ ) DataIntMon_->processEvent(*RawData, *report, *myRefEMap);
611  if (showTiming_){
612  cpu_timer.stop();
613  if (DataIntMon_!=NULL) std::cout <<"TIMER:: DATA INTEGRITY MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
615  }
616 
617 
619 
620  //---------------- LED monitor task ------------------------//
621  // if((LedMon_!=NULL) && (evtMask&DO_HCAL_LED_CALIBMON) && digiOK_)
622  if(digiOK_) LedMon_->processEvent(*CastorDigi,*conditions_);
623  if (showTiming_){
624  cpu_timer.stop();
625  if (LedMon_!=NULL) std::cout <<"TIMER:: LED MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
627  }
628 
629  //---------------- Pulse Shape monitor task ------------------------//
630 
631  if(fVerbosity>1 && ievt_%100 == 0)
632  std::cout << "CastorMonitorModule: processed " << ievt_ << " events" << std::endl;
633 
634 
636  meEVT_->Fill(ievt_);
637 
638  if (fVerbosity>0) std::cout <<"CastorMonitorModule::analyze (end)"<<std::endl;
639 
640  return;
641  }
RunNumber_t run() const
Definition: EventID.h:39
EventNumber_t event() const
Definition: EventID.h:41
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:446
edm::RunNumber_t irun_
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_
edm::EventNumber_t ievent_
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 205 of file CastorMonitorModule.cc.

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

206  {
207  if (fVerbosity>0) std::cout << " " << std::endl;
208  if (fVerbosity>0) std::cout << "CastorMonitorModule::beginJob (start)" << std::endl;
209 
210  ievt_ = 0;
211  ievt_pre_=0;
212 
213  if (fVerbosity>0) std::cout << "CastorMonitorModule::beginJob (end)" << std::endl;
214 
215  return;
216 }
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 315 of file CastorMonitorModule.cc.

References actonLS_, and prescale().

316  {
317 
318  if(actonLS_ && !prescale()){
320  }
321 }
void CastorMonitorModule::beginRun ( const edm::Run iRun,
const edm::EventSetup eventSetup 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 222 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_.

223  {
224  if (fVerbosity>0) std::cout <<" "<<std::endl;
225  if (fVerbosity>0) std::cout << "CastorMonitorModule::beginRun (start)" << std::endl;
226 
227  fedsListed_ = false;
228  reset();
229 
230  if ( dbe_ != NULL )
231  {
232 
234  dbe_->setCurrentFolder(rootFolder_+"CastorEventProducts");
235  meEVT_ = dbe_->bookInt("Event Number");
236  CastorEventProduct =dbe_->book2D("CastorEventProduct","CastorEventProduct",3,0,3,1,0,1);
237  TH2F* hCastorEventProduct =CastorEventProduct->getTH2F();
238  hCastorEventProduct->GetXaxis()->SetBinLabel(1,"RawData");
239  hCastorEventProduct->GetXaxis()->SetBinLabel(2,"CastorDigi");
240  hCastorEventProduct->GetXaxis()->SetBinLabel(3,"CastorRecHits");
241  hCastorEventProduct->GetYaxis()->SetBinLabel(1,"Status");
242  hCastorEventProduct->SetBinContent(1,1,-1);
243  hCastorEventProduct->SetBinContent(2,1,-1);
244  hCastorEventProduct->SetBinContent(3,1,-1);
245  hCastorEventProduct->SetOption("textcolz");
246 
247  dbe_->setCurrentFolder(rootFolder_+"DQM Job Status" );
248  meStatus_ = dbe_->bookInt("STATUS");
249  meRunType_ = dbe_->bookInt("RUN TYPE");
250  meEvtMask_ = dbe_->bookInt("EVT MASK");
251  meFEDS_ = dbe_->book1D("FEDs Unpacked","FEDs Unpacked",100,660,759);
252  meCASTOR_ = dbe_->bookInt("CASTORpresent");
254  // meLatency_ = dbe_->book1D("Process Latency","Process Latency",2000,0,10); // PK: eliminate
255  meQuality_ = dbe_->book1D("Quality Status","Quality Status",100,0,1);
256  meStatus_->Fill(0);
257  meRunType_->Fill(-1);
258  meEvtMask_->Fill(-1);
260  meCASTOR_->Fill(0);
261  }
262  else{
263  if(fVerbosity>0) std::cout << "CastorMonitorModule::beginRun - NO DQMStore service" << std::endl;
264  }
265 
266 
267 // beginRun initiations for all modules
268  if (DigiMon_ != NULL) { DigiMon_->beginRun(iSetup); }
269  if (RecHitMon_ != NULL) { RecHitMon_->beginRun(iSetup); }
270  if (CQMon_ != NULL) { CQMon_->beginRun(iRun, iSetup); }
271  if (HIMon_ != NULL) { HIMon_->beginRun(iSetup); }
272  if (PSMon_ != NULL) { PSMon_->beginRun(iRun, iSetup); }
273  if (TowerJetMon_!= NULL) { TowerJetMon_->beginRun(iRun, iSetup); }
274  if (DataIntMon_ != NULL) { DataIntMon_->beginRun(iSetup); }
275 
276  if (LedMon_ != NULL) { LedMon_->beginRun(iSetup); }
277 
279  iSetup.get<CastorDbRecord>().get(conditions_);
280 
282  iSetup.get<CastorPedestalsRcd>().get(dbPedestals);
283  if(!dbPedestals.isValid() && fVerbosity>0) std::cout << "CASTOR has no CastorPedestals in the CondDB !!!" << std::endl;
284 
286  float sigma_averaged;
287  unsigned int iChannel = 0;
288  std::vector<DetId> channels = dbPedestals->getAllChannels();
289 
291  for (std::vector<DetId>::iterator ch=channels.begin(); ch!=channels.end(); ch++) {
292  const CastorPedestal * pedestals_mean = dbPedestals->getValues(*ch);
293  sigma_averaged = 0.;
294 
296  for (short unsigned int iCapId = 0; iCapId < 4; iCapId++){
297  sigma_averaged += sqrt(pedestals_mean->getWidth(iCapId));
298  };
299 
301  fPedestalNSigmaAverage[HcalCastorDetId(*ch).module()-1][HcalCastorDetId(*ch).sector()-1] = sigma_averaged/4;
302  iChannel++;
303  };
304 
305  if(iChannel<224 && fVerbosity>0) std::cout << "There are less that 224 channels in CastorPedestalsRcd record !!!" << std::endl;
306 
307  if(fVerbosity>0) std::cout << "CastorMonitorModule::beginRun (end)" << std::endl;
308 
309  return;
310 }
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:971
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:47
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:878
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:1099
CastorHIMonitor * HIMon_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:684
MonitorElement * meEVT_
void CastorMonitorModule::CheckCastorStatus ( const FEDRawDataCollection rawraw,
const HcalUnpackerReport report,
const CastorElectronicsMap emap,
const CastorDigiCollection castordigi 
)
protected

Definition at line 709 of file CastorMonitorModule.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 353 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_.

354  {
355  if (fVerbosity>0) std::cout <<"CastorMonitorModule::endJob (start)"<<std::endl;
356 
357  //if ( meStatus_ ) meStatus_->Fill(2);
358 
359  if(DigiMon_!=NULL) DigiMon_->done();
360  if(RecHitMon_!=NULL) RecHitMon_->done();
361  if(CQMon_!=NULL) CQMon_->done();
362  if(HIMon_!=NULL) HIMon_->done();
363  if(PSMon_!=NULL) PSMon_->done();
365  if(DataIntMon_!=NULL) DataIntMon_ ->done();
366 
367  if(LedMon_!=NULL) LedMon_->done();
368 
369  /* LEAVE IT OUT FOR THE MOMENT
370  // TO DUMP THE OUTPUT TO DATABASE FILE
371  if (dump2database_){
372 
373  }
374  */
375 
376  if (fVerbosity>0) std::cout <<"CastorMonitorModule::endJob (end)"<<std::endl;
377 
378  return;
379 }
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 327 of file CastorMonitorModule.cc.

References actonLS_, and prescale().

328  {
329  if(actonLS_ && !prescale()){
331  }
332 }
void CastorMonitorModule::endRun ( const edm::Run run,
const edm::EventSetup eventSetup 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 337 of file CastorMonitorModule.cc.

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

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

in seconds

Definition at line 651 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().

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

Definition at line 385 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().

386  {
387  if (fVerbosity>0) std::cout <<" "<<std::endl;
388  if (fVerbosity>0) std::cout <<"CastorMonitorModule::reset (start)"<<std::endl;
389 
390  if(DigiMon_!=NULL) DigiMon_->reset();
392  if(CQMon_!=NULL) CQMon_->reset();
393  if(HIMon_!=NULL) HIMon_->reset();
394  if(PSMon_!=NULL) PSMon_->reset();
397 
398  if(LedMon_!=NULL) LedMon_->reset();
399 
400  if (fVerbosity>0) std::cout <<"CastorMonitorModule::reset (end)"<<std::endl;
401  }
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 225 of file CastorMonitorModule.h.

Referenced by analyze(), and beginRun().

const CastorElectronicsMap* CastorMonitorModule::CastorReadoutMap_
private

Definition at line 242 of file CastorMonitorModule.h.

CastorChannelQuality* CastorMonitorModule::chanquality_
private

Definition at line 271 of file CastorMonitorModule.h.

bool CastorMonitorModule::checkCASTOR_
private

Definition at line 258 of file CastorMonitorModule.h.

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

Definition at line 241 of file CastorMonitorModule.h.

Referenced by analyze(), and beginRun().

edm::CPUTimer CastorMonitorModule::cpu_timer
private

Definition at line 170 of file CastorMonitorModule.h.

Referenced by analyze().

CastorChannelQualityMonitor* CastorMonitorModule::CQMon_
private

Definition at line 231 of file CastorMonitorModule.h.

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

CastorDataIntegrityMonitor* CastorMonitorModule::DataIntMon_
private

Definition at line 236 of file CastorMonitorModule.h.

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

DQMStore* CastorMonitorModule::dbe_
private

Definition at line 182 of file CastorMonitorModule.h.

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

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

Definition at line 245 of file CastorMonitorModule.h.

Referenced by beginRun().

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

Definition at line 212 of file CastorMonitorModule.h.

CastorDigiMonitor* CastorMonitorModule::DigiMon_
private

Definition at line 232 of file CastorMonitorModule.h.

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

bool CastorMonitorModule::digiOK_
private

Definition at line 154 of file CastorMonitorModule.h.

Referenced by analyze().

bool CastorMonitorModule::dump2database_
private

Definition at line 269 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule().

bool CastorMonitorModule::EDMonOn_
private

Definition at line 266 of file CastorMonitorModule.h.

double CastorMonitorModule::elapsedTime

Definition at line 175 of file CastorMonitorModule.h.

CastorMonitorSelector* CastorMonitorModule::evtSel_
private

Definition at line 229 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule().

bool CastorMonitorModule::fedsListed_
private

Definition at line 193 of file CastorMonitorModule.h.

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

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

Definition at line 250 of file CastorMonitorModule.h.

Referenced by analyze(), and beginRun().

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

Definition at line 235 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 214 of file CastorMonitorModule.h.

int CastorMonitorModule::ibunch_
private

Definition at line 185 of file CastorMonitorModule.h.

Referenced by analyze(), and CastorMonitorModule().

edm::EventNumber_t CastorMonitorModule::ievent_
private

Definition at line 187 of file CastorMonitorModule.h.

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

int CastorMonitorModule::ievt_
private

Definition at line 191 of file CastorMonitorModule.h.

Referenced by analyze(), and beginJob().

int CastorMonitorModule::ievt_pre_
private

Definition at line 192 of file CastorMonitorModule.h.

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

int CastorMonitorModule::ilumisec_
private

Definition at line 185 of file CastorMonitorModule.h.

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

edm::InputTag CastorMonitorModule::inputLabelBasicJetCASTOR_
private

Definition at line 200 of file CastorMonitorModule.h.

edm::InputTag CastorMonitorModule::inputLabelCastorBasicJets_
private

Definition at line 203 of file CastorMonitorModule.h.

edm::InputTag CastorMonitorModule::inputLabelCastorJetIDs_
private

Definition at line 204 of file CastorMonitorModule.h.

edm::InputTag CastorMonitorModule::inputLabelCastorTowers_
private

Definition at line 202 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule().

edm::InputTag CastorMonitorModule::inputLabelDigi_
private

Definition at line 197 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule().

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

Definition at line 276 of file CastorMonitorModule.h.

Referenced by analyze(), and CastorMonitorModule().

edm::InputTag CastorMonitorModule::inputLabelJetIdCASTOR_
private

Definition at line 201 of file CastorMonitorModule.h.

edm::InputTag CastorMonitorModule::inputLabelRaw_
private

Definition at line 195 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule().

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

Definition at line 274 of file CastorMonitorModule.h.

Referenced by analyze(), and CastorMonitorModule().

edm::InputTag CastorMonitorModule::inputLabelRecHitCASTOR_
private

Definition at line 198 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule().

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

Definition at line 277 of file CastorMonitorModule.h.

Referenced by analyze(), and CastorMonitorModule().

edm::InputTag CastorMonitorModule::inputLabelReport_
private

Definition at line 196 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule().

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

Definition at line 275 of file CastorMonitorModule.h.

Referenced by analyze(), and CastorMonitorModule().

edm::InputTag CastorMonitorModule::inputLabelTowerCASTOR_
private

Definition at line 199 of file CastorMonitorModule.h.

edm::RunNumber_t CastorMonitorModule::irun_
private

Definition at line 186 of file CastorMonitorModule.h.

Referenced by analyze(), and CastorMonitorModule().

int CastorMonitorModule::itime_
private

Definition at line 185 of file CastorMonitorModule.h.

Referenced by analyze(), and CastorMonitorModule().

bool CastorMonitorModule::jetIdOK_
private

Definition at line 158 of file CastorMonitorModule.h.

bool CastorMonitorModule::jetOK_
private

Definition at line 157 of file CastorMonitorModule.h.

CastorLEDMonitor* CastorMonitorModule::LedMon_
private

Definition at line 233 of file CastorMonitorModule.h.

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

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

Definition at line 252 of file CastorMonitorModule.h.

Referenced by analyze().

std::ofstream CastorMonitorModule::m_logFile
private

Definition at line 255 of file CastorMonitorModule.h.

MonitorElement* CastorMonitorModule::meCASTOR_
private

Definition at line 263 of file CastorMonitorModule.h.

Referenced by beginRun().

MonitorElement* CastorMonitorModule::meEVT_
private

Definition at line 239 of file CastorMonitorModule.h.

Referenced by analyze(), and beginRun().

MonitorElement* CastorMonitorModule::meEvtMask_
private

Definition at line 221 of file CastorMonitorModule.h.

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

MonitorElement* CastorMonitorModule::meFEDS_
private

Definition at line 218 of file CastorMonitorModule.h.

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

MonitorElement* CastorMonitorModule::meLatency_
private

Definition at line 223 of file CastorMonitorModule.h.

MonitorElement* CastorMonitorModule::meQuality_
private

Definition at line 224 of file CastorMonitorModule.h.

Referenced by beginRun(), and CastorMonitorModule().

MonitorElement* CastorMonitorModule::meRunType_
private

Definition at line 220 of file CastorMonitorModule.h.

Referenced by beginRun(), and CastorMonitorModule().

MonitorElement* CastorMonitorModule::meStatus_
private

Definition at line 219 of file CastorMonitorModule.h.

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

MonitorElement* CastorMonitorModule::meTrigger_
private

Definition at line 222 of file CastorMonitorModule.h.

std::string CastorMonitorModule::monitorName_
private

Definition at line 141 of file CastorMonitorModule.h.

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

Definition at line 270 of file CastorMonitorModule.h.

int CastorMonitorModule::nDigi
private

Definition at line 161 of file CastorMonitorModule.h.

int CastorMonitorModule::nevt_
private

Definition at line 147 of file CastorMonitorModule.h.

Referenced by analyze().

int CastorMonitorModule::nJet
private

Definition at line 164 of file CastorMonitorModule.h.

int CastorMonitorModule::nJetId
private

Definition at line 165 of file CastorMonitorModule.h.

int CastorMonitorModule::nlumisecs_
private

Definition at line 148 of file CastorMonitorModule.h.

int CastorMonitorModule::nRaw
private

Definition at line 160 of file CastorMonitorModule.h.

int CastorMonitorModule::nRechit
private

Definition at line 162 of file CastorMonitorModule.h.

int CastorMonitorModule::nTower
private

Definition at line 163 of file CastorMonitorModule.h.

int CastorMonitorModule::prescaleEvt_
private

Definition at line 134 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule(), and prescale().

int CastorMonitorModule::prescaleLS_
private

Definition at line 135 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule(), and prescale().

int CastorMonitorModule::prescaleTime_
private

Definition at line 136 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule(), and prescale().

int CastorMonitorModule::prescaleUpdate_
private

Definition at line 137 of file CastorMonitorModule.h.

Referenced by CastorMonitorModule(), and prescale().

CastorPSMonitor* CastorMonitorModule::PSMon_
private

Definition at line 234 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 152 of file CastorMonitorModule.h.

Referenced by analyze().

CastorRecHitMonitor* CastorMonitorModule::RecHitMon_
private

Definition at line 230 of file CastorMonitorModule.h.

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

bool CastorMonitorModule::rechitOK_
private

Definition at line 155 of file CastorMonitorModule.h.

Referenced by analyze().

bool CastorMonitorModule::reportOK_
private

Definition at line 153 of file CastorMonitorModule.h.

std::string CastorMonitorModule::rootFolder_
private

Definition at line 189 of file CastorMonitorModule.h.

Referenced by beginRun(), and CastorMonitorModule().

bool CastorMonitorModule::saved_
private

Definition at line 149 of file CastorMonitorModule.h.

bool CastorMonitorModule::showTiming_
private

Definition at line 169 of file CastorMonitorModule.h.

Referenced by analyze(), and CastorMonitorModule().

timeval CastorMonitorModule::startTV

Definition at line 174 of file CastorMonitorModule.h.

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

Definition at line 213 of file CastorMonitorModule.h.

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

Definition at line 215 of file CastorMonitorModule.h.

CastorTowerJetMonitor* CastorMonitorModule::TowerJetMon_
private

Definition at line 237 of file CastorMonitorModule.h.

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

bool CastorMonitorModule::towerOK_
private

Definition at line 156 of file CastorMonitorModule.h.

double CastorMonitorModule::updateTime

Definition at line 177 of file CastorMonitorModule.h.

timeval CastorMonitorModule::updateTV

Definition at line 174 of file CastorMonitorModule.h.

double CastorMonitorModule::vetoTime

Definition at line 176 of file CastorMonitorModule.h.