CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
HcalRawDataClient Class Reference

#include <HcalRawDataClient.h>

Inheritance diagram for HcalRawDataClient:
HcalBaseDQClient

Public Member Functions

void analyze (DQMStore::IBooker &, DQMStore::IGetter &)
 
void beginRun (void)
 
void calculateProblems (DQMStore::IBooker &, DQMStore::IGetter &)
 
void cleanup (void)
 
void endJob (void)
 
bool hasErrors_Temp (void)
 
bool hasOther_Temp (void)
 
bool hasWarnings_Temp (void)
 
 HcalRawDataClient ()
 Constructors. More...
 
 HcalRawDataClient (std::string myname)
 
 HcalRawDataClient (std::string myname, const edm::ParameterSet &ps)
 
void setup (void)
 
bool test_enabled (void)
 
void updateChannelStatus (std::map< HcalDetId, unsigned int > &myqual)
 
 ~HcalRawDataClient ()
 Destructor. More...
 
- Public Member Functions inherited from HcalBaseDQClient
virtual void calculateProblems (void)
 
void getLogicalMap (const edm::EventSetup &es)
 
 HcalBaseDQClient ()
 
 HcalBaseDQClient (std::string s, const edm::ParameterSet &ps)
 
virtual void htmlOutput (DQMStore::IBooker &, DQMStore::IGetter &, std::string htmlDir)
 
std::string name ()
 
void setEventSetup (const edm::EventSetup &es)
 
virtual void setStatusMap (std::map< HcalDetId, unsigned int > &map)
 
void setTopo (const HcalTopology *topo)
 
virtual bool validHtmlOutput (DQMStore::IBooker &, DQMStore::IGetter &)
 
virtual ~HcalBaseDQClient (void)
 

Private Member Functions

void fillProblemCountArray (DQMStore::IBooker &, DQMStore::IGetter &)
 
void getHardwareSpaceHistos (DQMStore::IBooker &, DQMStore::IGetter &)
 
HcalDetId HashToHDI (int thehash)
 
int hashup (uint32_t d=0, uint32_t s=0, uint32_t c=1)
 
void mapChannproblem (int dcc, int spigot, int htrchan, float n)
 
void mapDCCproblem (int dcc, float n)
 
void mapHTRproblem (int dcc, int spigot, float n)
 
void normalizeHardwareSpaceHistos (void)
 
void setupProblemCells (DQMStore::IBooker &, DQMStore::IGetter &)
 
void stashHDI (int thehash, HcalDetId thehcaldetid)
 

Private Attributes

TH2F * Chann_DataIntegrityCheck_ [32]
 
TH2F * ChannSumm_DataIntegrityCheck_
 
TH2F * DataFlowInd_
 
bool doProblemCellSetup_
 
bool excludeHORing2_
 
TH2F * HalfHTRDataCorruptionIndicators_
 
HcalDetId hashedHcalDetId_ [32 *15 *24]
 
TH2F * LRBDataCorruptionIndicators_
 
TH2F * meBCNSynch_
 
TH2F * meCDFErrorFound_
 
TH2F * meDCCEventFormatError_
 
TH2F * meEvtNumberSynch_
 
TH2F * meOrNSynch_
 
int nevts_
 
float numTS_ [32 *15]
 
uint64_t problemcount [85][72][4]
 
const HcalElectronicsMapreadoutMap_
 

Additional Inherited Members

- Public Attributes inherited from HcalBaseDQClient
int badChannelStatusMask_
 
std::map< HcalDetId, unsigned int > badstatusmap
 
const edm::EventSetupc
 
bool cloneME_
 
int debug_
 
bool enableCleanup_
 
bool enoughevents_
 
HcalLogicalMaplogicalMap_
 
double minerrorrate_
 
int minevents_
 
std::string name_
 
bool needLogicalMap_
 
bool Online_
 
std::string prefixME_
 
MonitorElementProblemCells
 
EtaPhiHistsProblemCellsByDepth
 
std::vector< std::string > problemnames_
 
std::string subdir_
 
bool testenabled_
 
const HcalTopologytopo_
 
bool validHtmlOutput_
 

Detailed Description

Definition at line 12 of file HcalRawDataClient.h.

Constructor & Destructor Documentation

HcalRawDataClient::HcalRawDataClient ( )
inline

Constructors.

Definition at line 17 of file HcalRawDataClient.h.

References HcalBaseDQClient::name_.

17 {name_="";};
HcalRawDataClient::HcalRawDataClient ( std::string  myname)

Definition at line 23 of file HcalRawDataClient.cc.

References HcalBaseDQClient::name_.

24 {
25  name_=myname;
26 }
HcalRawDataClient::HcalRawDataClient ( std::string  myname,
const edm::ParameterSet ps 
)

Definition at line 28 of file HcalRawDataClient.cc.

References HcalBaseDQClient::badChannelStatusMask_, HcalBaseDQClient::cloneME_, HcalBaseDQClient::debug_, doProblemCellSetup_, HcalBaseDQClient::enableCleanup_, excludeHORing2_, edm::ParameterSet::getUntrackedParameter(), HcalBaseDQClient::minerrorrate_, HcalBaseDQClient::minevents_, HcalBaseDQClient::name_, HcalBaseDQClient::Online_, HcalBaseDQClient::prefixME_, HcalBaseDQClient::ProblemCells, HcalBaseDQClient::ProblemCellsByDepth, AlCaHLTBitMon_QueryRunRegistry::string, HcalBaseDQClient::subdir_, and HcalBaseDQClient::validHtmlOutput_.

29 {
30  name_=myname;
31  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup",false);
32  debug_ = ps.getUntrackedParameter<int>("debug",0);
33  prefixME_ = ps.getUntrackedParameter<std::string>("subSystemFolder","Hcal/");
34  if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
35  prefixME_.append("/");
36  subdir_ = ps.getUntrackedParameter<std::string>("RawDataFolder","RawDataMonitor_Hcal/"); // RawDataMonitor
37  if (subdir_.size()>0 && subdir_.substr(subdir_.size()-1,subdir_.size())!="/")
38  subdir_.append("/");
39  subdir_=prefixME_+subdir_;
40 
41  validHtmlOutput_ = ps.getUntrackedParameter<bool>("RawData_validHtmlOutput",true);
42  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
43  badChannelStatusMask_ = ps.getUntrackedParameter<int>("RawData_BadChannelStatusMask",
44  ps.getUntrackedParameter<int>("BadChannelStatusMask",0));
45 
46  minerrorrate_ = ps.getUntrackedParameter<double>("RawData_minerrorrate",
47  ps.getUntrackedParameter<double>("minerrorrate",0.01));
48  minevents_ = ps.getUntrackedParameter<int>("RawData_minevents",
49  ps.getUntrackedParameter<int>("minevents",1));
50 
51  excludeHORing2_ = ps.getUntrackedParameter<bool>("excludeHOring2_backup",false);
52  Online_ = ps.getUntrackedParameter<bool>("online",false);
53 
54  ProblemCells=0;
56 
57  doProblemCellSetup_ = true;
58 }
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * ProblemCells
EtaPhiHists * ProblemCellsByDepth
std::string subdir_
std::string prefixME_
HcalRawDataClient::~HcalRawDataClient ( )

