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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) 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_
 
edm::EDGetTokenT
< FEDRawDataCollection
tok_raw_
 
edm::EDGetTokenT
< HcalUnpackerReport
tok_report_
 

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
 
- 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::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

Author
J. Temple – University of Maryland copied from W. Fisher/J. St. John's DataFormat code

Definition at line 29 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, HcalBaseDQMonitor::subdir_, tok_raw_, and tok_report_.

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 
32  // register for data access
33  tok_raw_ = consumes<FEDRawDataCollection>(inputLabelRawData_);
34  tok_report_ = consumes<HcalUnpackerReport>(inputLabelReport_);
35 
36 } // HcalDataIntegrityTask::HcalDataIntegrityTask()
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
std::vector< int > AllowedCalibTypes_
edm::EDGetTokenT< HcalUnpackerReport > tok_report_
HcalDataIntegrityTask::~HcalDataIntegrityTask ( )

Definition at line 38 of file HcalDataIntegrityTask.cc.

38 {}

Member Function Documentation

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 153 of file HcalDataIntegrityTask.cc.

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

154 {
155  if (!IsAllowedCalibType()) return;
156  if (LumiInOrder(e.luminosityBlock())==false) return;
157 
158  // Now get the collections we need
159 
161 
162  if (!(e.getByToken(tok_raw_,rawraw)))
163  {
164  if (debug_>0) edm::LogWarning("HcalDataIntegrityTask")<<" raw data with label "<<inputLabelRawData_<<" not available";
165  return;
166  }
167 
169  if (!(e.getByToken(tok_report_,report)))
170  {
171  if (debug_>0) edm::LogWarning("HcalDataIntegrityTask")<<" UnpackerReport with label "<<inputLabelReport_<<" \not available";
172  return;
173  }
174 
175  // Collections were found; increment counters
177 
178  processEvent(*rawraw, *report, *readoutMap_);
179 }
bool LumiInOrder(int lumisec)
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
tuple report
Definition: zeeHLT_cff.py:9
const HcalElectronicsMap * readoutMap_
void processEvent(const FEDRawDataCollection &rawraw, const HcalUnpackerReport &report, const HcalElectronicsMap &emap)
edm::EDGetTokenT< HcalUnpackerReport > tok_report_
void HcalDataIntegrityTask::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 61 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_.

62 {
63 
64  if (debug_>0) std::cout <<"HcalDataIntegrityTask::beginRun(): task = '"<<subdir_<<"'"<<std::endl;
65 
67  if (mergeRuns_ && tevt_>0) return;
68 
69  if (debug_>1) std::cout<<"\t<HcalDataIntegrityTask::getting eMap..."<<std::endl;
71  c.get<HcalDbRecord>().get( pSetup );
72  readoutMap_=pSetup->getHcalMapping();
73 
74  if (tevt_==0) // create histograms, if they haven't been created already
75  this->setup();
76  // Clear histograms at the start of each run if not merging runs
77  if (mergeRuns_==false)
78  this->reset();
79 
80 } // 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 50 of file HcalDataIntegrityTask.cc.

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

51 {
52  if(dbe_)
53  {
56  }
57 
58 } // void HcalDataIntegrityTask::cleanup()
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
Definition: DQMStore.cc:3080
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:655
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 183 of file HcalDataIntegrityTask.cc.

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

Referenced by analyze().

185  {
186 
187  if(!dbe_)
188  {
189  std::cout<<"HcalDataIntegrityTask::processEvent DQMStore not instantiated!!!"<<std::endl;
190  return;
191  }
192 
193  // Loop over all FEDs reporting the event, unpacking if good.
194  for (std::vector<int>::const_iterator i=fedUnpackList_.begin();i!=fedUnpackList_.end(); i++)
195  {
196  const FEDRawData& fed = rawraw.FEDData(*i);
197  if (fed.size()<12) continue; // Was 16. How do such tiny events even get here?
198  unpack(fed,emap);
199  }
200 
201  return;
202 } //void HcalDataIntegrityTask::processEvent()
int i
Definition: DBlmapReader.cc:9
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
std::vector< int > fedUnpackList_
string fed
Definition: rpc-layouts.py:7
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 40 of file HcalDataIntegrityTask.cc.

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

