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 (void)
 
void beginJob (void)
 
void beginRun (void)
 
void calculateProblems (void)
 
void cleanup (void)
 
void endJob (void)
 
void endLuminosityBlock (void)
 
void endRun (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
 HcalBaseDQClient ()
 
 HcalBaseDQClient (std::string s, const edm::ParameterSet &ps)
 
virtual void htmlOutput (std::string htmlDir)
 
std::string name ()
 
void setEventSetup (const edm::EventSetup &es)
 
virtual void setStatusMap (std::map< HcalDetId, unsigned int > &map)
 
virtual bool validHtmlOutput ()
 
virtual ~HcalBaseDQClient (void)
 

Private Member Functions

void fillProblemCountArray (void)
 
void getHardwareSpaceHistos (void)
 
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 stashHDI (int thehash, HcalDetId thehcaldetid)
 

Private Attributes

TH2F * Chann_DataIntegrityCheck_ [32]
 
TH2F * ChannSumm_DataIntegrityCheck_
 
TH2F * DataFlowInd_
 
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_
 
DQMStoredqmStore_
 
bool enableCleanup_
 
bool enoughevents_
 
double minerrorrate_
 
int minevents_
 
std::string name_
 
bool Online_
 
std::string prefixME_
 
MonitorElementProblemCells
 
EtaPhiHistsProblemCellsByDepth
 
std::vector< std::string > problemnames_
 
std::string subdir_
 
bool testenabled_
 
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 25 of file HcalRawDataClient.cc.

References HcalBaseDQClient::name_.

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

Definition at line 30 of file HcalRawDataClient.cc.

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

31 {
32  name_=myname;
33  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup",false);
34  debug_ = ps.getUntrackedParameter<int>("debug",0);
35  prefixME_ = ps.getUntrackedParameter<std::string>("subSystemFolder","Hcal/");
36  if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
37  prefixME_.append("/");
38  subdir_ = ps.getUntrackedParameter<std::string>("RawDataFolder","RawDataMonitor_Hcal/"); // RawDataMonitor
39  if (subdir_.size()>0 && subdir_.substr(subdir_.size()-1,subdir_.size())!="/")
40  subdir_.append("/");
41  subdir_=prefixME_+subdir_;
42 
43  validHtmlOutput_ = ps.getUntrackedParameter<bool>("RawData_validHtmlOutput",true);
44  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
45  badChannelStatusMask_ = ps.getUntrackedParameter<int>("RawData_BadChannelStatusMask",
46  ps.getUntrackedParameter<int>("BadChannelStatusMask",0));
47 
48  minerrorrate_ = ps.getUntrackedParameter<double>("RawData_minerrorrate",
49  ps.getUntrackedParameter<double>("minerrorrate",0.01));
50  minevents_ = ps.getUntrackedParameter<int>("RawData_minevents",
51  ps.getUntrackedParameter<int>("minevents",1));
52 
53  excludeHORing2_ = ps.getUntrackedParameter<bool>("excludeHOring2_backup",false);
54  Online_ = ps.getUntrackedParameter<bool>("online",false);
55 
56  ProblemCells=0;
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 722 of file HcalRawDataClient.cc.

723 {}

Member Function Documentation

void HcalRawDataClient::analyze ( void  )
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 70 of file HcalRawDataClient.cc.

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

Referenced by endRun().

71 {
72  if (debug_>2) std::cout <<"\tHcalRawDataClient::analyze()"<<std::endl;
74 }
void calculateProblems(void)
tuple cout
Definition: gather_cfg.py:121
void HcalRawDataClient::beginJob ( void  )
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 208 of file HcalRawDataClient.cc.

References gather_cfg::cout, HcalBaseDQClient::debug_, HcalBaseDQClient::dqmStore_, cppFunctionSkipper::operator, and DQMStore::showDirStructure().

209 {
211  if (debug_>0)
212  {
213  std::cout <<"<HcalRawDataClient::beginJob()> Displaying dqmStore directory structure:"<<std::endl;
215  }
216 }
tuple cout
Definition: gather_cfg.py:121
void showDirStructure(void) const
Definition: DQMStore.cc:2761
DQMStore * dqmStore_
void HcalRawDataClient::beginRun ( void  )
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 227 of file HcalRawDataClient.cc.

References HcalElectronicsMap::allElectronicsIdPrecision(), DQMStore::book2D(), HcalBaseDQClient::c, gather_cfg::cout, HcalBaseDQClient::debug_, EtaPhiHists::depth, DetId::det(), HcalBaseDQClient::dqmStore_, HcalBaseDQClient::enoughevents_, edm::EventSetup::get(), MonitorElement::getName(), hashup(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, i, HcalElectronicsMap::lookup(), nevts_, DetId::null(), HcalBaseDQClient::ProblemCells, HcalBaseDQClient::ProblemCellsByDepth, HcalBaseDQClient::problemnames_, readoutMap_, DQMStore::setCurrentFolder(), EtaPhiHists::setup(), stashHDI(), DetId::subdetId(), and HcalBaseDQClient::subdir_.

228 {
229  if (debug_>2) std::cout <<"<HcalRawDataClient::beginRun>"<<std::endl;
231  c->get<HcalDbRecord>().get( pSetup );
232 
233  if (debug_>2) std::cout <<"\t<HcalRawDataClient::beginRun> Get Hcal mapping"<<std::endl;
234  readoutMap_=pSetup->getHcalMapping();
235  DetId detid_;
236  HcalDetId hcaldetid_;
237 
238  // Build a map of readout hardware unit to calorimeter channel
239  std::vector <HcalElectronicsId> AllElIds = readoutMap_->allElectronicsIdPrecision();
240  uint32_t itsdcc =0;
241  uint32_t itsspigot =0;
242  uint32_t itshtrchan=0;
243 
244  if (debug_>2) std::cout <<"\t<HcalRawDataClient::beginRun> Loop over AllEIds"<<std::endl;
245  // by looping over all precision (non-trigger) items.
246  for (std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin();
247  eid != AllElIds.end();
248  eid++) {
249 
250  //Get the HcalDetId from the HcalElectronicsId
251  detid_ = readoutMap_->lookup(*eid);
252  // NULL if illegal; ignore
253  if (!detid_.null()) {
254  if (detid_.det()!=4) continue; //not Hcal
255  if (detid_.subdetId()!=HcalBarrel &&
256  detid_.subdetId()!=HcalEndcap &&
257  detid_.subdetId()!=HcalOuter &&
258  detid_.subdetId()!=HcalForward) continue;
259 
260  itsdcc =(uint32_t) eid->dccid();
261  itsspigot =(uint32_t) eid->spigot();
262  itshtrchan=(uint32_t) eid->htrChanId();
263  hcaldetid_ = HcalDetId(detid_);
264  stashHDI(hashup(itsdcc,itsspigot,itshtrchan),
265  hcaldetid_);
266  } // if (!detid_.null())
267  }
268 
269  if (debug_>2) std::cout <<"\t<HcalRawDataClient::beginRun> Completed loop."<<std::endl;
270 
271  enoughevents_=false;
272  if (!dqmStore_)
273  {
274  if (debug_>0) std::cout <<"<HcalRawDataClient::beginRun> dqmStore does not exist!"<<std::endl;
275  return;
276  }
277 
279  problemnames_.clear();
280  // Put the appropriate name of your problem summary here
281  ProblemCells=dqmStore_->book2D(" ProblemRawData",
282  " Problem Raw Data Rate for all HCAL;ieta;iphi",
283  85,-42.5,42.5,
284  72,0.5,72.5);
285  problemnames_.push_back(ProblemCells->getName());
286  if (debug_>1)
287  std::cout << "Tried to create ProblemCells Monitor Element in directory "<<subdir_<<" \t Failed? "<<(ProblemCells==0)<<std::endl;
288  dqmStore_->setCurrentFolder(subdir_+"problem_rawdata");
290 
291  ProblemCells->getTH2F()->SetMinimum(0);
292  ProblemCells->getTH2F()->SetMaximum(1.05);
293 
294  ProblemCellsByDepth->setup(dqmStore_," Problem Raw Data Rate");
295  for (unsigned int i=0; i<ProblemCellsByDepth->depth.size();++i)
296  problemnames_.push_back(ProblemCellsByDepth->depth[i]->getName());
297 
298  nevts_=0;
299 }
const std::string & getName(void) const
get name of ME
int i
Definition: DBlmapReader.cc:9
MonitorElement * ProblemCells
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
void stashHDI(int thehash, HcalDetId thehcaldetid)
void setup(DQMStore *&m_dbe, std::string Name, std::string Units="")
const edm::EventSetup * c
int hashup(uint32_t d=0, uint32_t s=0, uint32_t c=1)
std::vector< MonitorElement * > depth
std::vector< std::string > problemnames_
EtaPhiHists * ProblemCellsByDepth
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:39
Definition: DetId.h:20
const T & get() const
Definition: EventSetup.h:55
bool null() const
is this a null id ?
Definition: DetId.h:47
std::string subdir_
tuple cout
Definition: gather_cfg.py:121
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:845
Detector det() const
get the detector field from this detid
Definition: DetId.h:37
DQMStore * dqmStore_
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
void HcalRawDataClient::calculateProblems ( void  )
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 76 of file HcalRawDataClient.cc.

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

Referenced by analyze(), and endLuminosityBlock().

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

Reimplemented from HcalBaseDQClient.

Definition at line 304 of file HcalRawDataClient.cc.

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

Reimplemented from HcalBaseDQClient.

Definition at line 217 of file HcalRawDataClient.cc.

217 {}
void HcalRawDataClient::endLuminosityBlock ( void  )

Definition at line 60 of file HcalRawDataClient.cc.

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

60  {
61 // if (LBprocessed_==true) return; // LB already processed
62 // UpdateMEs();
63 // LBprocessed_=true;
64  if (debug_>2) std::cout <<"\tHcalRawDataClient::endLuminosityBlock()"<<std::endl;
66  return;
67 }
void calculateProblems(void)
tuple cout
Definition: gather_cfg.py:121
void HcalRawDataClient::endRun ( void  )
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 301 of file HcalRawDataClient.cc.

References analyze().

301 {analyze();}
void HcalRawDataClient::fillProblemCountArray ( void  )
private

Definition at line 408 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, n, NUMDCCS, NUMSPGS, and numTS_.

Referenced by calculateProblems().

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

Definition at line 351 of file HcalRawDataClient.cc.

References Chann_DataIntegrityCheck_, ChannSumm_DataIntegrityCheck_, HcalBaseDQClient::cloneME_, gather_cfg::cout, HcalBaseDQClient::debug_, HcalBaseDQClient::dqmStore_, DQMStore::get(), HalfHTRDataCorruptionIndicators_, i, LRBDataCorruptionIndicators_, meBCNSynch_, meCDFErrorFound_, meDCCEventFormatError_, meEvtNumberSynch_, meOrNSynch_, NUMDCCS, alignCSCRings::s, and HcalBaseDQClient::subdir_.

Referenced by fillProblemCountArray().

351  {
352  MonitorElement* me;
353  std::string s;
354  if (debug_>1) std::cout<<"\t<HcalRawDataClient>: getHardwareSpaceHistos()"<<std::endl;
355  s=subdir_+"Corruption/01 Common Data Format violations";
356  me=dqmStore_->get(s.c_str());
357  meCDFErrorFound_=HcalUtilsClient::getHisto<TH2F*>(me, cloneME_, meCDFErrorFound_, debug_);
358  if (!meCDFErrorFound_ & (debug_>0)) std::cout <<"<HcalRawDataClient::analyze> "<<s<<" histogram does not exist!"<<std::endl;
359 
360  s=subdir_+"Corruption/02 DCC Event Format violation";
361  me=dqmStore_->get(s.c_str());
362  meDCCEventFormatError_=HcalUtilsClient::getHisto<TH2F*>(me, cloneME_, meDCCEventFormatError_, debug_);
363  if (!meDCCEventFormatError_ & (debug_>0)) std::cout <<"<HcalRawDataClient::analyze> "<<s<<" histogram does not exist!"<<std::endl;
364 
365  s=subdir_+"Corruption/03 OrN Inconsistent - HTR vs DCC";
366  me=dqmStore_->get(s.c_str());
367  meOrNSynch_=HcalUtilsClient::getHisto<TH2F*>(me, cloneME_, meOrNSynch_, debug_);
368  if (!meOrNSynch_ & (debug_>0)) std::cout <<"<HcalRawDataClient::analyze> "<<s<<" histogram does not exist!"<<std::endl;
369 
370  s=subdir_+"Corruption/05 BCN Inconsistent - HTR vs DCC";
371  me=dqmStore_->get(s.c_str());
372  meBCNSynch_=HcalUtilsClient::getHisto<TH2F*>(me, cloneME_, meBCNSynch_, debug_);
373  if (!meBCNSynch_ & (debug_>0)) std::cout <<"<HcalRawDataClient::analyze> "<<s<<" histogram does not exist!"<<std::endl;
374 
375  s=subdir_+"Corruption/06 EvN Inconsistent - HTR vs DCC";
376  me=dqmStore_->get(s.c_str());
377  meEvtNumberSynch_=HcalUtilsClient::getHisto<TH2F*>(me, cloneME_, meEvtNumberSynch_, debug_);
378  if (!meEvtNumberSynch_ & (debug_>0)) std::cout <<"<HcalRawDataClient::analyze> "<<s<<" histogram does not exist!"<<std::endl;
379 
380  s=subdir_+"Corruption/07 LRB Data Corruption Indicators";
381  me=dqmStore_->get(s.c_str());
382  LRBDataCorruptionIndicators_=HcalUtilsClient::getHisto<TH2F*>(me, cloneME_, LRBDataCorruptionIndicators_, debug_);
383  if (!LRBDataCorruptionIndicators_ & (debug_>0)) std::cout <<"<HcalRawDataClient::analyze> "<<s<<" histogram does not exist!"<<std::endl;
384 
385  s=subdir_+"Corruption/08 Half-HTR Data Corruption Indicators";
386  me=dqmStore_->get(s.c_str());
388  if (!HalfHTRDataCorruptionIndicators_ & (debug_>0)) std::cout <<"<HcalRawDataClient::analyze> "<<s<<" histogram does not exist!"<<std::endl;
389 
390  s=subdir_+"Corruption/09 Channel Integrity Summarized by Spigot";
391  me=dqmStore_->get(s.c_str());
392  ChannSumm_DataIntegrityCheck_=HcalUtilsClient::getHisto<TH2F*>(me, cloneME_, ChannSumm_DataIntegrityCheck_, debug_);
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);
396 
397  char chararray[150];
398  for (int i=0; i<NUMDCCS; i++) {
399  sprintf(chararray,"Corruption/Channel Data Integrity/FED %03d Channel Integrity", i+700);
400  s=subdir_+std::string(chararray);
401  me=dqmStore_->get(s.c_str());
402  Chann_DataIntegrityCheck_[i]=HcalUtilsClient::getHisto<TH2F*>(me, cloneME_, Chann_DataIntegrityCheck_[i], debug_);
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);
406  }
407 }
TH2F * LRBDataCorruptionIndicators_
int i
Definition: DBlmapReader.cc:9
TH2F * ChannSumm_DataIntegrityCheck_
TH2F * Chann_DataIntegrityCheck_[32]
#define NUMDCCS
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1468
std::string subdir_
tuple cout
Definition: gather_cfg.py:121
TH2F * HalfHTRDataCorruptionIndicators_
DQMStore * dqmStore_
bool HcalRawDataClient::hasErrors_Temp ( void  )
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 306 of file HcalRawDataClient.cc.

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

307 {
308  if (!ProblemCells)
309  {
310  if (debug_>1) std::cout <<"<HcalRawDataClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
311  return false;
312  }
313  int problemcount=0;
314  int ieta=-9999;
315 
316  for (int depth=0;depth<4; ++depth)
317  {
318  int etabins = (ProblemCells->getTH2F())->GetNbinsX();
319  int phibins = (ProblemCells->getTH2F())->GetNbinsY();
320  for (int hist_eta=0;hist_eta<etabins;++hist_eta)
321  {
322  for (int hist_phi=0; hist_phi<phibins;++hist_phi)
323  {
324  ieta=CalcIeta(hist_eta,depth+1);
325  if (ieta==-9999) continue;
326  if (ProblemCellsByDepth->depth[depth]==0)
327  continue;
328  if (ProblemCellsByDepth->depth[depth]->getBinContent(hist_eta,hist_phi)>minerrorrate_)
329  ++problemcount;
330  } // for (int hist_phi=1;...)
331  } // for (int hist_eta=1;...)
332  } // for (int depth=0;...)
333 
334  if (problemcount>0) return true;
335  return false;
336 }
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:121
TH2F * getTH2F(void) const
HcalDetId HcalRawDataClient::HashToHDI ( int  thehash)
inlineprivate

Definition at line 48 of file HcalRawDataClient.h.

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

Referenced by mapChannproblem().

48  {
49  return ( ( (thehash<0) || (thehash>(NUMDCCS*NUMSPGS*HTRCHANMAX)) )
51  :(hashedHcalDetId_[thehash]));
52  };
static const HcalDetId Undefined
Definition: HcalDetId.h:66
#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 44 of file HcalRawDataClient.h.

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

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

44  {
45  return (int) ( (d*NUMSPGS*HTRCHANMAX)+(s*HTRCHANMAX)+(c)); }
#define HTRCHANMAX
const edm::EventSetup * c
#define NUMSPGS
bool HcalRawDataClient::hasOther_Temp ( void  )
virtual

Reimplemented from HcalBaseDQClient.

Definition at line 339 of file HcalRawDataClient.cc.

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

Reimplemented from HcalBaseDQClient.

Definition at line 338 of file HcalRawDataClient.cc.

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

Definition at line 611 of file HcalRawDataClient.cc.

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

Referenced by fillProblemCountArray().

611  {
612  int myeta = 0;
613  int myphi =-1;
614  int mydepth = 0;
615  HcalDetId HDI;
616  //Light up the affected cell.
617  int i=hashup(dcc,spigot,htrchan);
618  HDI = HashToHDI(i);
619  if (HDI==HcalDetId::Undefined) {
620  return; // Do nothing at all, instead.
621  }
622  mydepth = HDI.depth();
623  myphi = HDI.iphi();
624  myeta = CalcEtaBin(HDI.subdet(),
625  HDI.ieta(),
626  mydepth);
627 
628  if (myeta>=0 && myeta<85 &&
629  (myphi-1)>=0 && (myphi-1)<72 &&
630  (mydepth-1)>=0 && (mydepth-1)<4){
631  if (problemcount[myeta][myphi-1][mydepth-1]< n) {
632  problemcount[myeta][myphi-1][mydepth-1]=n;
633 
634  //exlcude the decommissioned HO ring2, except SiPMs
635  if(mydepth==4 && excludeHORing2_==true)
636  if (abs(HDI.ieta())>=11 && abs(HDI.ieta())<=15 && !isSiPM(HDI.ieta(),HDI.iphi(),mydepth))
637  problemcount[myeta][myphi-1][mydepth-1] = 0.0;
638 
639  if (debug_>0)
640  std::cout<<" mapChannproblem found error! "<<HDI.subdet()<<"("<<HDI.ieta()<<", "<<HDI.iphi()<<", "<<HDI.depth()<<")"<<std::endl;
641  }
642  }
643 } // void HcalRawDataClient::mapChannproblem(...)
static const HcalDetId Undefined
Definition: HcalDetId.h:66
int i
Definition: DBlmapReader.cc:9
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:32
HcalDetId HashToHDI(int thehash)
#define abs(x)
Definition: mlp_lapack.h:159
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.h:42
int ieta() const
get the cell ieta
Definition: HcalDetId.h:38
int iphi() const
get the cell iphi
Definition: HcalDetId.h:40
uint64_t problemcount[85][72][4]
int CalcEtaBin(int subdet, int ieta, int depth)
tuple cout
Definition: gather_cfg.py:121
void HcalRawDataClient::mapDCCproblem ( int  dcc,
float  n 
)
private

Definition at line 543 of file HcalRawDataClient.cc.

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

Referenced by fillProblemCountArray().

543  {
544  int myeta = 0;
545  int myphi =-1;
546  int mydepth = 0;
547  HcalDetId HDI;
548  //Light up all affected cells.
549  for (int i=hashup(dcc);
550  i<hashup(dcc)+(NUMSPGS*HTRCHANMAX);
551  i++) {
552  HDI = hashedHcalDetId_[i];
553  if (HDI==HcalDetId::Undefined)
554  continue;
555  mydepth = HDI.depth();
556  myphi = HDI.iphi();
557  myeta = CalcEtaBin(HDI.subdet(),
558  HDI.ieta(),
559  mydepth);
560  if (myeta>=0 && myeta<85 &&
561  (myphi-1)>=0 && (myphi-1)<72 &&
562  (mydepth-1)>=0 && (mydepth-1)<4){
563  if (problemcount[myeta][myphi-1][mydepth-1]< n)
564  problemcount[myeta][myphi-1][mydepth-1]=n;
565 
566  //exclude the decommissioned HO ring2, except SiPMs
567  if(mydepth==4 && excludeHORing2_==true)
568  if (abs(HDI.ieta())>=11 && abs(HDI.ieta())<=15 && !isSiPM(HDI.ieta(),HDI.iphi(),mydepth))
569  problemcount[myeta][myphi-1][mydepth-1] = 0.0;
570 
571  if (debug_>0)
572  std::cout<<" mapDCCproblem found error! "<<HDI.subdet()<<"("<<HDI.ieta()<<", "<<HDI.iphi()<<", "<<HDI.depth()<<")"<<std::endl;
573  }
574  }
575 }
static const HcalDetId Undefined
Definition: HcalDetId.h:66
int i
Definition: DBlmapReader.cc:9
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:32
#define HTRCHANMAX
#define abs(x)
Definition: mlp_lapack.h:159
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.h:42
int ieta() const
get the cell ieta
Definition: HcalDetId.h:38
int iphi() const
get the cell iphi
Definition: HcalDetId.h:40
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:121
#define NUMSPGS
void HcalRawDataClient::mapHTRproblem ( int  dcc,
int  spigot,
float  n 
)
private

Definition at line 576 of file HcalRawDataClient.cc.

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

Referenced by fillProblemCountArray().

576  {
577  int myeta = 0;
578  int myphi =-1;
579  int mydepth = 0;
580  HcalDetId HDI;
581  //Light up all affected cells.
582  for (int i=hashup(dcc,spigot);
583  i<hashup(dcc,spigot)+(HTRCHANMAX); //nice, linear hash....
584  i++) {
585  HDI = hashedHcalDetId_[i];
586  if (HDI==HcalDetId::Undefined) {
587  continue;
588  }
589  mydepth = HDI.depth();
590  myphi = HDI.iphi();
591  myeta = CalcEtaBin(HDI.subdet(),
592  HDI.ieta(),
593  mydepth);
594  if (myeta>=0 && myeta<85 &&
595  (myphi-1)>=0 && (myphi-1)<72 &&
596  (mydepth-1)>=0 && (mydepth-1)<4){
597  if (problemcount[myeta][myphi-1][mydepth-1]< n)
598  problemcount[myeta][myphi-1][mydepth-1]=n;
599 
600  //exlcude the decommissioned HO ring2, except SiPMs
601  if(mydepth==4 && excludeHORing2_==true)
602  if (abs(HDI.ieta())>=11 && abs(HDI.ieta())<=15 && !isSiPM(HDI.ieta(),HDI.iphi(),mydepth))
603  problemcount[myeta][myphi-1][mydepth-1] = 0.0;
604 
605  if (debug_>0)
606  std::cout<<" mapHTRproblem found error! "<<HDI.subdet()<<"("<<HDI.ieta()<<", "<<HDI.iphi()<<", "<<HDI.depth()<<")"<<std::endl;
607  }
608  }
609 } // void HcalRawDataClient::mapHTRproblem(...)
static const HcalDetId Undefined
Definition: HcalDetId.h:66
int i
Definition: DBlmapReader.cc:9
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:32
#define HTRCHANMAX
#define abs(x)
Definition: mlp_lapack.h:159
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.h:42
int ieta() const
get the cell ieta
Definition: HcalDetId.h:38
int iphi() const
get the cell iphi
Definition: HcalDetId.h:40
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:121
void HcalRawDataClient::normalizeHardwareSpaceHistos ( void  )
private

Definition at line 646 of file HcalRawDataClient.cc.

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

Reimplemented from HcalBaseDQClient.

Definition at line 303 of file HcalRawDataClient.cc.

303 {}
void HcalRawDataClient::stashHDI ( int  thehash,
HcalDetId  thehcaldetid 
)
private

Definition at line 219 of file HcalRawDataClient.cc.

References hashedHcalDetId_, HTRCHANMAX, NUMDCCS, and NUMSPGS.

Referenced by beginRun().

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

Reimplemented from HcalBaseDQClient.

Definition at line 340 of file HcalRawDataClient.cc.

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

Reimplemented from HcalBaseDQClient.

Definition at line 343 of file HcalRawDataClient.cc.

344 {
345  // This gets called by HcalMonitorClient
346  // see dead or hot cell code for an example
347 
348 } //void HcalRawDataClient::updateChannelStatus

Member Data Documentation

TH2F* HcalRawDataClient::Chann_DataIntegrityCheck_[32]
private

Definition at line 67 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

TH2F* HcalRawDataClient::ChannSumm_DataIntegrityCheck_
private

Definition at line 65 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

TH2F* HcalRawDataClient::DataFlowInd_
private

Definition at line 64 of file HcalRawDataClient.h.

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

Definition at line 63 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

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

Definition at line 52 of file HcalRawDataClient.h.

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

TH2F* HcalRawDataClient::LRBDataCorruptionIndicators_
private

Definition at line 62 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

TH2F* HcalRawDataClient::meBCNSynch_
private

Definition at line 60 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

TH2F* HcalRawDataClient::meCDFErrorFound_
private

Definition at line 57 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

TH2F* HcalRawDataClient::meDCCEventFormatError_
private

Definition at line 58 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

TH2F* HcalRawDataClient::meEvtNumberSynch_
private

Definition at line 61 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

TH2F* HcalRawDataClient::meOrNSynch_
private

Definition at line 59 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray(), and getHardwareSpaceHistos().

int HcalRawDataClient::nevts_
private

Definition at line 40 of file HcalRawDataClient.h.

Referenced by beginRun().

float HcalRawDataClient::numTS_[32 *15]
private

Definition at line 55 of file HcalRawDataClient.h.

Referenced by fillProblemCountArray().

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

Definition at line 42 of file HcalRawDataClient.h.

Referenced by beginRun().