Destructor.

Definition at line 706 of file HcalRawDataClient.cc.

References HcalBaseDQClient::ProblemCellsByDepth.

707 {
709 }
EtaPhiHists * ProblemCellsByDepth

Member Function Documentation

void HcalRawDataClient::analyze ( DQMStore::IBooker ib,
DQMStore::IGetter ig 
)
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 61 of file HcalRawDataClient.cc.

References HcalBaseDQClient::calculateProblems(), gather_cfg::cout, HcalBaseDQClient::debug_, doProblemCellSetup_, and setupProblemCells().

62 {
63  if (debug_>2) std::cout <<"\tHcalRawDataClient::analyze()"<<std::endl;
65  calculateProblems(ib,ig);
66 }
void setupProblemCells(DQMStore::IBooker &, DQMStore::IGetter &)
virtual void calculateProblems(void)
tuple cout
Definition: gather_cfg.py:145
void HcalRawDataClient::beginRun ( void  )
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 209 of file HcalRawDataClient.cc.

References HcalElectronicsMap::allElectronicsIdPrecision(), HcalBaseDQClient::c, gather_cfg::cout, HcalBaseDQClient::debug_, DetId::det(), HcalBaseDQClient::enoughevents_, edm::EventSetup::get(), hashup(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HcalElectronicsMap::lookup(), nevts_, DetId::null(), readoutMap_, stashHDI(), and DetId::subdetId().

210 {
211  if (debug_>2) std::cout <<"<HcalRawDataClient::beginRun>"<<std::endl;
213  c->get<HcalDbRecord>().get( pSetup );
214 
215  if (debug_>2) std::cout <<"\t<HcalRawDataClient::beginRun> Get Hcal mapping"<<std::endl;
216  readoutMap_=pSetup->getHcalMapping();
217  DetId detid_;
218  HcalDetId hcaldetid_;
219 
220  // Build a map of readout hardware unit to calorimeter channel
221  std::vector <HcalElectronicsId> AllElIds = readoutMap_->allElectronicsIdPrecision();
222  uint32_t itsdcc =0;
223  uint32_t itsspigot =0;
224  uint32_t itshtrchan=0;
225 
226  if (debug_>2) std::cout <<"\t<HcalRawDataClient::beginRun> Loop over AllEIds"<<std::endl;
227  // by looping over all precision (non-trigger) items.
228  for (std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin();
229  eid != AllElIds.end();
230  eid++) {
231 
232  //Get the HcalDetId from the HcalElectronicsId
233  detid_ = readoutMap_->lookup(*eid);
234  // NULL if illegal; ignore
235  if (!detid_.null()) {
236  if (detid_.det()!=4) continue; //not Hcal
237  if (detid_.subdetId()!=HcalBarrel &&
238  detid_.subdetId()!=HcalEndcap &&
239  detid_.subdetId()!=HcalOuter &&
240  detid_.subdetId()!=HcalForward) continue;
241 
242  itsdcc =(uint32_t) eid->dccid();
243  itsspigot =(uint32_t) eid->spigot();
244  itshtrchan=(uint32_t) eid->htrChanId();
245  hcaldetid_ = HcalDetId(detid_);
246  stashHDI(hashup(itsdcc,itsspigot,itshtrchan),
247  hcaldetid_);
248  } // if (!detid_.null())
249  }
250 
251  if (debug_>2) std::cout <<"\t<HcalRawDataClient::beginRun> Completed loop."<<std::endl;
252 
253  enoughevents_=false;
254  nevts_=0;
255 }
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
void stashHDI(int thehash, HcalDetId thehcaldetid)
const edm::EventSetup * c
int hashup(uint32_t d=0, uint32_t s=0, uint32_t c=1)
const HcalElectronicsMap * readoutMap_
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
Definition: DetId.h:18
const T & get() const
Definition: EventSetup.h:56
bool null() const
is this a null id ?
Definition: DetId.h:45
tuple cout
Definition: gather_cfg.py:145
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
void HcalRawDataClient::calculateProblems ( DQMStore::IBooker ib,
DQMStore::IGetter ig 
)

Definition at line 68 of file HcalRawDataClient.cc.

References HcalBaseDQClient::badstatusmap, HcalObjRepresent::CalcIeta(), gather_cfg::cout, ztail::d, HcalBaseDQClient::debug_, EtaPhiHists::depth, HcalBaseDQClient::enoughevents_, eta, excludeHORing2_, MonitorElement::Fill(), fillProblemCountArray(), HcalObjRepresent::FillUnphysicalHEHFBins(), DQMStore::IGetter::get(), MonitorElement::getBinContent(), MonitorElement::getIntValue(), MonitorElement::getTH2F(), HcalBarrel, HcalEmpty, HcalEndcap, HcalEtaPhiHistNames(), HcalForward, HcalOuter, isHB(), isHE(), isHF(), isHO(), hlt_dqm_clientPB-live_cfg::me, min(), HcalBaseDQClient::minerrorrate_, HcalBaseDQClient::minevents_, HcalBaseDQClient::name(), phi, HcalBaseDQClient::ProblemCells, HcalBaseDQClient::ProblemCellsByDepth, problemcount, MonitorElement::Reset(), MonitorElement::setBinContent(), HcalBaseDQClient::subdir_, and ecaldqm::zside().

69 {
70  if (debug_>2) std::cout <<"\t\tHcalRawDataClient::calculateProblems()"<<std::endl;
71  double totalevents=0;
72  int etabins=0, phibins=0, zside=0;
73  double problemvalue=0;
74 
75  //Get number of events to normalize by
77  me = ig.get(subdir_+"Events_Processed_Task_Histogram");
78  if (me) totalevents=me->getBinContent(1);
79 
80  // Clear away old problems
81  if (ProblemCells!=0)
82  {
84  (ProblemCells->getTH2F())->SetMaximum(1.05);
85  (ProblemCells->getTH2F())->SetMinimum(0.);
86  }
87  for (unsigned int d=0;ProblemCellsByDepth!=0 && d<ProblemCellsByDepth->depth.size();++d)
88  {
89  if (ProblemCellsByDepth->depth[d]!=0)
90  {
91  ProblemCellsByDepth->depth[d]->Reset();
92  (ProblemCellsByDepth->depth[d]->getTH2F())->SetMaximum(1.05);
93  (ProblemCellsByDepth->depth[d]->getTH2F())->SetMinimum(0.);
94  }
95  for (unsigned int eta=0; eta<85;++eta) //spans largest ieta breadth
96  {
97  for (unsigned int phi=0;phi<72;++phi) //spans largest (only!) iphi breadth
98  {
99  problemcount[eta][phi][d]=0.0;
100  }
101  }
102  }
103  enoughevents_=true;
104 
105  // Try to read excludeHOring2 status from file
106 
107  MonitorElement* temp_exclude = ig.get(subdir_+"ExcludeHOring2");
108 
109  // If value can't be read from file, keep the excludeHOring2_backup status
110  if (temp_exclude != 0)
111  {
112  if (temp_exclude->getIntValue()>0)
113  excludeHORing2_ = true;
114  else
115  excludeHORing2_ = false;
116  }
117 
118 
119 
120  //Get the plots showing raw data errors,
121  //fill problemcount[][][]
122  fillProblemCountArray(ib,ig);
123 
124  std::vector<std::string> name = HcalEtaPhiHistNames();
125 
126  // Because we're clearing and re-forming the problem cell histogram here, we don't need to do any cute
127  // setting of the underflow bin to 0, and we can plot results as a raw rate between 0-1.
128 
129  for (unsigned int d=0;ProblemCellsByDepth!=0 && d<ProblemCellsByDepth->depth.size();++d)
130  {
131  if (ProblemCellsByDepth->depth[d]==0) continue;
132 
133  if (totalevents==0 || totalevents<minevents_) continue;
134  etabins=(ProblemCellsByDepth->depth[d]->getTH2F())->GetNbinsX();
135  phibins=(ProblemCellsByDepth->depth[d]->getTH2F())->GetNbinsY();
136  problemvalue=0;
137  for (int eta=0;eta<etabins;++eta)
138  {
139  int ieta=CalcIeta(eta,d+1);
140  if (ieta==-9999) continue;
141  for (int phi=0;phi<phibins;++phi)
142  {
143  problemvalue=0;
144  problemvalue=((uint64_t) problemcount[eta][phi][d] );
145 
146  if (problemvalue==0) continue;
147  problemvalue/=totalevents; // problem value is a rate; should be between 0 and 1
148  problemvalue = std::min(1.,problemvalue);
149 
150  zside=0;
151  if (isHF(eta,d+1)) // shift ieta by 1 for HF
152  ieta<0 ? zside = -1 : zside = 1;
153 
154  if (debug_>0) std::cout <<"problemvalue = "<<problemvalue<<" ieta = "<<zside<<" iphi = "<<phi+1<<" d = "<<d+1<<std::endl;
155  // For problem cells that exceed our allowed rate,
156  // set the values to -1 if the cells are already marked in the status database
157 
158  if (problemvalue>minerrorrate_)
159  {
160  HcalSubdetector subdet=HcalEmpty;
161  if (isHB(eta,d+1))subdet=HcalBarrel;
162  else if (isHE(eta,d+1)) subdet=HcalEndcap;
163  else if (isHF(eta,d+1)) subdet=HcalForward;
164  else if (isHO(eta,d+1)) subdet=HcalOuter;
165  HcalDetId hcalid(subdet, ieta, phi+1, (int)(d+1));
166  if (badstatusmap.find(hcalid)!=badstatusmap.end())
167  problemvalue=999;
168  }
169 
170  ProblemCellsByDepth->depth[d]->setBinContent(eta+1,phi+1,problemvalue);
171  if (ProblemCells!=0) ProblemCells->Fill(ieta+zside,phi+1,problemvalue);
172  } // loop on phi
173  } // loop on eta
174  } // loop on depth
175 
176  if (ProblemCells==0)
177  {
178  if (debug_>0) std::cout <<"<HcalRawDataClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
179  return;
180  }
181 
182  // Normalization of ProblemCell plot, in the case where there are errors in multiple depths
183  etabins=(ProblemCells->getTH2F())->GetNbinsX();
184  phibins=(ProblemCells->getTH2F())->GetNbinsY();
185  for (int eta=0;eta<etabins;++eta)
186  {
187  for (int phi=0;phi<phibins;++phi)
188  {
191  }
192  }
193 
196  return;
197 }
bool isHO(int etabin, int depth)
MonitorElement * ProblemCells
std::string name()
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:304
std::vector< std::string > HcalEtaPhiHistNames()
int zside(DetId const &)
bool isHE(int etabin, int depth)
void Fill(long long x)
tuple d
Definition: ztail.py:151
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
EtaPhiHists * ProblemCellsByDepth
HcalSubdetector
Definition: HcalAssistant.h:31
T min(T a, T b)
Definition: MathUtil.h:58
bool isHB(int etabin, int depth)
void fillProblemCountArray(DQMStore::IBooker &, DQMStore::IGetter &)
bool isHF(int etabin, int depth)
unsigned long long uint64_t
Definition: Time.h:15
int64_t getIntValue(void) const
uint64_t problemcount[85][72][4]
std::string subdir_
std::map< HcalDetId, unsigned int > badstatusmap
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
double getBinContent(int binx) const
get content of bin (1-D)
tuple cout
Definition: gather_cfg.py:145
TH2F * getTH2F(void) const
void Reset(void)
reset ME (ie. contents, errors, etc)
void HcalRawDataClient::cleanup ( void  )
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 288 of file HcalRawDataClient.cc.

Referenced by esMonitoring.FDJsonServer::handle_close().

288 {}
void HcalRawDataClient::endJob ( void  )
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 199 of file HcalRawDataClient.cc.

199 {}
void HcalRawDataClient::fillProblemCountArray ( DQMStore::IBooker ib,
DQMStore::IGetter ig 
)
private

Definition at line 392 of file HcalRawDataClient.cc.

References Chann_DataIntegrityCheck_, ChannSumm_DataIntegrityCheck_, gather_cfg::cout, HcalBaseDQClient::debug_, getHardwareSpaceHistos(), HalfHTRDataCorruptionIndicators_, HTRCHANMAX, LRBDataCorruptionIndicators_, mapChannproblem(), mapDCCproblem(), mapHTRproblem(), FEDNumbering::MAXHCALFEDID, meBCNSynch_, meCDFErrorFound_, meDCCEventFormatError_, meEvtNumberSynch_, meOrNSynch_, FEDNumbering::MINHCALFEDID, gen::n, NUMDCCS, NUMSPGS, and numTS_.

Referenced by calculateProblems().

392  {
393  if (debug_>1) std::cout <<"\t<HcalRawDataClient>::fillProblemCountArray(): getHardwareSpaceHistos()"<<std::endl;
394  getHardwareSpaceHistos(ib,ig);
395  float n=0.0;
396  int dcc_=-999;
397 
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};
407 
408  if (meCDFErrorFound_!=0) CheckmeCDFErrorFound_ = true;
409  if (meDCCEventFormatError_!=0) CheckmeDCCEventFormatError_ = true;
410  if (meOrNSynch_!=0) CheckmeOrNSynch_ = true;
411  if (meBCNSynch_!=0) CheckmeBCNSynch_ = true;
412  if (meEvtNumberSynch_!=0) CheckmeEvtNumberSynch_ = true;
413  if (LRBDataCorruptionIndicators_!=0) CheckLRBDataCorruptionIndicators_ = true;
414  if (HalfHTRDataCorruptionIndicators_!=0) CheckHalfHTRDataCorruptionIndicators_ = true;
415  if (ChannSumm_DataIntegrityCheck_!=0) CheckChannSumm_DataIntegrityCheck_ = true;
416 
417  int fed2offset=0;
418  int fed3offset=0;
419  int spg2offset=0;
420  int spg3offset=0;
421  int chn2offset=0;
422 
423  //Project all types of errors in these two plots onto
424  //the x axis to get total errors per FED.
425  TH1D* ProjXmeCDFErrorFound_ = 0;
426  bool CheckProjXmeCDFErrorFound_ = false;
427  if (CheckmeCDFErrorFound_)
428  ProjXmeCDFErrorFound_=meCDFErrorFound_->ProjectionX();
429  if (ProjXmeCDFErrorFound_!=0) CheckProjXmeCDFErrorFound_=true;
430  TH1D* ProjXmeDCCEventFormatError_ = 0;
431  bool CheckProjXmeDCCEventFormatError_ = false;
432  if (CheckmeDCCEventFormatError_)
433  ProjXmeDCCEventFormatError_=meDCCEventFormatError_->ProjectionX();
434  if (ProjXmeDCCEventFormatError_!=0) CheckProjXmeDCCEventFormatError_ = true;
435 
436  for (int dccid=FEDNumbering::MINHCALFEDID; dccid<=FEDNumbering::MAXHCALFEDID; dccid++) {
437  dcc_=dccid-FEDNumbering::MINHCALFEDID; // Numbering FEDS [0:31] is more useful for array indices.
438  if (Chann_DataIntegrityCheck_[dcc_]!=0)
439  CheckChann_DataIntegrityCheck_[dcc_] = true;
440 
441  if (CheckProjXmeCDFErrorFound_) {
442  n = ProjXmeCDFErrorFound_->GetBinContent(1+dcc_);
443  if (n>0.0) mapDCCproblem(dcc_,n);
444  }
445  if (CheckProjXmeDCCEventFormatError_) {
446  n = ProjXmeDCCEventFormatError_->GetBinContent(1+dcc_);
447  if (n>0.0) mapDCCproblem(dcc_,n);
448  }
449 
450  fed3offset = 1 + (4*dcc_); //3 bins, plus one of margin, each DCC (FED)
451  fed2offset = 1 + (3*dcc_); //2 bins, plus one of margin, each DCC (FED)
452  for (int spigot=0; spigot<NUMSPGS; spigot++) {
453 
454  if (CheckmeOrNSynch_) {
455  n = meOrNSynch_->GetBinContent(1+dcc_, 1+spigot);
456  if (n>0.0) mapHTRproblem(dcc_,spigot,n);
457  }
458  if (CheckmeBCNSynch_) {
459  n = meBCNSynch_->GetBinContent(1+dcc_, 1+spigot);
460  if (n>0.0) mapHTRproblem(dcc_,spigot,n);
461  }
462  if (CheckmeEvtNumberSynch_) {
463  n = meEvtNumberSynch_->GetBinContent(1+dcc_, 1+spigot);
464  if (n>0.0) mapHTRproblem(dcc_,spigot,n);
465  }
466  spg3offset = 1 + (4*spigot); //3 bins, plus one of margin, each spigot
467  if (CheckLRBDataCorruptionIndicators_ ){
468  n=0.0; //Sum errors of all ten types
469  n+=LRBDataCorruptionIndicators_->GetBinContent(fed3offset,
470  spg3offset);
471  for (int xbin=1; xbin<=3; xbin++) {
472  for (int ybin=1; ybin<=3; ybin++) {
473  n+=LRBDataCorruptionIndicators_->GetBinContent(fed3offset+xbin,
474  spg3offset+ybin);
475  }
476  }
477  if (n>0.0) mapHTRproblem(dcc_,spigot,n);
478  }
479  if (CheckHalfHTRDataCorruptionIndicators_){
480  n=0.0; //Sum errors of all nine types
481  for (int xbin=1; xbin<=3; xbin++) {
482  for (int ybin=1; ybin<=3; ybin++) {
483  n+=HalfHTRDataCorruptionIndicators_->GetBinContent(fed3offset+xbin,
484  spg3offset+ybin);
485  }
486  }
487  if (n>0.0) mapHTRproblem(dcc_,spigot,n);
488  }
489  spg2offset = 1 + (3*spigot); //2 bins, plus one of margin, each spigot
490  if (CheckChann_DataIntegrityCheck_[dcc_] &&
491  CheckChannSumm_DataIntegrityCheck_ ){
492  //Each spigot may be configured for its own number of TimeSlices, per event.
493  //Keep an array of the values:
494  numTS_[(dcc_*NUMSPGS)+spigot]=-1.0 * ChannSumm_DataIntegrityCheck_->GetBinContent(fed2offset,
495  spg2offset+1);
496  for (int chnnum=0; chnnum<HTRCHANMAX; chnnum++) {
497  chn2offset = 1 + (3*chnnum); //2 bins, plus one of margin, each channel
498  n = 0.0;
499  //Sum errors of all types,
500  //but not !DV, at xbin==1, ybin==2.
501  //Weight less if error can occur every timeslice
502  // or between any two timeslices
503  float tsFactor=numTS_[spigot +(dcc_*NUMSPGS)];
504  float CRweight = 0.0;
505  float Erweight = 0.0;
506  if (tsFactor>0) {
507  CRweight = (1.0 / (tsFactor-1.0));
508  Erweight = (1.0 / (tsFactor ));
509  }
510  int xbin=1; int ybin=1; // Timeslices per event check for error here
511  n += Chann_DataIntegrityCheck_[dcc_]->GetBinContent(chn2offset+xbin,
512  spg2offset+ybin);
513  xbin=2; //move right one bin: CapID Rotation here
514  n += CRweight * Chann_DataIntegrityCheck_[dcc_]->GetBinContent(chn2offset+xbin,
515  spg2offset+ybin);
516  ybin=2; //move up one bin: Er bit here
517  n += Erweight * Chann_DataIntegrityCheck_[dcc_]->GetBinContent(chn2offset+xbin,
518  spg2offset+ybin);
519  if (n>=0.0)
520  mapChannproblem(dcc_,spigot,chnnum,n);
521  } //loop over channels
522  } //check to see if FED had any channel problems
523  } //loop over spigot
524  } //loop over dccid
525 }
TH2F * LRBDataCorruptionIndicators_
TH2F * ChannSumm_DataIntegrityCheck_
#define HTRCHANMAX
void mapDCCproblem(int dcc, float n)
TH2F * Chann_DataIntegrityCheck_[32]
#define NUMDCCS
void mapChannproblem(int dcc, int spigot, int htrchan, float n)
void getHardwareSpaceHistos(DQMStore::IBooker &, DQMStore::IGetter &)
float numTS_[32 *15]
tuple cout
Definition: gather_cfg.py:145
TH2F * HalfHTRDataCorruptionIndicators_
void mapHTRproblem(int dcc, int spigot, float n)
#define NUMSPGS
void HcalRawDataClient::getHardwareSpaceHistos ( DQMStore::IBooker ib,
DQMStore::IGetter ig 
)
private