Referenced by beginRun(), and setup().

41 {
42  if (debug_>0) std::cout <<"HcalDataIntegrityTask::reset()"<<std::endl;
44  fedEntries_->Reset();
45  fedFatal_->Reset();
47 
48 }
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 83 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().

84 {
85  // Setup Creates all necessary histograms
87 
88  //Initialize phatmap to a vector of vectors of uint64_t 0
89  static size_t iphirange = IPHIMAX - IPHIMIN;
90  static size_t ietarange = IETAMAX - IETAMIN;
91 
92  std::vector<uint64_t> phatv (iphirange + 1, 0);
93 
94  if (debug_>0) std::cout <<"<HcalDataIntegrityTask::setup> Clearing old vectors"<<std::endl;
95  // Clear any old vectors
96  phatmap.clear();
97  HBmap.clear();
98  HEmap.clear();
99  HFmap.clear();
100  HOmap.clear();
101  problemhere.clear();
102  problemHB.clear();
103  problemHE.clear();
104  problemHF.clear();
105  problemHO.clear();
106 
107  // ... nothing goes at ieta=0, so an extra bin goes there.
108  phatmap = std::vector< std::vector < uint64_t> > ( ietarange + 1, phatv);
109  HBmap = std::vector< std::vector < uint64_t> > ( ietarange + 1, phatv);
110  HEmap = std::vector< std::vector < uint64_t> > ( ietarange + 1, phatv);
111  HFmap = std::vector< std::vector < uint64_t> > ( ietarange + 1, phatv);
112  HOmap = std::vector< std::vector < uint64_t> > ( ietarange + 1, phatv);
113  std::vector<bool> probvect (iphirange + 1, 0);
114  // ... nothing goes at ieta=0, so an extra bin goes there.
115  problemhere = std::vector< std::vector <bool> > ( ietarange + 1, probvect);
116  problemHB = std::vector< std::vector <bool> > ( ietarange + 1, probvect);
117  problemHE = std::vector< std::vector <bool> > ( ietarange + 1, probvect);
118  problemHF = std::vector< std::vector <bool> > ( ietarange + 1, probvect);
119  problemHO = std::vector< std::vector <bool> > ( ietarange + 1, probvect);
120 
121 
122 
123  if(debug_>1)
124  std::cout << "About to pushback fedUnpackList_" << std::endl;
125 
126  // Use this in CMSSW_3_0_X and above:
128  for (int i=FEDNumbering::MINHCALFEDID;
130  ++i)
131  {
132  if(debug_>1) std::cout << "[DFMon:]Pushback for fedUnpackList_: " << i <<std::endl;
133  fedUnpackList_.push_back(i);
134  }
135 
136  if ( dbe_ )
137  {
138 
139  if (debug_>1)
140  std::cout <<"\t<HcalDataIntegrityTask> Setting folder to "<<subdir_<<std::endl;
141 
143 
144  fedEntries_ = dbe_->book1D("FEDEntries","# entries per HCAL FED",32,700,732);
145  fedFatal_ = dbe_->book1D("FEDFatal","# fatal errors HCAL FED",32,700,732);
146  fedNonFatal_ = dbe_->book1D("FEDNonFatal","# non-fatal errors HCAL FED",32,700,732);
147  } // if (dbe_)
148 
149  this->reset(); // clear all histograms at start
150  return;
151 }
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:942
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:655
void HcalDataIntegrityTask::unpack ( const FEDRawData raw,
const HcalElectronicsMap emap 
)

Definition at line 206 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().

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

Member Data Documentation

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

Definition at line 89 of file HcalDataIntegrityTask.h.

Referenced by unpack().

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

Definition at line 90 of file HcalDataIntegrityTask.h.

Referenced by unpack().

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

Definition at line 92 of file HcalDataIntegrityTask.h.

Referenced by unpack().

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

Definition at line 91 of file HcalDataIntegrityTask.h.

Referenced by unpack().

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

Definition at line 88 of file HcalDataIntegrityTask.h.

