CMS 3D CMS Logo

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

#include <HcalDataIntegrityTask.h>

Inheritance diagram for HcalDataIntegrityTask:
HcalBaseDQMonitor edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 
void beginRun (const edm::Run &run, const edm::EventSetup &c)
 
void cleanup ()
 
 HcalDataIntegrityTask (const edm::ParameterSet &ps)
 
void processEvent (const FEDRawDataCollection &rawraw, const HcalUnpackerReport &report, const HcalElectronicsMap &emap)
 
void reset ()
 
void setup ()
 
void unpack (const FEDRawData &raw, const HcalElectronicsMap &emap)
 
 ~HcalDataIntegrityTask ()
 
- Public Member Functions inherited from HcalBaseDQMonitor
 HcalBaseDQMonitor (const edm::ParameterSet &ps)
 
 HcalBaseDQMonitor ()
 
virtual ~HcalBaseDQMonitor ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Public Attributes

std::map< uint32_t,
std::vector< HcalDetId > > 
DCCtoCell
 
std::map< uint32_t,
std::vector< HcalDetId >
>::iterator 
thisDCC
 

Private Member Functions

void fillzoos (int bin, int dccid)
 
void mapDCCproblem (int dcc)
 
void mapHTRproblem (int dcc, int spigot)
 
void UpdateMap ()
 

Private Attributes

std::map< int, short > CDFEventType_list
 
std::map< int, short >::iterator CDFEvT_it
 
std::map< int, short >::iterator CDFReservedBits_it
 
std::map< int, short > CDFReservedBits_list
 
std::map< int, short >::iterator CDFvers_it
 
std::map< int, short > CDFversionNumber_list
 
std::vector< int > dccCrate_
 
std::map< int, short >::iterator DCCEvtFormat_it
 
std::map< int, short > DCCEvtFormat_list
 
std::map< int, short >::iterator DCCRsvdBits_it
 
std::map< int, short > DCCRsvdBits_list
 
std::vector< HcalSubdetectordccSubdet_
 
MonitorElementfedEntries_
 
MonitorElementfedFatal_
 
MonitorElementfedNonFatal_
 
std::vector< int > fedUnpackList_
 
int firstFED_
 
std::vector< std::vector
< uint64_t > > 
HBmap
 
std::vector< std::vector
< uint64_t > > 
HEmap
 
std::vector< std::vector
< uint64_t > > 
HFmap
 
std::vector< std::vector
< uint64_t > > 
HOmap
 
edm::InputTag inputLabelRawData_
 
edm::InputTag inputLabelReport_
 
int lastBCN_
 
int lastEvtN_
 
std::vector< std::vector
< uint64_t > > 
phatmap
 
std::vector< std::vector< bool > > problemHB
 
std::vector< std::vector< bool > > problemHE
 
std::vector< std::vector< bool > > problemhere
 
std::vector< std::vector< bool > > problemHF
 
std::vector< std::vector< bool > > problemHO
 
int prtlvl_
 
const HcalElectronicsMapreadoutMap_
 

Static Private Attributes

static float DIMbin [32]
 
static size_t ietarange
 
static size_t iphirange
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from HcalBaseDQMonitor
virtual void beginJob ()
 
virtual void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
virtual void endJob (void)
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
virtual void endRun (const edm::Run &run, const edm::EventSetup &c)
 
void getLogicalMap (const edm::EventSetup &c)
 
bool IsAllowedCalibType ()
 
bool LumiInOrder (int lumisec)
 
void SetupEtaPhiHists (EtaPhiHists &hh, std::string Name, std::string Units)
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from HcalBaseDQMonitor
std::vector< int > AllowedCalibTypes_
 
int badChannelStatusMask_
 
int currentLS
 
int currenttype_
 
DQMStoredbe_
 
int debug_
 
bool enableCleanup_
 
bool eventAllowed_
 
bool HBpresent_
 
bool HEpresent_
 
bool HFpresent_
 
bool HOpresent_
 
int ievt_
 