Definition at line 335 of file HcalRawDataClient.cc.

References Chann_DataIntegrityCheck_, ChannSumm_DataIntegrityCheck_, HcalBaseDQClient::cloneME_, gather_cfg::cout, HcalBaseDQClient::debug_, DQMStore::IGetter::get(), HalfHTRDataCorruptionIndicators_, i, LRBDataCorruptionIndicators_, hlt_dqm_clientPB-live_cfg::me, meBCNSynch_, meCDFErrorFound_, meDCCEventFormatError_, meEvtNumberSynch_, meOrNSynch_, NUMDCCS, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, and HcalBaseDQClient::subdir_.

Referenced by fillProblemCountArray().

335  {
337  std::string s;
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());
341  meCDFErrorFound_=HcalUtilsClient::getHisto<TH2F*>(me, cloneME_, meCDFErrorFound_, debug_);
342  if (!meCDFErrorFound_ & (debug_>0)) std::cout <<"<HcalRawDataClient::analyze> "<<s<<" histogram does not exist!"<<std::endl;
343 
344  s=subdir_+"Corruption/02 DCC Event Format violation";
345  me=ig.get(s.c_str());
346  meDCCEventFormatError_=HcalUtilsClient::getHisto<TH2F*>(me, cloneME_, meDCCEventFormatError_, debug_);
347  if (!meDCCEventFormatError_ & (debug_>0)) std::cout <<"<HcalRawDataClient::analyze> "<<s<<" histogram does not exist!"<<std::endl;
348 
349  s=subdir_+"Corruption/03 OrN Inconsistent - HTR vs DCC";
350  me=ig.get(s.c_str());
351  meOrNSynch_=HcalUtilsClient::getHisto<TH2F*>(me, cloneME_, meOrNSynch_, debug_);
352  if (!meOrNSynch_ & (debug_>0)) std::cout <<"<HcalRawDataClient::analyze> "<<s<<" histogram does not exist!"<<std::endl;
353 
354  s=subdir_+"Corruption/05 BCN Inconsistent - HTR vs DCC";
355  me=ig.get(s.c_str());
356  meBCNSynch_=HcalUtilsClient::getHisto<TH2F*>(me, cloneME_, meBCNSynch_, debug_);
357  if (!meBCNSynch_ & (debug_>0)) std::cout <<"<HcalRawDataClient::analyze> "<<s<<" histogram does not exist!"<<std::endl;
358 
359  s=subdir_+"Corruption/06 EvN Inconsistent - HTR vs DCC";
360  me=ig.get(s.c_str());
361  meEvtNumberSynch_=HcalUtilsClient::getHisto<TH2F*>(me, cloneME_, meEvtNumberSynch_, debug_);
362  if (!meEvtNumberSynch_ & (debug_>0)) std::cout <<"<HcalRawDataClient::analyze> "<<s<<" histogram does not exist!"<<std::endl;
363 
364  s=subdir_+"Corruption/07 LRB Data Corruption Indicators";
365  me=ig.get(s.c_str());
366  LRBDataCorruptionIndicators_=HcalUtilsClient::getHisto<TH2F*>(me, cloneME_, LRBDataCorruptionIndicators_, debug_);
367  if (!LRBDataCorruptionIndicators_ & (debug_>0)) std::cout <<"<HcalRawDataClient::analyze> "<<s<<" histogram does not exist!"<<std::endl;
368 
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;
373 
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);
380 
381  char chararray[150];
382  for (int i=0; i<NUMDCCS; i++) {
383  sprintf(chararray,"Corruption/Channel Data Integrity/FED %03d Channel Integrity", i+700);
384  s=subdir_+std::string(chararray);
385  me=ig.get(s.c_str());
386  Chann_DataIntegrityCheck_[i]=HcalUtilsClient::getHisto<TH2F*>(me, cloneME_, Chann_DataIntegrityCheck_[i], debug_);
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);
390  }
391 }
TH2F * LRBDataCorruptionIndicators_
int i
Definition: DBlmapReader.cc:9
TH2F * ChannSumm_DataIntegrityCheck_
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:304
TH2F * Chann_DataIntegrityCheck_[32]
#define NUMDCCS
std::string subdir_
tuple cout
Definition: gather_cfg.py:145
TH2F * HalfHTRDataCorruptionIndicators_
bool HcalRawDataClient::hasErrors_Temp ( void  )
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 290 of file HcalRawDataClient.cc.

