34 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
35 prefixME_.append(
"/");
62 if (
debug_>2)
std::cout <<
"\tHcalRawDataClient::endLuminosityBlock()"<<std::endl;
76 if (
debug_>2)
std::cout <<
"\t\tHcalRawDataClient::calculateProblems()"<<std::endl;
79 int etabins=0, phibins=0, zside=0;
80 double problemvalue=0;
117 if (temp_exclude != 0)
140 if (totalevents==0 || totalevents<
minevents_)
continue;
147 if (ieta==-9999)
continue;
153 if (problemvalue==0)
continue;
154 problemvalue/=totalevents;
155 problemvalue =
std::min(1.,problemvalue);
159 ieta<0 ? zside = -1 : zside = 1;
161 if (
debug_>0)
std::cout <<
"problemvalue = "<<problemvalue<<
" ieta = "<<zside<<
" iphi = "<<
phi+1<<
" d = "<<d+1<<std::endl;
185 if (
debug_>0)
std::cout <<
"<HcalRawDataClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
211 std::cout <<
"<HcalRawDataClient::beginJob()> Displaying dqmStore directory structure:"<<std::endl;
231 if (
debug_>2)
std::cout <<
"\t<HcalRawDataClient::beginRun> Get Hcal mapping"<<std::endl;
239 uint32_t itsspigot =0;
240 uint32_t itshtrchan=0;
242 if (
debug_>2)
std::cout <<
"\t<HcalRawDataClient::beginRun> Loop over AllEIds"<<std::endl;
244 for (std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin();
245 eid != AllElIds.end();
251 if (!detid_.
null()) {
252 if (detid_.
det()!=4)
continue;
258 itsdcc =(uint32_t) eid->dccid();
259 itsspigot =(uint32_t) eid->spigot();
260 itshtrchan=(uint32_t) eid->htrChanId();
267 if (
debug_>2)
std::cout <<
"\t<HcalRawDataClient::beginRun> Completed loop."<<std::endl;
272 if (
debug_>0)
std::cout <<
"<HcalRawDataClient::beginRun> dqmStore does not exist!"<<std::endl;
280 " Problem Raw Data Rate for all HCAL;ieta;iphi",
289 ProblemCells->getTH2F()->SetMinimum(0);
290 ProblemCells->getTH2F()->SetMaximum(1.05);
308 if (
debug_>1)
std::cout <<
"<HcalRawDataClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
314 for (
int depth=0;depth<4; ++depth)
318 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
320 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
323 if (ieta==-9999)
continue;
332 if (problemcount>0)
return true;
352 if (
debug_>1)
std::cout<<
"\t<HcalRawDataClient>: getHardwareSpaceHistos()"<<std::endl;
353 s=
subdir_+
"Corruption/01 Common Data Format violations";
356 if (!meCDFErrorFound_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
358 s=
subdir_+
"Corruption/02 DCC Event Format violation";
361 if (!meDCCEventFormatError_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
363 s=
subdir_+
"Corruption/03 OrN Inconsistent - HTR vs DCC";
366 if (!meOrNSynch_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
368 s=
subdir_+
"Corruption/05 BCN Inconsistent - HTR vs DCC";
371 if (!meBCNSynch_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
373 s=
subdir_+
"Corruption/06 EvN Inconsistent - HTR vs DCC";
376 if (!meEvtNumberSynch_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
378 s=
subdir_+
"Corruption/07 LRB Data Corruption Indicators";
381 if (!LRBDataCorruptionIndicators_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
383 s=
subdir_+
"Corruption/08 Half-HTR Data Corruption Indicators";
386 if (!HalfHTRDataCorruptionIndicators_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
388 s=
subdir_+
"Corruption/09 Channel Integrity Summarized by Spigot";
391 if (!ChannSumm_DataIntegrityCheck_ & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
392 if (ChannSumm_DataIntegrityCheck_)
393 ChannSumm_DataIntegrityCheck_->SetMinimum(0);
397 sprintf(chararray,
"Corruption/Channel Data Integrity/FED %03d Channel Integrity",
i+700);
401 if (!Chann_DataIntegrityCheck_[
i] & (
debug_>0))
std::cout <<
"<HcalRawDataClient::analyze> "<<s<<
" histogram does not exist!"<<std::endl;
402 if (Chann_DataIntegrityCheck_[
i])
403 Chann_DataIntegrityCheck_[
i]->SetMinimum(0);
407 if (
debug_>1)
std::cout <<
"\t<HcalRawDataClient>::fillProblemCountArray(): getHardwareSpaceHistos()"<<std::endl;
412 bool CheckmeCDFErrorFound_ =
false;
413 bool CheckmeDCCEventFormatError_ =
false;
414 bool CheckmeOrNSynch_ =
false;
415 bool CheckmeBCNSynch_ =
false;
416 bool CheckmeEvtNumberSynch_ =
false;
417 bool CheckLRBDataCorruptionIndicators_ =
false;
418 bool CheckHalfHTRDataCorruptionIndicators_ =
false;
419 bool CheckChannSumm_DataIntegrityCheck_ =
false;
420 bool CheckChann_DataIntegrityCheck_[
NUMDCCS] = {
false};
439 TH1D* ProjXmeCDFErrorFound_ = 0;
440 bool CheckProjXmeCDFErrorFound_ =
false;
441 if (CheckmeCDFErrorFound_)
443 if (ProjXmeCDFErrorFound_!=0) CheckProjXmeCDFErrorFound_=
true;
444 TH1D* ProjXmeDCCEventFormatError_ = 0;
445 bool CheckProjXmeDCCEventFormatError_ =
false;
446 if (CheckmeDCCEventFormatError_)
448 if (ProjXmeDCCEventFormatError_!=0) CheckProjXmeDCCEventFormatError_ =
true;
453 CheckChann_DataIntegrityCheck_[dcc_] =
true;
455 if (CheckProjXmeCDFErrorFound_) {
456 n = ProjXmeCDFErrorFound_->GetBinContent(1+dcc_);
459 if (CheckProjXmeDCCEventFormatError_) {
460 n = ProjXmeDCCEventFormatError_->GetBinContent(1+dcc_);
464 fed3offset = 1 + (4*dcc_);
465 fed2offset = 1 + (3*dcc_);
466 for (
int spigot=0; spigot<
NUMSPGS; spigot++) {
468 if (CheckmeOrNSynch_) {
472 if (CheckmeBCNSynch_) {
476 if (CheckmeEvtNumberSynch_) {
480 spg3offset = 1 + (4*spigot);
481 if (CheckLRBDataCorruptionIndicators_ ){
485 for (
int xbin=1; xbin<=3; xbin++) {
486 for (
int ybin=1; ybin<=3; ybin++) {
493 if (CheckHalfHTRDataCorruptionIndicators_){
495 for (
int xbin=1; xbin<=3; xbin++) {
496 for (
int ybin=1; ybin<=3; ybin++) {
503 spg2offset = 1 + (3*spigot);
504 if (CheckChann_DataIntegrityCheck_[dcc_] &&
505 CheckChannSumm_DataIntegrityCheck_ ){
510 for (
int chnnum=0; chnnum<
HTRCHANMAX; chnnum++) {
511 chn2offset = 1 + (3*chnnum);
518 float CRweight = 0.0;
519 float Erweight = 0.0;
521 CRweight = (1.0 / (tsFactor-1.0));
522 Erweight = (1.0 / (tsFactor ));
524 int xbin=1;
int ybin=1;
553 mydepth = HDI.
depth();
558 if (myeta>=0 && myeta<85 &&
559 (myphi-1)>=0 && (myphi-1)<72 &&
560 (mydepth-1)>=0 && (mydepth-1)<4){
587 mydepth = HDI.
depth();
592 if (myeta>=0 && myeta<85 &&
593 (myphi-1)>=0 && (myphi-1)<72 &&
594 (mydepth-1)>=0 && (mydepth-1)<4){
615 int i=
hashup(dcc,spigot,htrchan);
620 mydepth = HDI.
depth();
626 if (myeta>=0 && myeta<85 &&
627 (myphi-1)>=0 && (myphi-1)<72 &&
628 (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_
Abs< T >::type abs(const T &t)
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)