std::map< unsigned int, int > KnownBadCells_
 
int levt_
 
HcalLogicalMaplogicalMap_
 
bool makeDiagnostics_
 
MonitorElementmeIevt_
 
MonitorElementmeLevt_
 
bool mergeRuns_
 
MonitorElementmeTevt_
 
MonitorElementmeTevtHist_
 
bool needLogicalMap_
 
int NLumiBlocks_
 
bool Online_
 
std::string prefixME_
 
MonitorElementProblemsCurrentLB
 
MonitorElementProblemsVsLB
 
MonitorElementProblemsVsLB_HB
 
MonitorElementProblemsVsLB_HBHEHF
 
MonitorElementProblemsVsLB_HE
 
MonitorElementProblemsVsLB_HF
 
MonitorElementProblemsVsLB_HO
 
bool skipOutOfOrderLS_
 
std::string subdir_
 
int tevt_
 

Detailed Description

Date:
2010/03/25 11:00:57
Revision:
1.4
Author
J. Temple – University of Maryland copied from W. Fisher/J. St. John's DataFormat code

Definition at line 31 of file HcalDataIntegrityTask.h.

Constructor & Destructor Documentation

HcalDataIntegrityTask::HcalDataIntegrityTask ( const edm::ParameterSet ps)

Definition at line 8 of file HcalDataIntegrityTask.cc.

References HcalBaseDQMonitor::AllowedCalibTypes_, HcalBaseDQMonitor::debug_, HcalBaseDQMonitor::enableCleanup_, edm::ParameterSet::getUntrackedParameter(), inputLabelRawData_, inputLabelReport_, HcalBaseDQMonitor::makeDiagnostics_, HcalBaseDQMonitor::mergeRuns_, HcalBaseDQMonitor::NLumiBlocks_, HcalBaseDQMonitor::Online_, HcalBaseDQMonitor::prefixME_, HcalBaseDQMonitor::skipOutOfOrderLS_, AlCaHLTBitMon_QueryRunRegistry::string, and HcalBaseDQMonitor::subdir_.

9 {
10 
11  Online_ = ps.getUntrackedParameter<bool>("online",false);
12  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns",false);
13  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup",false);
14  debug_ = ps.getUntrackedParameter<int>("debug",0);
15  prefixME_ = ps.getUntrackedParameter<std::string>("subSystemFolder","Hcal");
16  if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
17  prefixME_.append("/");
18  subdir_ = ps.getUntrackedParameter<std::string>("TaskFolder","HcalDataIntegrityTask");
19  if (subdir_.size()>0 && subdir_.substr(subdir_.size()-1,subdir_.size())!="/")
20  subdir_.append("/");
21  subdir_=prefixME_+subdir_;
22  AllowedCalibTypes_ = ps.getUntrackedParameter<std::vector<int> > ("AllowedCalibTypes");
23  skipOutOfOrderLS_ = ps.getUntrackedParameter<bool>("skipOutOfOrderLS",false);
24  NLumiBlocks_ = ps.getUntrackedParameter<int>("NLumiBlocks",4000);
25  makeDiagnostics_ = ps.getUntrackedParameter<bool>("makeDiagnostics",false);
26 
27  // Specific Data Integrity Task parameters
29  inputLabelReport_ = ps.getUntrackedParameter<edm::InputTag>("UnpackerReportLabel",edm::InputTag("hcalDigis"));
30 
31 } // HcalDataIntegrityTask::HcalDataIntegrityTask()
T getUntrackedParameter(std::string const &, T const &) const
std::vector< int > AllowedCalibTypes_
HcalDataIntegrityTask::~HcalDataIntegrityTask ( )

Definition at line 33 of file HcalDataIntegrityTask.cc.

33 {}

Member Function Documentation