Referenced by unpack().

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

Definition at line 87 of file HcalDataIntegrityTask.h.

Referenced by unpack().

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

Definition at line 70 of file HcalDataIntegrityTask.h.

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

Definition at line 94 of file HcalDataIntegrityTask.h.

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

Definition at line 93 of file HcalDataIntegrityTask.h.

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

Definition at line 96 of file HcalDataIntegrityTask.h.

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

Definition at line 95 of file HcalDataIntegrityTask.h.

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

Definition at line 71 of file HcalDataIntegrityTask.h.

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

Definition at line 46 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 99 of file HcalDataIntegrityTask.h.

MonitorElement* HcalDataIntegrityTask::fedEntries_
private

Definition at line 82 of file HcalDataIntegrityTask.h.

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

MonitorElement* HcalDataIntegrityTask::fedFatal_
private

Definition at line 83 of file HcalDataIntegrityTask.h.

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

MonitorElement* HcalDataIntegrityTask::fedNonFatal_
private

Definition at line 84 of file HcalDataIntegrityTask.h.

Referenced by reset(), and setup().

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

Definition at line 69 of file HcalDataIntegrityTask.h.

Referenced by processEvent(), and setup().

int HcalDataIntegrityTask::firstFED_
private

Definition at line 72 of file HcalDataIntegrityTask.h.

Referenced by setup().

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

Definition at line 62 of file HcalDataIntegrityTask.h.

Referenced by setup().

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

Definition at line 63 of file HcalDataIntegrityTask.h.

Referenced by setup().

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

Definition at line 64 of file HcalDataIntegrityTask.h.

Referenced by setup().

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

Definition at line 65 of file HcalDataIntegrityTask.h.

Referenced by setup().

size_t HcalDataIntegrityTask::ietarange
staticprivate

Definition at line 52 of file HcalDataIntegrityTask.h.

Referenced by setup().

edm::InputTag HcalDataIntegrityTask::inputLabelRawData_
private

Definition at line 102 of file HcalDataIntegrityTask.h.

Referenced by analyze(), and HcalDataIntegrityTask().

edm::InputTag HcalDataIntegrityTask::inputLabelReport_
private

Definition at line 103 of file HcalDataIntegrityTask.h.

Referenced by analyze(), and HcalDataIntegrityTask().

size_t HcalDataIntegrityTask::iphirange
staticprivate

Definition at line 51 of file HcalDataIntegrityTask.h.

Referenced by setup().

int HcalDataIntegrityTask::lastBCN_
private

Definition at line 74 of file HcalDataIntegrityTask.h.

int HcalDataIntegrityTask::lastEvtN_
private

Definition at line 73 of file HcalDataIntegrityTask.h.

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

Definition at line 61 of file HcalDataIntegrityTask.h.

Referenced by setup().

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

Definition at line 54 of file HcalDataIntegrityTask.h.

Referenced by setup().

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

Definition at line 55 of file HcalDataIntegrityTask.h.

Referenced by setup().

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

Definition at line 53 of file HcalDataIntegrityTask.h.

Referenced by setup().

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

Definition at line 56 of file HcalDataIntegrityTask.h.

Referenced by setup().

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

Definition at line 57 of file HcalDataIntegrityTask.h.

Referenced by setup().

int HcalDataIntegrityTask::prtlvl_
private

Definition at line 78 of file HcalDataIntegrityTask.h.

const HcalElectronicsMap* HcalDataIntegrityTask::readoutMap_
private

Definition at line 101 of file HcalDataIntegrityTask.h.

Referenced by analyze(), and beginRun().

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

Definition at line 47 of file HcalDataIntegrityTask.h.

edm::EDGetTokenT<FEDRawDataCollection> HcalDataIntegrityTask::tok_raw_
private

Definition at line 105 of file HcalDataIntegrityTask.h.

Referenced by analyze(), and HcalDataIntegrityTask().

edm::EDGetTokenT<HcalUnpackerReport> HcalDataIntegrityTask::tok_report_
private

Definition at line 106 of file HcalDataIntegrityTask.h.

Referenced by analyze(), and HcalDataIntegrityTask().