71 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
72 prefixME_.append(
"/");
110 if (
debug_>0 )
std::cout <<
"HcalMonitorModule: dqmBeginRun" << std::endl;
115 if (
debug_>1)
std::cout <<
"\t<HcalMonitorModule::bookHistograms> Getting Emap!"<<std::endl;
118 eMap_=pSetup->getHcalMapping();
179 meIevtHist_ = ib.
book1D(
"EventsInHcalMonitorModule",
"Events Seen by HcalMonitorModule",1,0.5,1.5);
200 "uTCA FEDs Unpacked; Hcal uTCA FEDs 1118, 1120, 1122",
236 if (
debug_>0)
std::cout <<
"HcalMonitorModule::endLuminosityBlock"<<std::endl;
279 int numEmptyFEDs = 0 ;
280 std::vector<int> calibTypeCounter(8,0) ;
288 std::cout <<
"### Processin FED: " <<
i << std::endl;
292 if ( fedData.
size() < 24 ) numEmptyFEDs++ ;
293 if ( fedData.
size() < 24 )
continue;
297 std::cout <<
"### FED: " <<
i <<
" CalibType: " << value
302 edm::LogWarning(
"HcalMonitorModule::CalibTypeFilter") <<
"Unexpected Calibration type: "<< value <<
" in FED: "<<
i <<
" (should be 0-7). I am bailing out...";
306 calibTypeCounter.at(value)++ ;
313 std::cout <<
"numberOfFEDIds=" << numberOfFEDIds << std::endl
314 <<
"number of emptyFEDs=" << numEmptyFEDs << std::endl;
315 for (
unsigned int i=0;
i<calibTypeCounter.size();
i++) {
316 if ( calibTypeCounter.at(
i) > maxCount )
317 { calibType =
i ; maxCount = calibTypeCounter.at(
i) ; }
318 if ( maxCount == numberOfFEDIds ) break ;
321 if ( maxCount != (numberOfFEDIds-numEmptyFEDs) )
322 edm::LogWarning(
"HcalMonitorModule::CalibTypeFilter") <<
"Conflicting calibration types found. Assigning type "
324 LogDebug(
"HcalMonitorModule::CalibTypeFilter") <<
"Calibration type is: " <<
calibType ;
330 if (
debug_>2)
std::cout <<
"\t<HcalMonitorModule> ievt = "<<
ievt_<<
" calibration type = "<<calibType<<std::endl;
360 const std::vector<int>
feds = (*report).getFedsUnpacked();
361 for(
unsigned int f=0;
f<feds.size(); ++
f)
378 std::vector<int> fedUnpackList;
385 fedUnpackList.push_back(
i);
389 if (
debug_>1)
std::cout <<
"<HcalMonitorModule::CheckSubdetectorStatus> Checking subdetector "<<subdet<<std::endl;
390 for (std::vector<int>::const_iterator
i=fedUnpackList.begin();
391 i!=fedUnpackList.end();
394 if (
debug_>2)
std::cout <<
"\t<HcalMonitorModule::CheckSubdetectorStatus> FED = "<<*
i<<std::endl;
396 if (fed.
size()<12)
continue;
400 if (!dccHeader)
return;
404 if (subdet==
HcalForward && ((dccid>=1118 && dccid<=1122) ||
405 (dccid>=718 && dccid<=723)))
428 if (!htr.
check())
continue;
434 for(
int fchan=0; fchan<3; ++fchan)
436 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 &)
MonitorElement * meUTCAFEDS_
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_