void HcalDataIntegrityTask::analyze ( const edm::Event e,
const edm::EventSetup s 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 148 of file HcalDataIntegrityTask.cc.

References HcalBaseDQMonitor::analyze(), HcalBaseDQMonitor::debug_, edm::Event::getByLabel(), inputLabelRawData_, inputLabelReport_, HcalBaseDQMonitor::IsAllowedCalibType(), HcalBaseDQMonitor::LumiInOrder(), edm::EventBase::luminosityBlock(), processEvent(), readoutMap_, and zeeHLT_cff::report.

149 {
150  if (!IsAllowedCalibType()) return;
151  if (LumiInOrder(e.luminosityBlock())==false) return;
152 
153  // Now get the collections we need
154 
156 
157  // Trying new getByLabel
158  if (!(e.getByLabel(inputLabelRawData_,rawraw)))
159  {
160  if (debug_>0) edm::LogWarning("HcalDataIntegrityTask")<<" raw data with label "<<inputLabelRawData_<<" not available";
161  return;
162  }
163 
165  if (!(e.getByLabel(inputLabelReport_,report)))
166  {
167  if (debug_>0) edm::LogWarning("HcalDataIntegrityTask")<<" UnpackerReport with label "<<inputLabelReport_<<" \not available";
168  return;
169  }
170 
171  // Collections were found; increment counters
173 
174  processEvent(*rawraw, *report, *readoutMap_);
175 }
bool LumiInOrder(int lumisec)
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
tuple report
Definition: zeeHLT_cff.py:9
const HcalElectronicsMap * readoutMap_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
void processEvent(const FEDRawDataCollection &rawraw, const HcalUnpackerReport &report, const HcalElectronicsMap &emap)
void HcalDataIntegrityTask::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 56 of file HcalDataIntegrityTask.cc.

References HcalBaseDQMonitor::beginRun(), gather_cfg::cout, HcalBaseDQMonitor::debug_, edm::EventSetup::get(), HcalBaseDQMonitor::mergeRuns_, readoutMap_, reset(), setup(), HcalBaseDQMonitor::subdir_, and HcalBaseDQMonitor::tevt_.

57 {
58 
59  if (debug_>0) std::cout <<"HcalDataIntegrityTask::beginRun(): task = '"<<subdir_<<"'"<<std::endl;
60 
62  if (mergeRuns_ && tevt_>0) return;
63 
64  if (debug_>1) std::cout<<"\t<HcalDataIntegrityTask::getting eMap..."<<std::endl;
66  c.get<HcalDbRecord>().get( pSetup );
67  readoutMap_=pSetup->getHcalMapping();
68 
69  if (tevt_==0) // create histograms, if they haven't been created already
70  this->setup();
71  // Clear histograms at the start of each run if not merging runs
72  if (mergeRuns_==false)
73  this->reset();
74 
75 } // beginRun(const edm::Run& run, const edm::EventSetup& c)
virtual void beginRun(const edm::Run &run, const edm::EventSetup &c)
const HcalElectronicsMap * readoutMap_
const T & get() const
Definition: EventSetup.h:55
tuple cout
Definition: gather_cfg.py:121
void HcalDataIntegrityTask::cleanup ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 45 of file HcalDataIntegrityTask.cc.

References HcalBaseDQMonitor::dbe_, DQMStore::removeContents(), DQMStore::setCurrentFolder(), and HcalBaseDQMonitor::subdir_.

46 {
47  if(dbe_)
48  {
51  }
52 
53 } // void HcalDataIntegrityTask::cleanup()
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
Definition: DQMStore.cc:2569
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void HcalDataIntegrityTask::fillzoos ( int  bin,
int  dccid 
)
private
void HcalDataIntegrityTask::mapDCCproblem ( int  dcc)
private
void HcalDataIntegrityTask::mapHTRproblem ( int  dcc,
int  spigot 
)
private
void HcalDataIntegrityTask::processEvent ( const FEDRawDataCollection rawraw,
const HcalUnpackerReport report,
const HcalElectronicsMap emap 
)

Definition at line 179 of file HcalDataIntegrityTask.cc.

References gather_cfg::cout, HcalBaseDQMonitor::dbe_, FEDRawDataCollection::FEDData(), fedUnpackList_, i, FEDRawData::size(), and unpack().

Referenced by analyze().

181  {
182 
183  if(!dbe_)
184  {
185  std::cout<<"HcalDataIntegrityTask::processEvent DQMStore not instantiated!!!"<<std::endl;
186  return;
187  }
188 
189  // Loop over all FEDs reporting the event, unpacking if good.
190  for (std::vector<int>::const_iterator i=fedUnpackList_.begin();i!=fedUnpackList_.end(); i++)
191  {
192  const FEDRawData& fed = rawraw.FEDData(*i);
193  if (fed.size()<12) continue; // Was 16. How do such tiny events even get here?
194  unpack(fed,emap);
195  }
196 
197  return;
198 } //void HcalDataIntegrityTask::processEvent()
int i
Definition: DBlmapReader.cc:9
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:49
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
std::vector< int > fedUnpackList_
void unpack(const FEDRawData &raw, const HcalElectronicsMap &emap)
tuple cout
Definition: gather_cfg.py:121
void HcalDataIntegrityTask::reset ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 35 of file HcalDataIntegrityTask.cc.

References gather_cfg::cout, HcalBaseDQMonitor::debug_, fedEntries_, fedFatal_, fedNonFatal_, HcalBaseDQMonitor::reset(), and MonitorElement::Reset().

Referenced by beginRun(), and setup().

36 {
37  if (debug_>0) std::cout <<"HcalDataIntegrityTask::reset()"<<std::endl;
39  fedEntries_->Reset();
40  fedFatal_->Reset();
42 
43 }
MonitorElement * fedEntries_
virtual void reset(void)
MonitorElement * fedNonFatal_
tuple cout
Definition: gather_cfg.py:121
void Reset(void)
reset ME (ie. contents, errors, etc)
void HcalDataIntegrityTask::setup ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 78 of file HcalDataIntegrityTask.cc.

References DQMStore::book1D(), gather_cfg::cout, HcalBaseDQMonitor::dbe_, HcalBaseDQMonitor::debug_, fedEntries_, fedFatal_, fedNonFatal_, fedUnpackList_, firstFED_, HBmap, HEmap, HFmap, HOmap, i, IETAMAX, IETAMIN, ietarange, IPHIMAX, IPHIMIN, iphirange, FEDNumbering::MAXHCALFEDID, FEDNumbering::MINHCALFEDID, phatmap, problemHB, problemHE, problemhere, problemHF, problemHO, reset(), DQMStore::setCurrentFolder(), HcalBaseDQMonitor::setup(), and HcalBaseDQMonitor::subdir_.

Referenced by beginRun().

79 {
80  // Setup Creates all necessary histograms
82 
83  //Initialize phatmap to a vector of vectors of uint64_t 0
84  static size_t iphirange = IPHIMAX - IPHIMIN;
85  static size_t ietarange = IETAMAX - IETAMIN;
86 
87  std::vector<uint64_t> phatv (iphirange + 1, 0);
88 
89  if (debug_>0) std::cout <<"<HcalDataIntegrityTask::setup> Clearing old vectors"<<std::endl;
90  // Clear any old vectors
91  phatmap.clear();
92  HBmap.clear();
93  HEmap.clear();
94  HFmap.clear();
95  HOmap.clear();
96  problemhere.clear();
97  problemHB.clear();
98  problemHE.clear();
99  problemHF.clear();
100  problemHO.clear();
101 
102  // ... nothing goes at ieta=0, so an extra bin goes there.
103  phatmap = std::vector< std::vector < uint64_t> > ( ietarange + 1, phatv);
104  HBmap = std::vector< std::vector < uint64_t> > ( ietarange + 1, phatv);
105  HEmap = std::vector< std::vector < uint64_t> > ( ietarange + 1, phatv);
106  HFmap = std::vector< std::vector < uint64_t> > ( ietarange + 1, phatv);
107  HOmap = std::vector< std::vector < uint64_t> > ( ietarange + 1, phatv);
108  std::vector<bool> probvect (iphirange + 1, 0);
109  // ... nothing goes at ieta=0, so an extra bin goes there.
110  problemhere = std::vector< std::vector <bool> > ( ietarange + 1, probvect);
111  problemHB = std::vector< std::vector <bool> > ( ietarange + 1, probvect);
112  problemHE = std::vector< std::vector <bool> > ( ietarange + 1, probvect);
113  problemHF = std::vector< std::vector <bool> > ( ietarange + 1, probvect);
114  problemHO = std::vector< std::vector <bool> > ( ietarange + 1, probvect);
115 
116 
117 
118  if(debug_>1)
119  std::cout << "About to pushback fedUnpackList_" << std::endl;
120 
121  // Use this in CMSSW_3_0_X and above:
123  for (int i=FEDNumbering::MINHCALFEDID;
125  ++i)
126  {
127  if(debug_>1) std::cout << "[DFMon:]Pushback for fedUnpackList_: " << i <<std::endl;
128  fedUnpackList_.push_back(i);
129  }
130 
131  if ( dbe_ )
132  {
133 
134  if (debug_>1)
135  std::cout <<"\t<HcalDataIntegrityTask> Setting folder to "<<subdir_<<std::endl;
136 
138 
139  fedEntries_ = dbe_->book1D("FEDEntries","# entries per HCAL FED",32,700,732);
140  fedFatal_ = dbe_->book1D("FEDFatal","# fatal errors HCAL FED",32,700,732);
141  fedNonFatal_ = dbe_->book1D("FEDNonFatal","# non-fatal errors HCAL FED",32,700,732);
142  } // if (dbe_)
143 
144  this->reset(); // clear all histograms at start
145  return;
146 }
int i
Definition: DBlmapReader.cc:9
#define IPHIMIN
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
std::vector< std::vector< bool > > problemHE
std::vector< std::vector< uint64_t > > HFmap
std::vector< std::vector< uint64_t > > phatmap
std::vector< std::vector< uint64_t > > HEmap
std::vector< int > fedUnpackList_
MonitorElement * fedEntries_
std::vector< std::vector< bool > > problemHF
std::vector< std::vector< uint64_t > > HOmap
std::vector< std::vector< bool > > problemHB
#define IPHIMAX
std::vector< std::vector< uint64_t > > HBmap
MonitorElement * fedNonFatal_
std::vector< std::vector< bool > > problemHO
#define IETAMAX
#define IETAMIN
tuple cout
Definition: gather_cfg.py:121
virtual void setup(void)
std::vector< std::vector< bool > > problemhere
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void HcalDataIntegrityTask::unpack ( const FEDRawData raw,
const HcalElectronicsMap emap 
)

Definition at line 202 of file HcalDataIntegrityTask.cc.

References HcalDCCHeader::BOEshouldBe5Always(), HcalDCCHeader::BOEshouldBeZeroAlways(), CDFEventType_list, CDFEvT_it, CDFReservedBits_it, CDFReservedBits_list, CDFvers_it, CDFversionNumber_list, FEDTrailer::check(), FEDRawData::data(), fedEntries_, fedFatal_, MonitorElement::Fill(), HcalDCCHeader::getCDFEventType(), HcalDCCHeader::getCDFversionNumber(), HcalDCCHeader::getSlink64ReservedBits(), HcalDCCHeader::getSourceId(), FEDTrailer::lenght(), FEDTrailer::moreTrailers(), FEDRawData::size(), HcalDCCHeader::thereIsASecondCDFHeaderWord(), and HcalDCCHeader::thereIsAThirdCDFHeaderWord().

Referenced by processEvent().

203  {
204  // get the DCC header
205  const HcalDCCHeader* dccHeader=(const HcalDCCHeader*)(raw.data());
206  if(!dccHeader) return;
207 
208  // get the DCC trailer
209  unsigned char* trailer_ptr = (unsigned char*) (raw.data()+raw.size()-sizeof(uint64_t));
210  FEDTrailer trailer = FEDTrailer(trailer_ptr);
211 
212  int dccid=dccHeader->getSourceId();
213 
215  bool CDFProbThisDCC = false;
216  /* 1 */ //There should always be a second CDF header word indicated.
217  if (!dccHeader->thereIsASecondCDFHeaderWord())
218  {
219  CDFProbThisDCC = true;
220  }
221 
222  /* 2 */ //Make sure a reference CDF Version value has been recorded for this dccid
223  CDFvers_it = CDFversionNumber_list.find(dccid);
224  if (CDFvers_it == CDFversionNumber_list.end())
225  {
226  CDFversionNumber_list.insert(std::pair<int,short>
227  (dccid,dccHeader->getCDFversionNumber() ) );
228  CDFvers_it = CDFversionNumber_list.find(dccid);
229  } // then check against it.
230 
231  if (dccHeader->getCDFversionNumber()!= CDFvers_it->second)
232  {
233  CDFProbThisDCC = true;
234  }
235 
236  /* 3 */ //Make sure a reference CDF EventType value has been recorded for this dccid
237  CDFEvT_it = CDFEventType_list.find(dccid);
238  if (CDFEvT_it == CDFEventType_list.end())
239  {
240  CDFEventType_list.insert(std::pair<int,short>
241  (dccid,dccHeader->getCDFEventType() ) );
242  CDFEvT_it = CDFEventType_list.find(dccid);
243  } // then check against it.
244 
245  if (dccHeader->getCDFEventType()!= CDFEvT_it->second)
246  {
247  // On probation until safe against Orbit Gap Calibration Triggers...
248  // CDFProbThisDCC = true;
249  }
250 
251  /* 4 */ //There should always be a '5' in CDF Header word 0, bits [63:60]
252  if (dccHeader->BOEshouldBe5Always()!=5)
253  {
254  CDFProbThisDCC = true;
255  }
256 
257  /* 5 */ //There should never be a third CDF Header word indicated.
258  if (dccHeader->thereIsAThirdCDFHeaderWord())
259  {
260  CDFProbThisDCC = true;
261  }
262 
263  /* 6 */ //Make sure a reference value of Reserved Bits has been recorded for this dccid
264 
267  CDFReservedBits_list.insert(std::pair<int,short>
268  (dccid,dccHeader->getSlink64ReservedBits() ) );
270  } // then check against it.
271 
272  if ((int) dccHeader->getSlink64ReservedBits()!= CDFReservedBits_it->second)
273  {
274  // On probation until safe against Orbit Gap Calibration Triggers...
275  // CDFProbThisDCC = true;
276  }
277 
278  /* 7 */ //There should always be 0x0 in CDF Header word 1, bits [63:60]
279  if (dccHeader->BOEshouldBeZeroAlways() !=0)
280  {
281  CDFProbThisDCC = true;
282  }
283 
284  /* 8 */ //There should only be one trailer
285  if (trailer.moreTrailers())
286  {
287  CDFProbThisDCC = true;
288  }
289  // if trailer.
290 
291  /* 9 */ //CDF Trailer [55:30] should be the # 64-bit words in the EvFragment
292  if ((uint64_t) raw.size() != ( (uint64_t) trailer.lenght()*sizeof(uint64_t)) ) //The function name is a typo! Awesome.
293  {
294  CDFProbThisDCC = true;
295  }
296  /*10 */ //There is a rudimentary sanity check built into the FEDTrailer class
297  if (!trailer.check())
298  {
299  CDFProbThisDCC = true;
300  }
301 
302  if (CDFProbThisDCC)
303  fedFatal_->Fill(dccid);
304  fedEntries_->Fill(dccid);
305 
306  return;
307 } // void HcalDataIntegrityTask::unpack()
bool check()
Definition: FEDTrailer.cc:66
unsigned int getSlink64ReservedBits() const
Definition: HcalDCCHeader.h:50
bool moreTrailers()
Definition: FEDTrailer.cc:39
std::map< int, short > CDFversionNumber_list
bool thereIsAThirdCDFHeaderWord() const
Definition: HcalDCCHeader.h:46
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:49
void Fill(long long x)
std::map< int, short >::iterator CDFvers_it
std::map< int, short >::iterator CDFReservedBits_it
unsigned short getCDFEventType() const
Definition: HcalDCCHeader.h:40
int getSourceId() const
Definition: HcalDCCHeader.h:34
MonitorElement * fedEntries_
unsigned long long uint64_t
Definition: Time.h:15
std::map< int, short >::iterator CDFEvT_it
int lenght()
The length of the event fragment counted in 64-bit words including header and trailer.
Definition: FEDTrailer.cc:19
short BOEshouldBeZeroAlways() const
Definition: HcalDCCHeader.h:52
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:29
std::map< int, short > CDFReservedBits_list
std::map< int, short > CDFEventType_list
short getCDFversionNumber() const
Definition: HcalDCCHeader.h:32
unsigned short BOEshouldBe5Always() const
Definition: HcalDCCHeader.h:42
bool thereIsASecondCDFHeaderWord() const
Definition: HcalDCCHeader.h:30
void HcalDataIntegrityTask::UpdateMap ( )
private