References HcalObjRepresent::CalcIeta(), gather_cfg::cout, HcalBaseDQClient::debug_, EtaPhiHists::depth, HLT_25ns10e33_v2_cff::depth, MonitorElement::getTH2F(), HcalBaseDQClient::minerrorrate_, HcalBaseDQClient::ProblemCells, HcalBaseDQClient::ProblemCellsByDepth, and problemcount.

291 {
292  if (!ProblemCells)
293  {
294  if (debug_>1) std::cout <<"<HcalRawDataClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
295  return false;
296  }
297  int problemcount=0;
298  int ieta=-9999;
299 
300  for (int depth=0;depth<4; ++depth)
301  {
302  int etabins = (ProblemCells->getTH2F())->GetNbinsX();
303  int phibins = (ProblemCells->getTH2F())->GetNbinsY();
304  for (int hist_eta=0;hist_eta<etabins;++hist_eta)
305  {
306  for (int hist_phi=0; hist_phi<phibins;++hist_phi)
307  {
308  ieta=CalcIeta(hist_eta,depth+1);
309  if (ieta==-9999) continue;
311  continue;
312  if (ProblemCellsByDepth->depth[depth]->getBinContent(hist_eta,hist_phi)>minerrorrate_)
313  ++problemcount;
314  } // for (int hist_phi=1;...)
315  } // for (int hist_eta=1;...)
316  } // for (int depth=0;...)
317 
318  if (problemcount>0) return true;
319  return false;
320 }
MonitorElement * ProblemCells
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
EtaPhiHists * ProblemCellsByDepth
uint64_t problemcount[85][72][4]
tuple cout
Definition: gather_cfg.py:145
TH2F * getTH2F(void) const
HcalDetId HcalRawDataClient::HashToHDI ( int  thehash)
inlineprivate

