74 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
75 prefixME_.append(
"/");
112 if (
debug_>0 )
std::cout <<
"ZDCMonitorModule: beginRun" << std::endl;
117 if (
debug_>1)
std::cout <<
"\t<ZDCMonitorModule::beginRun> Getting Emap!"<<std::endl;
120 eMap_=pSetup->getHcalMapping();
253 if (
debug_>0)
std::cout <<
"ZDCMonitorModule::beginLuminosityBlock"<<std::endl;
262 if (
debug_>0)
std::cout <<
"ZDCMonitorModule::endLuminosityBlock"<<std::endl;
322 int numEmptyFEDs = 0 ;
323 std::vector<int> calibTypeCounter(8,0) ;
328 if ( fedData.
size() < 24 ) numEmptyFEDs++ ;
329 if ( fedData.
size() < 24 )
continue;
334 edm::LogWarning(
"ZDCMonitorModule::CalibTypeFilter") <<
"Unexpected Calibration type: "<< value <<
" in FED: "<<
i<<
" (should be 0-7). I am bailing out...";
338 calibTypeCounter.at(value)++ ;
343 for (
unsigned int i=0;
i<calibTypeCounter.size();
i++) {
344 if ( calibTypeCounter.at(
i) > maxCount )
345 { calibType =
i ; maxCount = calibTypeCounter.at(
i) ; }
346 if ( maxCount == numberOfFEDIds ) break ;
349 if ( maxCount != (numberOfFEDIds-numEmptyFEDs) )
350 edm::LogWarning(
"ZDCMonitorModule::CalibTypeFilter") <<
"Conflicting calibration types found. Assigning type "
352 LogDebug(
"ZDCMonitorModule::CalibTypeFilter") <<
"Calibration type is: " <<
calibType ;
358 if (
debug_>2)
std::cout <<
"\t<ZDCMonitorModule> ievt = "<<
ievt_<<
" calibration type = "<<calibType<<std::endl;
376 const std::vector<int> feds = (*report).getFedsUnpacked();
377 for(
unsigned int f=0;
f<feds.size(); ++
f)
390 std::vector<int> fedUnpackList;
394 fedUnpackList.push_back(
i);
396 if (
debug_>1)
std::cout <<
"<ZDCMonitorModule::CheckSubdetectorStatus> Checking ZDC "<<std::endl;
397 for (std::vector<int>::const_iterator
i=fedUnpackList.begin();
398 i!=fedUnpackList.end();
401 if (
debug_>2)
std::cout <<
"\t<ZDCMonitorModule::CheckSubdetectorStatus> FED = "<<*
i<<std::endl;
403 if (fed.
size()<12)
continue;
407 if (!dccHeader)
return;
void beginRun(const edm::Run &run, const edm::EventSetup &c)
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
MonitorElement * meOnline_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
#define DEFINE_FWK_MODULE(type)
ZDCMonitorModule(const edm::ParameterSet &ps)
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
edm::LuminosityBlockNumber_t luminosityBlock() const
void analyze(const edm::Event &e, const edm::EventSetup &c)
size_t size() const
Lenght of the data buffer in bytes.
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
LuminosityBlockNumber_t luminosityBlock() const
const HcalElectronicsMap * eMap_
MonitorElement * meEvtsVsLS_
void removeElement(const std::string &name)
void endRun(const edm::Run &run, const edm::EventSetup &c)
MonitorElement * meCalibType_
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag inputLabelReport_
MonitorElement * meProcessedEndLumi_
edm::InputTag FEDRawDataCollection_
MonitorElement * meStatus_
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * bookInt(const char *name)
Book int.
void CheckSubdetectorStatus(const edm::Handle< FEDRawDataCollection > &rawraw, const HcalElectronicsMap &emap)
void Reset(void)
reset ME (ie. contents, errors, etc)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * meIevtHist_
MonitorElement * meCurrentCalibType_