Member Data Documentation

std::map<int, short> HcalDataIntegrityTask::CDFEventType_list
private

Definition at line 91 of file HcalDataIntegrityTask.h.

Referenced by unpack().

std::map<int, short>::iterator HcalDataIntegrityTask::CDFEvT_it
private

Definition at line 92 of file HcalDataIntegrityTask.h.

Referenced by unpack().

std::map<int, short>::iterator HcalDataIntegrityTask::CDFReservedBits_it
private

Definition at line 94 of file HcalDataIntegrityTask.h.

Referenced by unpack().

std::map<int, short> HcalDataIntegrityTask::CDFReservedBits_list
private

Definition at line 93 of file HcalDataIntegrityTask.h.

Referenced by unpack().

std::map<int, short>::iterator HcalDataIntegrityTask::CDFvers_it
private

Definition at line 90 of file HcalDataIntegrityTask.h.

Referenced by unpack().

std::map<int, short> HcalDataIntegrityTask::CDFversionNumber_list
private

Definition at line 89 of file HcalDataIntegrityTask.h.

Referenced by unpack().

std::vector<int> HcalDataIntegrityTask::dccCrate_
private

Definition at line 72 of file HcalDataIntegrityTask.h.

std::map<int, short>::iterator HcalDataIntegrityTask::DCCEvtFormat_it
private

