72 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
73 prefixME_.append(
"/");
116 if (
debug_>0 )
std::cout <<
"HcalMonitorModule: beginRun" << std::endl;
121 if (
debug_>1)
std::cout <<
"\t<HcalMonitorModule::beginRun> Getting Emap!"<<std::endl;
124 eMap_=pSetup->getHcalMapping();
182 meIevtHist_ =
dbe_->
book1D(
"EventsInHcalMonitorModule",
"Events Seen by HcalMonitorModule",1,0.5,1.5);
281 if (
debug_>0)
std::cout <<
"HcalMonitorModule::beginLuminosityBlock"<<std::endl;
290 if (
debug_>0)
std::cout <<
"HcalMonitorModule::endLuminosityBlock"<<std::endl;
350 int numEmptyFEDs = 0 ;
351 std::vector<int> calibTypeCounter(8,0) ;
356 if ( fedData.
size() < 24 ) numEmptyFEDs++ ;
357 if ( fedData.
size() < 24 )
continue;
362 edm::LogWarning(
"HcalMonitorModule::CalibTypeFilter") <<
"Unexpected Calibration type: "<< value <<
" in FED: "<<
i<<
" (should be 0-7). I am bailing out...";
366 calibTypeCounter.at(value)++ ;
371 for (
unsigned int i=0;
i<calibTypeCounter.size();
i++) {
372 if ( calibTypeCounter.at(
i) > maxCount )
373 { calibType =
i ; maxCount = calibTypeCounter.at(
i) ; }
374 if ( maxCount == numberOfFEDIds ) break ;
377 if ( maxCount != (numberOfFEDIds-numEmptyFEDs) )
378 edm::LogWarning(
"HcalMonitorModule::CalibTypeFilter") <<
"Conflicting calibration types found. Assigning type "
380 LogDebug(
"HcalMonitorModule::CalibTypeFilter") <<
"Calibration type is: " <<
calibType ;
386 if (
debug_>2)
std::cout <<
"\t<HcalMonitorModule> ievt = "<<
ievt_<<
" calibration type = "<<calibType<<std::endl;
409 const std::vector<int> feds = (*report).getFedsUnpacked();
410 for(
unsigned int f=0;
f<feds.size(); ++
f)
424 std::vector<int> fedUnpackList;
428 fedUnpackList.push_back(
i);
430 if (
debug_>1)
std::cout <<
"<HcalMonitorModule::CheckSubdetectorStatus> Checking subdetector "<<subdet<<std::endl;
431 for (std::vector<int>::const_iterator
i=fedUnpackList.begin();
432 i!=fedUnpackList.end();
435 if (
debug_>2)
std::cout <<
"\t<HcalMonitorModule::CheckSubdetectorStatus> FED = "<<*
i<<std::endl;
437 if (fed.
size()<12)
continue;
441 if (!dccHeader)
return;
444 if (subdet ==
HcalForward && dccid>717 && dccid<724)
467 if (!htr.
check())
continue;
473 for(
int fchan=0; fchan<3; ++fchan)
475 for(
int fib=1; fib<9; ++fib)
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
MonitorElement * meStatus_
edm::InputTag inputLabelReport_
bool check() const
Check for a good event Requires a minimum length, matching wordcount and length, not an empty event...
edm::InputTag FEDRawDataCollection_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
unsigned int htrTopBottom() const
HcalElectronicsId-style HTR top/bottom (1=top/0=bottom)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
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
MonitorElement * meProcessedEndLumi_
void CheckSubdetectorStatus(const edm::Handle< FEDRawDataCollection > &rawraw, HcalSubdetector subdet, const HcalElectronicsMap &emap)
void analyze(const edm::Event &e, const edm::EventSetup &c)
MonitorElement * meCurrentCalibType_
size_t size() const
Lenght of the data buffer in bytes.
const HcalElectronicsMap * eMap_
LuminosityBlockNumber_t luminosityBlock() const
MonitorElement * meCalibType_
void beginRun(const edm::Run &run, const edm::EventSetup &c)
unsigned int htrSlot() const
HcalElectronicsId-style HTR slot.
void removeElement(const std::string &name)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void setHTR(int crate, int slot, int tb)
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
HcalMonitorModule(const edm::ParameterSet &ps)
bool null() const
is this a null id ?
unsigned int readoutVMECrateId() const
HcalElectronicsId-style VME crate number.
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
void endRun(const edm::Run &run, const edm::EventSetup &c)
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
MonitorElement * meIevtHist_
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * bookInt(const char *name)
Book int.
MonitorElement * meOnline_
void Reset(void)
reset ME (ie. contents, errors, etc)
Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
void setCurrentFolder(const std::string &fullpath)
bool isHistogramEvent() const
Is this event a histogram event? (do not call standard unpack in this case!!!!!)
edm::EDGetTokenT< HcalUnpackerReport > tok_report_
MonitorElement * meEvtsVsLS_