36 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
37 prefixME_.append(
"/");
64 if (
debug_>2)
std::cout <<
"\tHcalRawDataClient::endLuminosityBlock()"<<std::endl;
78 if (
debug_>2)
std::cout <<
"\t\tHcalRawDataClient::calculateProblems()"<<std::endl;
81 int etabins=0, phibins=0, zside=0;
82 double problemvalue=0;
119 if (temp_exclude != 0)
142 if (totalevents==0 || totalevents<
minevents_)
continue;
149 if (ieta==-9999)
continue;
155 if (problemvalue==0)
continue;
156 problemvalue/=totalevents;
157 problemvalue =
std::min(1.,problemvalue);
161 ieta<0 ? zside = -1 : zside = 1;
163 if (
debug_>0)
std::cout <<
"problemvalue = "<<problemvalue<<
" ieta = "<<zside<<
" iphi = "<<
phi+1<<
" d = "<<d+1<<std::endl;
187 if (
debug_>0)
std::cout <<
"<HcalRawDataClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
213 std::cout <<
"<HcalRawDataClient::beginJob()> Displaying dqmStore directory structure:"<<std::endl;
233 if (
debug_>2)
std::cout <<
"\t<HcalRawDataClient::beginRun> Get Hcal mapping"<<std::endl;
241 uint32_t itsspigot =0;
242 uint32_t itshtrchan=0;
244 if (
debug_>2)
std::cout <<
"\t<HcalRawDataClient::beginRun> Loop over AllEIds"<<std::endl;
246 for (std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin();
247 eid != AllElIds.end();
253 if (!detid_.
null()) {
254 if (detid_.
det()!=4)
continue;
260 itsdcc =(uint32_t) eid->dccid();
261 itsspigot =(uint32_t) eid->spigot();
262 itshtrchan=(uint32_t) eid->htrChanId();
269 if (
debug_>2)
std::cout <<
"\t<HcalRawDataClient::beginRun> Completed loop."<<std::endl;
274 if (
debug_>0)
std::cout <<
"<HcalRawDataClient::beginRun> dqmStore does not exist!"<<std::endl;
282 " Problem Raw Data Rate for all HCAL;ieta;iphi",
291 ProblemCells->getTH2F()->SetMinimum(0);
292 ProblemCells->getTH2F()->SetMaximum(1.05);
310 if (
debug_>1)
std::cout <<
"<HcalRawDataClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
316 for (
int depth=0;depth<4; ++depth)
320 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
322 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
325 if (ieta==-9999)
continue;
334 if (problemcount>0)
return true;
354 if (
debug_>1)
std::cout<<
"\t<HcalRawDataClient>: getHardwareSpaceHistos()"<<std::endl;
355 s=
subdir_+
"Corruption/01 Common Data Format violations";
358 if (!meCDFErrorFound_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
360 s=
subdir_+
"Corruption/02 DCC Event Format violation";
363 if (!meDCCEventFormatError_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
365 s=
subdir_+
"Corruption/03 OrN Inconsistent - HTR vs DCC";
368 if (!meOrNSynch_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
370 s=
subdir_+
"Corruption/05 BCN Inconsistent - HTR vs DCC";
373 if (!meBCNSynch_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
375 s=
subdir_+
"Corruption/06 EvN Inconsistent - HTR vs DCC";
378 if (!meEvtNumberSynch_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
380 s=
subdir_+
"Corruption/07 LRB Data Corruption Indicators";
383 if (!LRBDataCorruptionIndicators_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
385 s=
subdir_+
"Corruption/08 Half-HTR Data Corruption Indicators";
388 if (!HalfHTRDataCorruptionIndicators_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
390 s=
subdir_+
"Corruption/09 Channel Integrity Summarized by Spigot";
393 if (!ChannSumm_DataIntegrityCheck_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
394 if (ChannSumm_DataIntegrityCheck_)
395 ChannSumm_DataIntegrityCheck_->SetMinimum(0);
399 sprintf(chararray,
"Corruption/Channel Data Integrity/FED %03d Channel Integrity",
i+700);
400 s=
subdir_+std::string(chararray);
403 if (!Chann_DataIntegrityCheck_[
i] & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
404 if (Chann_DataIntegrityCheck_[
i])
405 Chann_DataIntegrityCheck_[
i]->SetMinimum(0);
409 if (
debug_>1)
std::cout <<
"\t<HcalRawDataClient>::fillProblemCountArray(): getHardwareSpaceHistos()"<<std::endl;
414 bool CheckmeCDFErrorFound_ =
false;
415 bool CheckmeDCCEventFormatError_ =
false;
416 bool CheckmeOrNSynch_ =
false;
417 bool CheckmeBCNSynch_ =
false;
418 bool CheckmeEvtNumberSynch_ =
false;
419 bool CheckLRBDataCorruptionIndicators_ =
false;
420 bool CheckHalfHTRDataCorruptionIndicators_ =
false;
421 bool CheckChannSumm_DataIntegrityCheck_ =
false;
422 bool CheckChann_DataIntegrityCheck_[
NUMDCCS] = {
false};
441 TH1D* ProjXmeCDFErrorFound_ = 0;
442 bool CheckProjXmeCDFErrorFound_ =
false;
443 if (CheckmeCDFErrorFound_)
445 if (ProjXmeCDFErrorFound_!=0) CheckProjXmeCDFErrorFound_=
true;
446 TH1D* ProjXmeDCCEventFormatError_ = 0;
447 bool CheckProjXmeDCCEventFormatError_ =
false;
448 if (CheckmeDCCEventFormatError_)
450 if (ProjXmeDCCEventFormatError_!=0) CheckProjXmeDCCEventFormatError_ =
true;
455 CheckChann_DataIntegrityCheck_[dcc_] =
true;
457 if (CheckProjXmeCDFErrorFound_) {
458 n = ProjXmeCDFErrorFound_->GetBinContent(1+dcc_);
461 if (CheckProjXmeDCCEventFormatError_) {
462 n = ProjXmeDCCEventFormatError_->GetBinContent(1+dcc_);
466 fed3offset = 1 + (4*dcc_);
467 fed2offset = 1 + (3*dcc_);
468 for (
int spigot=0; spigot<
NUMSPGS; spigot++) {
470 if (CheckmeOrNSynch_) {
474 if (CheckmeBCNSynch_) {
478 if (CheckmeEvtNumberSynch_) {
482 spg3offset = 1 + (4*spigot);
483 if (CheckLRBDataCorruptionIndicators_ ){
487 for (
int xbin=1; xbin<=3; xbin++) {
488 for (
int ybin=1; ybin<=3; ybin++) {
495 if (CheckHalfHTRDataCorruptionIndicators_){
497 for (
int xbin=1; xbin<=3; xbin++) {
498 for (
int ybin=1; ybin<=3; ybin++) {
505 spg2offset = 1 + (3*spigot);
506 if (CheckChann_DataIntegrityCheck_[dcc_] &&
507 CheckChannSumm_DataIntegrityCheck_ ){
512 for (
int chnnum=0; chnnum<
HTRCHANMAX; chnnum++) {
513 chn2offset = 1 + (3*chnnum);
520 float CRweight = 0.0;
521 float Erweight = 0.0;
523 CRweight = (1.0 / (tsFactor-1.0));
524 Erweight = (1.0 / (tsFactor ));
526 int xbin=1;
int ybin=1;
555 mydepth = HDI.
depth();
560 if (myeta>=0 && myeta<85 &&
561 (myphi-1)>=0 && (myphi-1)<72 &&
562 (mydepth-1)>=0 && (mydepth-1)<4){
589 mydepth = HDI.
depth();
594 if (myeta>=0 && myeta<85 &&
595 (myphi-1)>=0 && (myphi-1)<72 &&
596 (mydepth-1)>=0 && (mydepth-1)<4){
617 int i=
hashup(dcc,spigot,htrchan);
622 mydepth = HDI.
depth();
628 if (myeta>=0 && myeta<85 &&
629 (myphi-1)>=0 && (myphi-1)<72 &&
630 (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)
void mapDCCproblem(int dcc, float n)
void mapChannproblem(int dcc, int spigot, int htrchan, float n)
std::vector< std::string > HcalEtaPhiHistNames()
void setup(DQMStore *&m_dbe, std::string Name, std::string Units="")
const edm::EventSetup * c
void fillProblemCountArray(void)
TH2F * Chann_DataIntegrityCheck_[NUMDCCS]
bool isHE(int etabin, int depth)
void getHardwareSpaceHistos(void)
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_
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
bool isHB(int etabin, int depth)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
int iphi() const
get the cell iphi
TH2F * meDCCEventFormatError_
bool isHF(int etabin, int depth)
unsigned long long uint64_t
void calculateProblems(void)
int64_t getIntValue(void) const
uint64_t problemcount[85][72][4]
float numTS_[NUMDCCS *NUMSPGS]
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_[NUMDCCS *NUMSPGS *HTRCHANMAX]
TH2F * HalfHTRDataCorruptionIndicators_
void showDirStructure(void) const
int badChannelStatusMask_
TH2F * getTH2F(void) const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
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
void endLuminosityBlock(void)
void setCurrentFolder(const std::string &fullpath)