Definition at line 96 of file HcalDataIntegrityTask.h.

std::map<int, short> HcalDataIntegrityTask::DCCEvtFormat_list
private

Definition at line 95 of file HcalDataIntegrityTask.h.

std::map<int, short>::iterator HcalDataIntegrityTask::DCCRsvdBits_it
private

Definition at line 98 of file HcalDataIntegrityTask.h.

std::map<int, short> HcalDataIntegrityTask::DCCRsvdBits_list
private

Definition at line 97 of file HcalDataIntegrityTask.h.

std::vector<HcalSubdetector> HcalDataIntegrityTask::dccSubdet_
private

Definition at line 73 of file HcalDataIntegrityTask.h.

std::map<uint32_t, std::vector<HcalDetId> > HcalDataIntegrityTask::DCCtoCell

Definition at line 48 of file HcalDataIntegrityTask.h.

float HcalDataIntegrityTask::DIMbin
staticprivate
Initial value:
={ 4, 4.5,
0, 0.5,
1, 1.5,
5, 5.5,
11, 11.5,
15, 15.5,
17, 17.5,
14, 14.5,
10, 10.5,
2, 2.5,
9, 9.5,
12, 12.5,
3, 3.5,
7, 7.5,
6, 6.5,
13, 13.5
}

Definition at line 101 of file HcalDataIntegrityTask.h.

