71 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
72 prefixME_.append(
"/");
109 if (
debug_>0 )
std::cout <<
"HcalMonitorModule: dqmBeginRun" << std::endl;
114 if (
debug_>1)
std::cout <<
"\t<HcalMonitorModule::bookHistograms> Getting Emap!"<<std::endl;
117 eMap_=pSetup->getHcalMapping();
177 meIevtHist_ = ib.
book1D(
"EventsInHcalMonitorModule",
"Events Seen by HcalMonitorModule",1,0.5,1.5);
231 if (
debug_>0)
std::cout <<
"HcalMonitorModule::endLuminosityBlock"<<std::endl;
274 int numEmptyFEDs = 0 ;
275 std::vector<int> calibTypeCounter(8,0) ;
280 if ( fedData.
size() < 24 ) numEmptyFEDs++ ;
281 if ( fedData.
size() < 24 )
continue;
286 edm::LogWarning(
"HcalMonitorModule::CalibTypeFilter") <<
"Unexpected Calibration type: "<< value <<
" in FED: "<<
i<<
" (should be 0-7). I am bailing out...";
290 calibTypeCounter.at(value)++ ;
295 for (
unsigned int i=0;
i<calibTypeCounter.size();
i++) {
296 if ( calibTypeCounter.at(
i) > maxCount )
297 { calibType =
i ; maxCount = calibTypeCounter.at(
i) ; }
298 if ( maxCount == numberOfFEDIds ) break ;
301 if ( maxCount != (numberOfFEDIds-numEmptyFEDs) )
302 edm::LogWarning(
"HcalMonitorModule::CalibTypeFilter") <<
"Conflicting calibration types found. Assigning type "
304 LogDebug(
"HcalMonitorModule::CalibTypeFilter") <<
"Calibration type is: " <<
calibType ;
310 if (
debug_>2)
std::cout <<
"\t<HcalMonitorModule> ievt = "<<
ievt_<<
" calibration type = "<<calibType<<std::endl;
333 const std::vector<int> feds = (*report).getFedsUnpacked();
334 for(
unsigned int f=0;
f<feds.size(); ++
f)
348 std::vector<int> fedUnpackList;
352 fedUnpackList.push_back(
i);
354 if (
debug_>1)
std::cout <<
"<HcalMonitorModule::CheckSubdetectorStatus> Checking subdetector "<<subdet<<std::endl;
355 for (std::vector<int>::const_iterator
i=fedUnpackList.begin();
356 i!=fedUnpackList.end();
359 if (
debug_>2)
std::cout <<
"\t<HcalMonitorModule::CheckSubdetectorStatus> FED = "<<*
i<<std::endl;
361 if (fed.
size()<12)
continue;
365 if (!dccHeader)
return;
368 if (subdet ==
HcalForward && dccid>717 && dccid<724)
391 if (!htr.
check())
continue;
397 for(
int fchan=0; fchan<3; ++fchan)
399 for(
int fib=1; fib<9; ++fib)
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
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_
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)
MonitorElement * bookInt(Args &&...args)
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
edm::EventNumber_t evtNumber_
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_
unsigned int htrSlot() const
HcalElectronicsId-style HTR slot.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
void dqmBeginRun(edm::Run const &, edm::EventSetup const &)
MonitorElement * book1D(Args &&...args)
void setup(DQMStore::IBooker &)
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 setCurrentFolder(const std::string &fullpath)
edm::RunNumber_t runNumber_
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_
MonitorElement * meOnline_
void Reset(void)
reset ME (ie. contents, errors, etc)
Readout chain identification for Hcal.
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
bool isHistogramEvent() const
Is this event a histogram event? (do not call standard unpack in this case!!!!!)
edm::EDGetTokenT< HcalUnpackerReport > tok_report_
MonitorElement * meEvtsVsLS_