Definition at line 46 of file HcalRawDataClient.h.

References hashedHcalDetId_, HTRCHANMAX, NUMDCCS, NUMSPGS, and HcalDetId::Undefined.

Referenced by mapChannproblem().

46  {
47  return ( ( (thehash<0) || (thehash>(NUMDCCS*NUMSPGS*HTRCHANMAX)) )
49  :(hashedHcalDetId_[thehash]));
50  };
static const HcalDetId Undefined
Definition: HcalDetId.h:80
#define HTRCHANMAX
#define NUMDCCS
HcalDetId hashedHcalDetId_[32 *15 *24]
#define NUMSPGS
int HcalRawDataClient::hashup ( uint32_t  d = 0,
uint32_t  s = 0,
uint32_t  c = 1 
)
inlineprivate

Definition at line 42 of file HcalRawDataClient.h.

References HcalBaseDQClient::c, ztail::d, HTRCHANMAX, NUMSPGS, and alignCSCRings::s.

Referenced by beginRun(), mapChannproblem(), mapDCCproblem(), and mapHTRproblem().

42  {
43  return (int) ( (d*NUMSPGS*HTRCHANMAX)+(s*HTRCHANMAX)+(c)); }
#define HTRCHANMAX
const edm::EventSetup * c
tuple d
Definition: ztail.py:151
#define NUMSPGS
bool HcalRawDataClient::hasOther_Temp ( void  )
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 323 of file HcalRawDataClient.cc.