MonitorElement* HcalDataIntegrityTask::fedEntries_
private

Definition at line 84 of file HcalDataIntegrityTask.h.

Referenced by reset(), setup(), and unpack().

MonitorElement* HcalDataIntegrityTask::fedFatal_
private

Definition at line 85 of file HcalDataIntegrityTask.h.

Referenced by reset(), setup(), and unpack().

MonitorElement* HcalDataIntegrityTask::fedNonFatal_
private

Definition at line 86 of file HcalDataIntegrityTask.h.

Referenced by reset(), and setup().

std::vector<int> HcalDataIntegrityTask::fedUnpackList_
private

Definition at line 71 of file HcalDataIntegrityTask.h.

Referenced by processEvent(), and setup().

int HcalDataIntegrityTask::firstFED_
private

Definition at line 74 of file HcalDataIntegrityTask.h.

Referenced by setup().

std::vector<std::vector<uint64_t> > HcalDataIntegrityTask::HBmap
private

Definition at line 64 of file HcalDataIntegrityTask.h.

Referenced by setup().

std::vector<std::vector<uint64_t> > HcalDataIntegrityTask::HEmap
private

Definition at line 65 of file HcalDataIntegrityTask.h.

Referenced by setup().

std::vector<std::vector<uint64_t> > HcalDataIntegrityTask::HFmap
private

