35 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
36 prefixME_.append(
"/");
95 if (
debug_>1)
std::cout <<
"\t<HcalBaseDQMonitor::dqmBeginRun> Getting Emap!"<<std::endl;
98 eMap_=pSetup->getHcalMapping();
156 if (
debug_>3)
std::cout <<
"<HcalBaseDQMonitor> setup in progress"<<std::endl;
164 meTevtHist_=ib.
book1D(
"Events_Processed_Task_Histogram",
"Counter of Events Processed By This Task",1,0.5,1.5);
214 if (
debug_>9)
std::cout <<
"<HcalBaseDQMonitor::IsAllowedCalibType>"<<std::endl;
217 if (
debug_>9)
std::cout <<
"\tNo calib types specified by user; All events allowed"<<std::endl;
221 if (
debug_>9)
std::cout <<
"\tHcalBaseDQMonitor::IsAllowedCalibType checking if calibration type = "<<
currenttype_<<
" is allowed...";
308 std::vector<int> fedUnpackList;
315 fedUnpackList.push_back(
i);
318 if (
debug_>1)
std::cout <<
"<HcalMonitorModule::CheckSubdetectorStatus> Checking subdetector "<<subdet<<std::endl;
319 for (std::vector<int>::const_iterator
i=fedUnpackList.begin();
320 i!=fedUnpackList.end();
323 if (
debug_>2)
std::cout <<
"\t<HcalMonitorModule::CheckSubdetectorStatus> FED = "<<*
i<<std::endl;
325 if (fed.
size()<12)
continue;
329 if (!dccHeader)
return;
332 if (subdet ==
HcalForward && ((dccid>=1118 && dccid<=1122) ||
333 (dccid>=718 && dccid<=723)))
354 if (!htr.
check())
continue;
360 for(
int fchan=0; fchan<3; ++fchan)
362 for(
int fib=1; fib<9; ++fib)
401 int numEmptyFEDs = 0 ;
402 std::vector<int> calibTypeCounter(8,0) ;
411 if ( fedData.
size() < 24 ) numEmptyFEDs++ ;
412 if ( fedData.
size() < 24 )
continue;
417 edm::LogWarning(
"HcalMonitorModule::CalibTypeFilter") <<
"Unexpected Calibration type: "<< value <<
" in FED: "<<
i<<
" (should be 0-7). I am bailing out...";
421 calibTypeCounter.at(value)++ ;
427 for (
unsigned int i=0;
i<calibTypeCounter.size();
i++) {
428 if ( calibTypeCounter.at(
i) > maxCount )
429 { calibType =
i ; maxCount = calibTypeCounter.at(
i) ; }
430 if ( maxCount == numberOfFEDIds ) break ;
433 if ( maxCount != (numberOfFEDIds-numEmptyFEDs) )
434 edm::LogWarning(
"HcalMonitorModule::CalibTypeFilter") <<
"Conflicting calibration types found. Assigning type "
436 LogDebug(
"HcalMonitorModule::CalibTypeFilter") <<
"Calibration type is: " <<
calibType ;
443 if (
debug_>2)
std::cout <<
"\t<HcalMonitorModule> ievt = "<<
ievt_<<
" calibration type = "<<calibType<<std::endl;
virtual void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
T getUntrackedParameter(std::string const &, T const &) const
virtual void dqmBeginRun(const edm::Run &run, const edm::EventSetup &c)
bool LumiInOrder(int lumisec)
MonitorElement * ProblemsCurrentLB
bool check() const
Check for a good event Requires a minimum length, matching wordcount and length, not an empty event...
edm::EDGetTokenT< FEDRawDataCollection > tok_braw_
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
void CheckCalibType(const edm::Handle< FEDRawDataCollection > &)
unsigned int htrTopBottom() const
HcalElectronicsId-style HTR top/bottom (1=top/0=bottom)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * ProblemsVsLB_HF
#define DEFINE_FWK_MODULE(type)
std::vector< int > AllowedCalibTypes_
virtual void cleanup(void)
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
MonitorElement * bookInt(Args &&...args)
edm::LuminosityBlockNumber_t luminosityBlock() const
void getLogicalMap(const edm::EventSetup &c)
size_t size() const
Lenght of the data buffer in bytes.
const HcalElectronicsMap * eMap_
LuminosityBlockNumber_t luminosityBlock() const
unsigned int htrSlot() const
HcalElectronicsId-style HTR slot.
MonitorElement * meTevtHist_
bool IsAllowedCalibType()
MonitorElement * ProblemsVsLB_HBHEHF
virtual ~HcalBaseDQMonitor()
MonitorElement * ProblemsVsLB_HB
HcalLogicalMap * logicalMap_
edm::InputTag FEDRawDataCollection_
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * book1D(Args &&...args)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
HcalLogicalMap createMap(const HcalTopology *topo, unsigned int mapIOV=4)
void setHTR(int crate, int slot, int tb)
void setCurrentFolder(const std::string &fullpath)
void CheckSubdetectorStatus(const edm::Handle< FEDRawDataCollection > &, HcalSubdetector, const HcalElectronicsMap &)
MonitorElement * book2D(Args &&...args)
bool null() const
is this a null id ?
MonitorElement * ProblemsVsLB_HE
virtual void endRun(const edm::Run &run, const edm::EventSetup &c)
unsigned int readoutVMECrateId() const
HcalElectronicsId-style VME crate number.
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
MonitorElement * ProblemsVsLB_HO
MonitorElement * ProblemsVsLB
TH2F * getTH2F(void) const
void Reset(void)
reset ME (ie. contents, errors, etc)
virtual void setup(DQMStore::IBooker &)
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!!!!!)