34 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
35 prefixME_.append(
"/");
70 if (
debug_>2)
std::cout <<
"\t\tHcalRawDataClient::calculateProblems()"<<std::endl;
72 int etabins=0, phibins=0,
zside=0;
73 double problemvalue=0;
77 me = ig.
get(
subdir_+
"Events_Processed_Task_Histogram");
110 if (temp_exclude != 0)
133 if (totalevents==0 || totalevents<
minevents_)
continue;
140 if (ieta==-9999)
continue;
146 if (problemvalue==0)
continue;
147 problemvalue/=totalevents;
148 problemvalue =
std::min(1.,problemvalue);
152 ieta<0 ?
zside = -1 : zside = 1;
154 if (
debug_>0)
std::cout <<
"problemvalue = "<<problemvalue<<
" ieta = "<<zside<<
" iphi = "<<
phi+1<<
" d = "<<d+1<<std::endl;
178 if (
debug_>0)
std::cout <<
"<HcalRawDataClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
215 if (
debug_>2)
std::cout <<
"\t<HcalRawDataClient::beginRun> Get Hcal mapping"<<std::endl;
223 uint32_t itsspigot =0;
224 uint32_t itshtrchan=0;
226 if (
debug_>2)
std::cout <<
"\t<HcalRawDataClient::beginRun> Loop over AllEIds"<<std::endl;
228 for (std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin();
229 eid != AllElIds.end();
235 if (!detid_.
null()) {
236 if (detid_.
det()!=4)
continue;
242 itsdcc =(uint32_t) eid->dccid();
243 itsspigot =(uint32_t) eid->spigot();
244 itshtrchan=(uint32_t) eid->htrChanId();
251 if (
debug_>2)
std::cout <<
"\t<HcalRawDataClient::beginRun> Completed loop."<<std::endl;
265 " Problem Raw Data Rate for all HCAL;ieta;iphi",
274 ProblemCells->getTH2F()->SetMinimum(0);
275 ProblemCells->getTH2F()->SetMaximum(1.05);
294 if (
debug_>1)
std::cout <<
"<HcalRawDataClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
304 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
306 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
309 if (ieta==-9999)
continue;
318 if (problemcount>0)
return true;
338 if (
debug_>1)
std::cout<<
"\t<HcalRawDataClient>: getHardwareSpaceHistos()"<<std::endl;
339 s=
subdir_+
"Corruption/01 Common Data Format violations";
340 me=ig.
get(s.c_str());
342 if (!meCDFErrorFound_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
344 s=
subdir_+
"Corruption/02 DCC Event Format violation";
345 me=ig.
get(s.c_str());
347 if (!meDCCEventFormatError_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
349 s=
subdir_+
"Corruption/03 OrN Inconsistent - HTR vs DCC";
350 me=ig.
get(s.c_str());
352 if (!meOrNSynch_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
354 s=
subdir_+
"Corruption/05 BCN Inconsistent - HTR vs DCC";
355 me=ig.
get(s.c_str());
357 if (!meBCNSynch_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
359 s=
subdir_+
"Corruption/06 EvN Inconsistent - HTR vs DCC";
360 me=ig.
get(s.c_str());
362 if (!meEvtNumberSynch_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
364 s=
subdir_+
"Corruption/07 LRB Data Corruption Indicators";
365 me=ig.
get(s.c_str());
367 if (!LRBDataCorruptionIndicators_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
369 s=
subdir_+
"Corruption/08 Half-HTR Data Corruption Indicators";
370 me=ig.
get(s.c_str());
372 if (!HalfHTRDataCorruptionIndicators_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
374 s=
subdir_+
"Corruption/09 Channel Integrity Summarized by Spigot";
375 me=ig.
get(s.c_str());
377 if (!ChannSumm_DataIntegrityCheck_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
378 if (ChannSumm_DataIntegrityCheck_)
379 ChannSumm_DataIntegrityCheck_->SetMinimum(0);
383 sprintf(chararray,
"Corruption/Channel Data Integrity/FED %03d Channel Integrity",
i+700);
385 me=ig.
get(s.c_str());
387 if (!Chann_DataIntegrityCheck_[
i] & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
388 if (Chann_DataIntegrityCheck_[
i])
389 Chann_DataIntegrityCheck_[
i]->SetMinimum(0);
393 if (
debug_>1)
std::cout <<
"\t<HcalRawDataClient>::fillProblemCountArray(): getHardwareSpaceHistos()"<<std::endl;
398 bool CheckmeCDFErrorFound_ =
false;
399 bool CheckmeDCCEventFormatError_ =
false;
400 bool CheckmeOrNSynch_ =
false;
401 bool CheckmeBCNSynch_ =
false;
402 bool CheckmeEvtNumberSynch_ =
false;
403 bool CheckLRBDataCorruptionIndicators_ =
false;
404 bool CheckHalfHTRDataCorruptionIndicators_ =
false;
405 bool CheckChannSumm_DataIntegrityCheck_ =
false;
406 bool CheckChann_DataIntegrityCheck_[
NUMDCCS] = {
false};
425 TH1D* ProjXmeCDFErrorFound_ = 0;
426 bool CheckProjXmeCDFErrorFound_ =
false;
427 if (CheckmeCDFErrorFound_)
429 if (ProjXmeCDFErrorFound_!=0) CheckProjXmeCDFErrorFound_=
true;
430 TH1D* ProjXmeDCCEventFormatError_ = 0;
431 bool CheckProjXmeDCCEventFormatError_ =
false;
432 if (CheckmeDCCEventFormatError_)
434 if (ProjXmeDCCEventFormatError_!=0) CheckProjXmeDCCEventFormatError_ =
true;
439 CheckChann_DataIntegrityCheck_[dcc_] =
true;
441 if (CheckProjXmeCDFErrorFound_) {
442 n = ProjXmeCDFErrorFound_->GetBinContent(1+dcc_);
445 if (CheckProjXmeDCCEventFormatError_) {
446 n = ProjXmeDCCEventFormatError_->GetBinContent(1+dcc_);
450 fed3offset = 1 + (4*dcc_);
451 fed2offset = 1 + (3*dcc_);
452 for (
int spigot=0; spigot<
NUMSPGS; spigot++) {
454 if (CheckmeOrNSynch_) {
458 if (CheckmeBCNSynch_) {
462 if (CheckmeEvtNumberSynch_) {
466 spg3offset = 1 + (4*spigot);
467 if (CheckLRBDataCorruptionIndicators_ ){
471 for (
int xbin=1; xbin<=3; xbin++) {
472 for (
int ybin=1; ybin<=3; ybin++) {
479 if (CheckHalfHTRDataCorruptionIndicators_){
481 for (
int xbin=1; xbin<=3; xbin++) {
482 for (
int ybin=1; ybin<=3; ybin++) {
489 spg2offset = 1 + (3*spigot);
490 if (CheckChann_DataIntegrityCheck_[dcc_] &&
491 CheckChannSumm_DataIntegrityCheck_ ){
496 for (
int chnnum=0; chnnum<
HTRCHANMAX; chnnum++) {
497 chn2offset = 1 + (3*chnnum);
504 float CRweight = 0.0;
505 float Erweight = 0.0;
507 CRweight = (1.0 / (tsFactor-1.0));
508 Erweight = (1.0 / (tsFactor ));
510 int xbin=1;
int ybin=1;
539 mydepth = HDI.
depth();
544 if (myeta>=0 && myeta<85 &&
545 (myphi-1)>=0 && (myphi-1)<72 &&
546 (mydepth-1)>=0 && (mydepth-1)<4){
573 mydepth = HDI.
depth();
578 if (myeta>=0 && myeta<85 &&
579 (myphi-1)>=0 && (myphi-1)<72 &&
580 (mydepth-1)>=0 && (mydepth-1)<4){
601 int i=
hashup(dcc,spigot,htrchan);
606 mydepth = HDI.
depth();
612 if (myeta>=0 && myeta<85 &&
613 (myphi-1)>=0 && (myphi-1)<72 &&
614 (mydepth-1)>=0 && (mydepth-1)<4){
bool isHO(int etabin, int depth)
TH2F * LRBDataCorruptionIndicators_
static const HcalDetId Undefined
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
MonitorElement * ProblemCells
void setBinContent(int binx, double content)
set content of bin (1-D)
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
TH2F * ChannSumm_DataIntegrityCheck_
HcalSubdetector subdet() const
get the subdetector
HcalDetId HashToHDI(int thehash)
void normalizeHardwareSpaceHistos(void)
void stashHDI(int thehash, HcalDetId thehcaldetid)
MonitorElement * get(const std::string &path)
void mapDCCproblem(int dcc, float n)
TH2F * Chann_DataIntegrityCheck_[32]
void mapChannproblem(int dcc, int spigot, int htrchan, float n)
std::vector< std::string > HcalEtaPhiHistNames()
const edm::EventSetup * c
bool isHE(int etabin, int depth)
void setupProblemCells(DQMStore::IBooker &, DQMStore::IGetter &)
void getHardwareSpaceHistos(DQMStore::IBooker &, DQMStore::IGetter &)
bool hasWarnings_Temp(void)
HcalRawDataClient()
Constructors.
void updateChannelStatus(std::map< HcalDetId, unsigned int > &myqual)
bool hasErrors_Temp(void)
int hashup(uint32_t d=0, uint32_t s=0, uint32_t c=1)
bool isSiPM(int ieta, int iphi, int depth)
int depth() const
get the tower depth
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
std::vector< std::string > problemnames_
EtaPhiHists * ProblemCellsByDepth
int ieta() const
get the cell ieta
const HcalElectronicsMap * readoutMap_
Abs< T >::type abs(const T &t)
void setup(DQMStore::IBooker &m_dbe, std::string Name, std::string Units="")
void analyze(DQMStore::IBooker &, DQMStore::IGetter &)
bool isHB(int etabin, int depth)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void fillProblemCountArray(DQMStore::IBooker &, DQMStore::IGetter &)
int iphi() const
get the cell iphi
TH2F * meDCCEventFormatError_
virtual void calculateProblems(void)
bool isHF(int etabin, int depth)
void setCurrentFolder(const std::string &fullpath)
unsigned long long uint64_t
MonitorElement * book2D(Args &&...args)
int64_t getIntValue(void) const
uint64_t problemcount[85][72][4]
bool null() const
is this a null id ?
std::map< HcalDetId, unsigned int > badstatusmap
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
int CalcEtaBin(int subdet, int ieta, int depth)
double getBinContent(int binx) const
get content of bin (1-D)
~HcalRawDataClient()
Destructor.
HcalDetId hashedHcalDetId_[32 *15 *24]
TH2F * HalfHTRDataCorruptionIndicators_
int badChannelStatusMask_
TH2F * getTH2F(void) const
Detector det() const
get the detector field from this detid
void Reset(void)
reset ME (ie. contents, errors, etc)
void mapHTRproblem(int dcc, int spigot, float n)
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id