323 {return false;}
bool HcalRawDataClient::hasWarnings_Temp ( void  )
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 322 of file HcalRawDataClient.cc.

322 {return false;}
void HcalRawDataClient::mapChannproblem ( int  dcc,
int  spigot,
int  htrchan,
float  n 
)
private

Definition at line 595 of file HcalRawDataClient.cc.

References funct::abs(), CalcEtaBin(), gather_cfg::cout, HcalBaseDQClient::debug_, HcalDetId::depth(), excludeHORing2_, HashToHDI(), hashup(), i, HcalDetId::ieta(), HcalDetId::iphi(), isSiPM(), gen::n, problemcount, HcalDetId::subdet(), and HcalDetId::Undefined.

Referenced by fillProblemCountArray().

595  {
596  int myeta = 0;
597  int myphi =-1;
598  int mydepth = 0;
599  HcalDetId HDI;
600  //Light up the affected cell.
601  int i=hashup(dcc,spigot,htrchan);
602  HDI = HashToHDI(i);
603  if (HDI==HcalDetId::Undefined) {
604  return; // Do nothing at all, instead.
605  }
606  mydepth = HDI.depth();
607  myphi = HDI.iphi();
608  myeta = CalcEtaBin(HDI.subdet(),
609  HDI.ieta(),
610  mydepth);
611 
612  if (myeta>=0 && myeta<85 &&
613  (myphi-1)>=0 && (myphi-1)<72 &&
614  (mydepth-1)>=0 && (mydepth-1)<4){
615  if (problemcount[myeta][myphi-1][mydepth-1]< n) {
616  problemcount[myeta][myphi-1][mydepth-1]=n;
617 
618  //exlcude the decommissioned HO ring2, except SiPMs
619  if(mydepth==4 && excludeHORing2_==true)
620  if (abs(HDI.ieta())>=11 && abs(HDI.ieta())<=15 && !isSiPM(HDI.ieta(),HDI.iphi(),mydepth))
621  problemcount[myeta][myphi-1][mydepth-1] = 0.0;
622 
623  if (debug_>0)
624  std::cout<<" mapChannproblem found error! "<<HDI.subdet()<<"("<<HDI.ieta()<<", "<<HDI.iphi()<<", "<<HDI.depth()<<")"<<std::endl;
625  }
626  }
627 } // void HcalRawDataClient::mapChannproblem(...)
static const HcalDetId Undefined
Definition: HcalDetId.h:80
int i
Definition: DBlmapReader.cc:9
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
HcalDetId HashToHDI(int thehash)
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
Definition: HcalDetId.cc:106
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:101
uint64_t problemcount[85][72][4]
int CalcEtaBin(int subdet, int ieta, int depth)
tuple cout
Definition: gather_cfg.py:145
void HcalRawDataClient::mapDCCproblem ( int  dcc,
float  n 
)
private

Definition at line 527 of file HcalRawDataClient.cc.

References funct::abs(), CalcEtaBin(), gather_cfg::cout, HcalBaseDQClient::debug_, HcalDetId::depth(), excludeHORing2_, hashedHcalDetId_, hashup(), HTRCHANMAX, i, HcalDetId::ieta(), HcalDetId::iphi(), isSiPM(), gen::n, NUMSPGS, problemcount, HcalDetId::subdet(), and HcalDetId::Undefined.

Referenced by fillProblemCountArray().