Definition at line 66 of file HcalDataIntegrityTask.h.

Referenced by setup().

std::vector<std::vector<uint64_t> > HcalDataIntegrityTask::HOmap
private

Definition at line 67 of file HcalDataIntegrityTask.h.

Referenced by setup().

size_t HcalDataIntegrityTask::ietarange
staticprivate

Definition at line 54 of file HcalDataIntegrityTask.h.

Referenced by setup().

edm::InputTag HcalDataIntegrityTask::inputLabelRawData_
private

Definition at line 104 of file HcalDataIntegrityTask.h.

Referenced by analyze(), and HcalDataIntegrityTask().

edm::InputTag HcalDataIntegrityTask::inputLabelReport_
private

Definition at line 105 of file HcalDataIntegrityTask.h.

Referenced by analyze(), and HcalDataIntegrityTask().

size_t HcalDataIntegrityTask::iphirange
staticprivate

Definition at line 53 of file HcalDataIntegrityTask.h.

Referenced by setup().

int HcalDataIntegrityTask::lastBCN_
private

Definition at line 76 of file HcalDataIntegrityTask.h.

int HcalDataIntegrityTask::lastEvtN_
private

Definition at line 75 of file HcalDataIntegrityTask.h.

std::vector<std::vector<uint64_t> > HcalDataIntegrityTask::phatmap
private

Definition at line 63 of file HcalDataIntegrityTask.h.

Referenced by setup().

std::vector<std::vector<bool> > HcalDataIntegrityTask::problemHB
private

Definition at line 56 of file HcalDataIntegrityTask.h.

Referenced by setup().

std::vector<std::vector<bool> > HcalDataIntegrityTask::problemHE
private

Definition at line 57 of file HcalDataIntegrityTask.h.

Referenced by setup().

std::vector<std::vector<bool> > HcalDataIntegrityTask::problemhere
private

Definition at line 55 of file HcalDataIntegrityTask.h.

Referenced by setup().

std::vector<std::vector<bool> > HcalDataIntegrityTask::problemHF
private

Definition at line 58 of file HcalDataIntegrityTask.h.

Referenced by setup().

std::vector<std::vector<bool> > HcalDataIntegrityTask::problemHO
private

Definition at line 59 of file HcalDataIntegrityTask.h.

Referenced by setup().

int HcalDataIntegrityTask::prtlvl_
private

Definition at line 80 of file HcalDataIntegrityTask.h.

const HcalElectronicsMap* HcalDataIntegrityTask::readoutMap_
private

Definition at line 103 of file HcalDataIntegrityTask.h.

Referenced by analyze(), and beginRun().

std::map<uint32_t, std::vector<HcalDetId> >::iterator HcalDataIntegrityTask::thisDCC

Definition at line 49 of file HcalDataIntegrityTask.h.