527  {
528  int myeta = 0;
529  int myphi =-1;
530  int mydepth = 0;
531  HcalDetId HDI;
532  //Light up all affected cells.
533  for (int i=hashup(dcc);
534  i<hashup(dcc)+(NUMSPGS*HTRCHANMAX);
535  i++) {
536  HDI = hashedHcalDetId_[i];
537  if (HDI==HcalDetId::Undefined)
538  continue;
539  mydepth = HDI.depth();
540  myphi = HDI.iphi();
541  myeta = CalcEtaBin(HDI.subdet(),
542  HDI.ieta(),
543  mydepth);
544  if (myeta>=0 && myeta<85 &&
545  (myphi-1)>=0 && (myphi-1)<72 &&
546  (mydepth-1)>=0 && (mydepth-1)<4){
547  if (problemcount[myeta][myphi-1][mydepth-1]< n)
548  problemcount[myeta][myphi-1][mydepth-1]=n;
549 
550  //exclude the decommissioned HO ring2, except SiPMs
551  if(mydepth==4 && excludeHORing2_==true)
552  if (abs(HDI.ieta())>=11 && abs(HDI.ieta())<=15 && !isSiPM(HDI.ieta(),HDI.iphi(),mydepth))
553  problemcount[myeta][myphi-1][mydepth-1] = 0.0;
554 
555  if (debug_>0)
556  std::cout<<" mapDCCproblem found error! "<<HDI.subdet()<<"("<<HDI.ieta()<<", "<<HDI.iphi()<<", "<<HDI.depth()<<")"<<std::endl;
557  }
558  }
559 }
static const HcalDetId Undefined
Definition: HcalDetId.h:80
int i
Definition: DBlmapReader.cc:9
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
#define HTRCHANMAX
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
Definition: HcalDetId.cc:106
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:101
uint64_t problemcount[85][72][4]
int CalcEtaBin(int subdet, int ieta, int depth)
HcalDetId hashedHcalDetId_[32 *15 *24]
tuple cout
Definition: gather_cfg.py:145
#define NUMSPGS
void HcalRawDataClient::mapHTRproblem ( int  dcc,
int  spigot,
float  n 
)
private

Definition at line 560 of file HcalRawDataClient.cc.

References funct::abs(), CalcEtaBin(), gather_cfg::cout, HcalBaseDQClient::debug_, HcalDetId::depth(), excludeHORing2_, hashedHcalDetId_, hashup(), HTRCHANMAX, i, HcalDetId::ieta(), HcalDetId::iphi(), isSiPM(), gen::n, problemcount, HcalDetId::subdet(), and HcalDetId::Undefined.

Referenced by fillProblemCountArray().

560  {
561  int myeta = 0;
562  int myphi =-1;
563  int mydepth = 0;
564  HcalDetId HDI;
565  //Light up all affected cells.
566  for (int i=hashup(dcc,spigot);
567  i<hashup(dcc,spigot)+(HTRCHANMAX); //nice, linear hash....
568  i++) {
569  HDI = hashedHcalDetId_[i];
570  if (HDI==HcalDetId::Undefined) {
571  continue;
572  }
573  mydepth = HDI.depth();
574  myphi = HDI.iphi();
575  myeta = CalcEtaBin(HDI.subdet(),
576  HDI.ieta(),
577  mydepth);
578  if (myeta>=0 && myeta<85 &&
579  (myphi-1)>=0 && (myphi-1)<72 &&
580  (mydepth-1)>=0 && (mydepth-1)<4){
581  if (problemcount[myeta][myphi-1][mydepth-1]< n)
582  problemcount[myeta][myphi-1][mydepth-1]=n;
583 
584  //exlcude the decommissioned HO ring2, except SiPMs
585  if(mydepth==4 && excludeHORing2_==true)
586  if (abs(HDI.ieta())>=11 && abs(HDI.ieta())<=15 && !isSiPM(HDI.ieta(),HDI.iphi(),mydepth))
587  problemcount[myeta][myphi-1][mydepth-1] = 0.0;
588 
589  if (debug_>0)
590  std::cout<<" mapHTRproblem found error! "<<HDI.subdet()<<"("<<HDI.ieta()<<", "<<HDI.iphi()<<", "<<HDI.depth()<<")"<<std::endl;
591  }
592  }
593 } // void HcalRawDataClient::mapHTRproblem(...)
static const HcalDetId Undefined
Definition: HcalDetId.h:80
int i
Definition: DBlmapReader.cc:9
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
#define HTRCHANMAX
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
Definition: HcalDetId.cc:106
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:101
uint64_t problemcount[85][72][4]
int CalcEtaBin(int subdet, int ieta, int depth)
HcalDetId hashedHcalDetId_[32 *15 *24]
tuple cout
Definition: gather_cfg.py:145
void HcalRawDataClient::normalizeHardwareSpaceHistos ( void  )
private

Definition at line 630 of file HcalRawDataClient.cc.

630  {
632 // // Get histograms that are used in testing
633 // getHardwareSpaceHistos();
634 //
635 // int fed2offset=0;
636 // int spg2offset=0;
637 // int chn2offset=0;
638 // float tsFactor=1.0;
639 // float val=0.0;
640 //
641 // if (!ChannSumm_DataIntegrityCheck_) return;
642 // //Normalize by the number of events each channel spake. (Handles ZS!)
643 // for (int fednum=0;fednum<NUMDCCS;fednum++) {
644 // fed2offset = 1 + (3*fednum); //2 bins, plus one of margin, each DCC
645 // for (int spgnum=0; spgnum<15; spgnum++) {
646 // spg2offset = 1 + (3*spgnum); //2 bins, plus one of margin, each spigot
647 // numTS_[(fednum*NUMSPGS)+spgnum]=ChannSumm_DataIntegrityCheck_->GetBinContent(fed2offset,
648 // spg2offset+1);
649 //
650 // for (int xbin=1; xbin<=2; xbin++) {
651 // for (int ybin=1; ybin<=2; ybin++) {
652 // val = ChannSumm_DataIntegrityCheck_->GetBinContent(fed2offset+xbin,
653 // spg2offset+ybin);
654 // if ( (val) && (nevts_) ) {
655 // //Lower pair of bins don't scale with just the timesamples per event.
656 // if (ybin==2) tsFactor=numTS_[spgnum +(fednum*NUMSPGS)];
657 // else {
658 // if (xbin==2) tsFactor=numTS_[spgnum +(fednum*NUMSPGS)]-1;
659 // else tsFactor=1.0;
660 // }
661 // if (tsFactor)
662 // ChannSumm_DataIntegrityCheck_->SetBinContent(fed2offset+xbin,
663 // spg2offset+ybin,
664 // val/(nevts_*tsFactor));
665 // val=0.0;
666 // }
667 // }
668 // }
669 // //Clear the numTS, which clutter the final plot.
670 // ChannSumm_DataIntegrityCheck_->SetBinContent(fed2offset ,
671 // spg2offset , 0.0);
672 // ChannSumm_DataIntegrityCheck_->SetBinContent(fed2offset ,
673 // spg2offset+1, 0.0);
674 //
675 // if (!Chann_DataIntegrityCheck_[fednum]) continue;
676 // for (int chnnum=0; chnnum<24; chnnum++) {
677 // chn2offset = 1 + (3*chnnum); //2 bins, plus one of margin, each channel
678 // if (! (Chann_DataIntegrityCheck_[fednum]))
679 // continue;
680 // for (int xbin=1; xbin<=2; xbin++) {
681 // for (int ybin=1; ybin<=2; ybin++) {
682 // val = Chann_DataIntegrityCheck_[fednum]->GetBinContent(chn2offset+xbin,
683 // spg2offset+ybin);
684 // if ( (val) && (nevts_) ) {
685 // //Lower pair of bins don't scale with just the timesamples per event.
686 // if (ybin==2) tsFactor=numTS_[spgnum +(fednum*NUMSPGS)];
687 // else {
688 // if (xbin==2) tsFactor=numTS_[spgnum +(fednum*NUMSPGS)]-1;
689 // else tsFactor=1.0;
690 // }
691 // if (tsFactor)
692 // Chann_DataIntegrityCheck_[fednum]->SetBinContent(chn2offset+xbin,
693 // spg2offset+ybin,
694 // val/(nevts_*tsFactor));
695 // }
696 // }
697 // }
698 // //Remove the channel's event count from sight.
699 // Chann_DataIntegrityCheck_[fednum]->SetBinContent(chn2offset,
700 // spg2offset,0.0);
701 // }
702 // }
703 // }
704 }
void HcalRawDataClient::setup ( void  )
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 287 of file HcalRawDataClient.cc.

287 {}
void HcalRawDataClient::setupProblemCells ( DQMStore::IBooker ib,
DQMStore::IGetter ig 
)
private

Definition at line 257 of file HcalRawDataClient.cc.

References DQMStore::IBooker::book2D(), gather_cfg::cout, HcalBaseDQClient::debug_, EtaPhiHists::depth, doProblemCellSetup_, MonitorElement::getName(), i, HcalBaseDQClient::ProblemCells, HcalBaseDQClient::ProblemCellsByDepth, HcalBaseDQClient::problemnames_, DQMStore::IBooker::setCurrentFolder(), EtaPhiHists::setup(), and HcalBaseDQClient::subdir_.

Referenced by analyze().

258 {
259 
260 
262  problemnames_.clear();
263  // Put the appropriate name of your problem summary here
264  ProblemCells=ib.book2D(" ProblemRawData",
265  " Problem Raw Data Rate for all HCAL;ieta;iphi",
266  85,-42.5,42.5,
267  72,0.5,72.5);
268  problemnames_.push_back(ProblemCells->getName());
269  if (debug_>1)
270  std::cout << "Tried to create ProblemCells Monitor Element in directory "<<subdir_<<" \t Failed? "<<(ProblemCells==0)<<std::endl;
271  ib.setCurrentFolder(subdir_+"problem_rawdata");
273 
274  ProblemCells->getTH2F()->SetMinimum(0);
275  ProblemCells->getTH2F()->SetMaximum(1.05);
276 
277  ProblemCellsByDepth->setup(ib," Problem Raw Data Rate");
278  for (unsigned int i=0; i<ProblemCellsByDepth->depth.size();++i)
279  problemnames_.push_back(ProblemCellsByDepth->depth[i]->getName());
280 
281  doProblemCellSetup_ = false;
282 
283 }
const std::string & getName(void) const
get name of ME
int i
Definition: DBlmapReader.cc:9
MonitorElement * ProblemCells
std::vector< MonitorElement * > depth
std::vector< std::string > problemnames_
EtaPhiHists * ProblemCellsByDepth
void setup(DQMStore::IBooker &m_dbe, std::string Name, std::string Units="")
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
std::string subdir_
tuple cout
Definition: gather_cfg.py:145
void HcalRawDataClient::stashHDI ( int  thehash,
HcalDetId  thehcaldetid 
)
private

Definition at line 201 of file HcalRawDataClient.cc.

References hashedHcalDetId_, HTRCHANMAX, NUMDCCS, and NUMSPGS.

Referenced by beginRun().

201  {
202  //Let's not allow indexing off the array...
203  if ((thehash<0)||(thehash>=(NUMDCCS*NUMSPGS*HTRCHANMAX)))return;
204  //...but still do the job requested.
205  hashedHcalDetId_[thehash] = thehcaldetid;
206 }
#define HTRCHANMAX
#define NUMDCCS
HcalDetId hashedHcalDetId_[32 *15 *24]
#define NUMSPGS
bool HcalRawDataClient::test_enabled ( void  )
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 324 of file HcalRawDataClient.cc.

324 {return true;}
void HcalRawDataClient::updateChannelStatus ( std::map< HcalDetId, unsigned int > &  myqual)
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 327 of file HcalRawDataClient.cc.

328 {
329  // This gets called by HcalMonitorClient
330  // see dead or hot cell code for an example
331 
332 } //void HcalRawDataClient::updateChannelStatus

Member Data Documentation

TH2F* HcalRawDataClient::Chann_DataIntegrityCheck_[32]
private

Definition at line 65 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

TH2F* HcalRawDataClient::ChannSumm_DataIntegrityCheck_
private

Definition at line 63 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

TH2F* HcalRawDataClient::DataFlowInd_
private

Definition at line 62 of file HcalRawDataClient.h.

bool HcalRawDataClient::doProblemCellSetup_
private

Definition at line 80 of file HcalRawDataClient.h.

Referenced by analyze(), HcalRawDataClient(), and setupProblemCells().

bool HcalRawDataClient::excludeHORing2_
private
TH2F* HcalRawDataClient::HalfHTRDataCorruptionIndicators_
private

Definition at line 61 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

HcalDetId HcalRawDataClient::hashedHcalDetId_[32 *15 *24]
private

Definition at line 50 of file HcalRawDataClient.h.

Referenced by HashToHDI(), mapDCCproblem(), mapHTRproblem(), and stashHDI().

TH2F* HcalRawDataClient::LRBDataCorruptionIndicators_
private

Definition at line 60 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

TH2F* HcalRawDataClient::meBCNSynch_
private

Definition at line 58 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

TH2F* HcalRawDataClient::meCDFErrorFound_
private

Definition at line 55 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

TH2F* HcalRawDataClient::meDCCEventFormatError_
private

Definition at line 56 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

TH2F* HcalRawDataClient::meEvtNumberSynch_
private

Definition at line 59 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

TH2F* HcalRawDataClient::meOrNSynch_
private

Definition at line 57 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

int HcalRawDataClient::nevts_
private

Definition at line 38 of file HcalRawDataClient.h.

Referenced by beginRun().

float HcalRawDataClient::numTS_[32 *15]
private

Definition at line 53 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray().

uint64_t HcalRawDataClient::problemcount[85][72][4]
private
const HcalElectronicsMap* HcalRawDataClient::readoutMap_
private

Definition at line 40 of file HcalRawDataClient.h.

Referenced by beginRun().