CMS 3D CMS Logo

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

#include <HcalRawDataMonitor.h>

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

Public Member Functions

 HcalRawDataMonitor (const edm::ParameterSet &ps)
 
 HcalRawDataMonitor ()
 
 ~HcalRawDataMonitor ()
 
- 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 ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void beginRun (const edm::Run &run, const edm::EventSetup &c)
 
void endJob (void)
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void endRun (const edm::Run &run, const edm::EventSetup &c)
 
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)
 
void mapDCCproblem (int dcc)
 
void mapHTRproblem (int dcc, int spigot)
 
void processEvent (const FEDRawDataCollection &rawraw, const HcalUnpackerReport &report)
 
void reset (void)
 
void setup (void)
 
void stashHDI (int thehash, HcalDetId thehcaldetid)
 
void unpack (const FEDRawData &raw)
 
void whosebad (int subdet)
 
- Protected Member Functions inherited from HcalBaseDQMonitor
virtual void beginJob ()
 
virtual void cleanup (void)
 
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

edm::InputTag digiLabel_
 
edm::InputTag FEDRawDataCollection_
 
uint64_t problemcount [ETABINS][PHIBINS][DEPTHBINS]
 
bool problemfound [ETABINS][PHIBINS][DEPTHBINS]
 
const HcalElectronicsMapreadoutMap_
 
edm::EDGetTokenT
< FEDRawDataCollection
tok_raw_
 
edm::EDGetTokenT
< HcalUnpackerReport
tok_unpack_
 
uint64_t uniqcounter [ETABINS][PHIBINS][DEPTHBINS]
 
- 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_
 

Private Member Functions

void HTRPrint (const HcalHTRData &htr, int prtlvl)
 
void label_xChanns (MonitorElement *me_ptr, int xbins)
 
void label_xFEDs (MonitorElement *me_ptr, int xbins)
 
void label_ySpigots (MonitorElement *me_ptr, int ybins)
 
void labelHTRBits (MonitorElement *mePlot, unsigned int axisType)
 
void UpdateMEs (void)
 

Private Attributes

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
 
float Chann_DataIntegrityCheck_ [NUMDCCS][TWO_CHANN][TWO__SPGT]
 
float ChannSumm_DataIntegrityCheck_ [TWO___FED][TWO__SPGT]
 
float DataFlowInd_ [TWO___FED][THREE_SPG]
 
std::map< int, short >::iterator DCCEvtFormat_it
 
std::map< int, short > DCCEvtFormat_list
 
bool excludeHORing2_
 
float HalfHTRDataCorruptionIndicators_ [THREE_FED][THREE_SPG]
 
HcalDetId hashedHcalDetId_ [NUMDCCS *NUMSPIGS *HTRCHANMAX]
 
MonitorElementHTR_StatusWd_HBHE
 
MonitorElementHTR_StatusWd_HF
 
MonitorElementHTR_StatusWd_HO
 
float LRBDataCorruptionIndicators_ [THREE_FED][THREE_SPG]
 
MonitorElementmeBCN_
 
MonitorElementmeBCNCheck_
 
MonitorElementmeBCNSynch_
 
MonitorElementmeBCNwhenOrNDiff_
 
MonitorElementmeCDFErrorFound_
 
MonitorElementmeCh_DataIntegrityFED00_
 
MonitorElementmeCh_DataIntegrityFED01_
 
MonitorElementmeCh_DataIntegrityFED02_
 
MonitorElementmeCh_DataIntegrityFED03_
 
MonitorElementmeCh_DataIntegrityFED04_
 
MonitorElementmeCh_DataIntegrityFED05_
 
MonitorElementmeCh_DataIntegrityFED06_
 
MonitorElementmeCh_DataIntegrityFED07_
 
MonitorElementmeCh_DataIntegrityFED08_
 
MonitorElementmeCh_DataIntegrityFED09_
 
MonitorElementmeCh_DataIntegrityFED10_
 
MonitorElementmeCh_DataIntegrityFED11_
 
MonitorElementmeCh_DataIntegrityFED12_
 
MonitorElementmeCh_DataIntegrityFED13_
 
MonitorElementmeCh_DataIntegrityFED14_
 
MonitorElementmeCh_DataIntegrityFED15_
 
MonitorElementmeCh_DataIntegrityFED16_
 
MonitorElementmeCh_DataIntegrityFED17_
 
MonitorElementmeCh_DataIntegrityFED18_
 
MonitorElementmeCh_DataIntegrityFED19_
 
MonitorElementmeCh_DataIntegrityFED20_
 
MonitorElementmeCh_DataIntegrityFED21_
 
MonitorElementmeCh_DataIntegrityFED22_
 
MonitorElementmeCh_DataIntegrityFED23_
 
MonitorElementmeCh_DataIntegrityFED24_
 
MonitorElementmeCh_DataIntegrityFED25_
 
MonitorElementmeCh_DataIntegrityFED26_
 
MonitorElementmeCh_DataIntegrityFED27_
 
MonitorElementmeCh_DataIntegrityFED28_
 
MonitorElementmeCh_DataIntegrityFED29_
 
MonitorElementmeCh_DataIntegrityFED30_
 
MonitorElementmeCh_DataIntegrityFED31_
 
MonitorElementmeChann_DataIntegrityCheck_ [NUMDCCS]
 
MonitorElementmeChannSumm_DataIntegrityCheck_
 
MonitorElementmeCrate0HTRStatus_
 
MonitorElementmeCrate10HTRStatus_
 
MonitorElementmeCrate11HTRStatus_
 
MonitorElementmeCrate12HTRStatus_
 
MonitorElementmeCrate13HTRStatus_
 
MonitorElementmeCrate14HTRStatus_
 
MonitorElementmeCrate15HTRStatus_
 
MonitorElementmeCrate17HTRStatus_
 
MonitorElementmeCrate1HTRStatus_
 
MonitorElementmeCrate2HTRStatus_
 
MonitorElementmeCrate3HTRStatus_
 
MonitorElementmeCrate4HTRStatus_
 
MonitorElementmeCrate5HTRStatus_
 
MonitorElementmeCrate6HTRStatus_
 
MonitorElementmeCrate7HTRStatus_
 
MonitorElementmeCrate9HTRStatus_
 
MonitorElementmeDataFlowInd_
 
MonitorElementmedccBCN_
 
MonitorElementmeDCCEventFormatError_
 
MonitorElementmeDCCVersion_
 
MonitorElementmeEvFragSize2_
 
MonitorElementmeEvFragSize_
 
MonitorElementmeEvtNCheck_
 
MonitorElementmeEvtNumberSynch_
 
MonitorElementmefedEntries_
 
MonitorElementmeFEDRawDataSizes_
 
MonitorElementmeFib1OrbMsgBCN_
 
MonitorElementmeFib2OrbMsgBCN_
 
MonitorElementmeFib3OrbMsgBCN_
 
MonitorElementmeFib4OrbMsgBCN_
 
MonitorElementmeFib5OrbMsgBCN_
 
MonitorElementmeFib6OrbMsgBCN_
 
MonitorElementmeFib7OrbMsgBCN_
 
MonitorElementmeFib8OrbMsgBCN_
 
MonitorElementmeFibBCN_
 
MonitorElementmeHalfHTRDataCorruptionIndicators_
 
MonitorElementmeHTRFWVersion_
 
MonitorElementmeInvHTRData_
 
MonitorElementmeLRBDataCorruptionIndicators_
 
MonitorElementmeOrNCheck_
 
MonitorElementmeOrNSynch_
 
MonitorElementmeStatusWdCrate_
 
MonitorElementmeUSFractSpigs_
 
int NumBadHB
 
int NumBadHE
 
int NumBadHF
 
int NumBadHFLUMI
 
int NumBadHO
 
int NumBadHO0
 
int NumBadHO12
 
uint64_t UScount [NUMDCCS][NUMSPIGS]
 

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 &)
 

Detailed Description

Author
J. St. John - Boston University

Definition at line 32 of file HcalRawDataMonitor.h.

Constructor & Destructor Documentation

HcalRawDataMonitor::HcalRawDataMonitor ( const edm::ParameterSet ps)

Definition at line 9 of file HcalRawDataMonitor.cc.

References HcalBaseDQMonitor::AllowedCalibTypes_, HcalBaseDQMonitor::debug_, digiLabel_, HcalBaseDQMonitor::enableCleanup_, excludeHORing2_, FEDRawDataCollection_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HcalBaseDQMonitor::makeDiagnostics_, meCh_DataIntegrityFED00_, meCh_DataIntegrityFED01_, meCh_DataIntegrityFED02_, meCh_DataIntegrityFED03_, meCh_DataIntegrityFED04_, meCh_DataIntegrityFED05_, meCh_DataIntegrityFED06_, meCh_DataIntegrityFED07_, meCh_DataIntegrityFED08_, meCh_DataIntegrityFED09_, meCh_DataIntegrityFED10_, meCh_DataIntegrityFED11_, meCh_DataIntegrityFED12_, meCh_DataIntegrityFED13_, meCh_DataIntegrityFED14_, meCh_DataIntegrityFED15_, meCh_DataIntegrityFED16_, meCh_DataIntegrityFED17_, meCh_DataIntegrityFED18_, meCh_DataIntegrityFED19_, meCh_DataIntegrityFED20_, meCh_DataIntegrityFED21_, meCh_DataIntegrityFED22_, meCh_DataIntegrityFED23_, meCh_DataIntegrityFED24_, meCh_DataIntegrityFED25_, meCh_DataIntegrityFED26_, meCh_DataIntegrityFED27_, meCh_DataIntegrityFED28_, meCh_DataIntegrityFED29_, meCh_DataIntegrityFED30_, meCh_DataIntegrityFED31_, meChann_DataIntegrityCheck_, HcalBaseDQMonitor::mergeRuns_, HcalBaseDQMonitor::NLumiBlocks_, HcalBaseDQMonitor::Online_, HcalBaseDQMonitor::prefixME_, reset(), HcalBaseDQMonitor::skipOutOfOrderLS_, AlCaHLTBitMon_QueryRunRegistry::string, HcalBaseDQMonitor::subdir_, tok_raw_, and tok_unpack_.

9  {
10  Online_ = ps.getParameter<bool>("online");
11  mergeRuns_ = ps.getParameter<bool>("mergeRuns");
12  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup");
13  debug_ = ps.getUntrackedParameter<int>("debug",0);
14  prefixME_ = ps.getUntrackedParameter<std::string>("subSystemFolder", "Hcal/"); // Hcal
15  if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
16  prefixME_.append("/");
17  subdir_ = ps.getUntrackedParameter<std::string>("TaskFolder", "RawDataMonitor_Hcal/"); // RawDataMonitor_Hcal
18  if (subdir_.size()>0 && subdir_.substr(subdir_.size()-1,subdir_.size())!="/")
19  subdir_.append("/");
20  subdir_=prefixME_+subdir_;
21  AllowedCalibTypes_ = ps.getUntrackedParameter<std::vector<int> > ("AllowedCalibTypes");
22  skipOutOfOrderLS_ = ps.getUntrackedParameter<bool>("skipOutOfOrderLS",true);
23  NLumiBlocks_ = ps.getUntrackedParameter<int>("NLumiBlocks",-1);
24  makeDiagnostics_ = ps.getUntrackedParameter<bool>("makeDiagnostics",false);
25 
26  FEDRawDataCollection_ = ps.getUntrackedParameter<edm::InputTag>("FEDRawDataCollection");
28 
29  excludeHORing2_ = ps.getUntrackedParameter<bool>("excludeHORing2",false);
30 
31  //inputLabelReport_ = ps.getUntrackedParameter<edm::InputTag>("UnpackerReport");
32 
33  // Initialize an array of MonitorElements
35  meChann_DataIntegrityCheck_[1] =meCh_DataIntegrityFED01_;
36  meChann_DataIntegrityCheck_[2] =meCh_DataIntegrityFED02_;
37  meChann_DataIntegrityCheck_[3] =meCh_DataIntegrityFED03_;
38  meChann_DataIntegrityCheck_[4] =meCh_DataIntegrityFED04_;
39  meChann_DataIntegrityCheck_[5] =meCh_DataIntegrityFED05_;
40  meChann_DataIntegrityCheck_[6] =meCh_DataIntegrityFED06_;
41  meChann_DataIntegrityCheck_[7] =meCh_DataIntegrityFED07_;
42  meChann_DataIntegrityCheck_[8] =meCh_DataIntegrityFED08_;
43  meChann_DataIntegrityCheck_[9] =meCh_DataIntegrityFED09_;
44  meChann_DataIntegrityCheck_[10]=meCh_DataIntegrityFED10_;
45  meChann_DataIntegrityCheck_[11]=meCh_DataIntegrityFED11_;
46  meChann_DataIntegrityCheck_[12]=meCh_DataIntegrityFED12_;
47  meChann_DataIntegrityCheck_[13]=meCh_DataIntegrityFED13_;
48  meChann_DataIntegrityCheck_[14]=meCh_DataIntegrityFED14_;
49  meChann_DataIntegrityCheck_[15]=meCh_DataIntegrityFED15_;
50  meChann_DataIntegrityCheck_[16]=meCh_DataIntegrityFED16_;
51  meChann_DataIntegrityCheck_[17]=meCh_DataIntegrityFED17_;
52  meChann_DataIntegrityCheck_[18]=meCh_DataIntegrityFED18_;
53  meChann_DataIntegrityCheck_[19]=meCh_DataIntegrityFED19_;
54  meChann_DataIntegrityCheck_[20]=meCh_DataIntegrityFED20_;
55  meChann_DataIntegrityCheck_[21]=meCh_DataIntegrityFED21_;
56  meChann_DataIntegrityCheck_[22]=meCh_DataIntegrityFED22_;
57  meChann_DataIntegrityCheck_[23]=meCh_DataIntegrityFED23_;
58  meChann_DataIntegrityCheck_[24]=meCh_DataIntegrityFED24_;
59  meChann_DataIntegrityCheck_[25]=meCh_DataIntegrityFED25_;
60  meChann_DataIntegrityCheck_[26]=meCh_DataIntegrityFED26_;
61  meChann_DataIntegrityCheck_[27]=meCh_DataIntegrityFED27_;
62  meChann_DataIntegrityCheck_[28]=meCh_DataIntegrityFED28_;
63  meChann_DataIntegrityCheck_[29]=meCh_DataIntegrityFED29_;
64  meChann_DataIntegrityCheck_[30]=meCh_DataIntegrityFED30_;
65  meChann_DataIntegrityCheck_[31]=meCh_DataIntegrityFED31_;
66 
67  // register for data access
68  tok_raw_ = consumes<FEDRawDataCollection>(FEDRawDataCollection_);
69  tok_unpack_ = consumes<HcalUnpackerReport>(digiLabel_);
70 
71  this->reset();
72 } // HcalRawDataMonitor::HcalRawDataMonitor()
MonitorElement * meCh_DataIntegrityFED04_
MonitorElement * meCh_DataIntegrityFED27_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meCh_DataIntegrityFED23_
MonitorElement * meCh_DataIntegrityFED25_
MonitorElement * meCh_DataIntegrityFED13_
MonitorElement * meCh_DataIntegrityFED02_
MonitorElement * meCh_DataIntegrityFED05_
MonitorElement * meCh_DataIntegrityFED09_
std::vector< int > AllowedCalibTypes_
MonitorElement * meCh_DataIntegrityFED03_
MonitorElement * meCh_DataIntegrityFED14_
edm::InputTag FEDRawDataCollection_
MonitorElement * meCh_DataIntegrityFED24_
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
MonitorElement * meCh_DataIntegrityFED06_
MonitorElement * meChann_DataIntegrityCheck_[NUMDCCS]
MonitorElement * meCh_DataIntegrityFED11_
MonitorElement * meCh_DataIntegrityFED17_
MonitorElement * meCh_DataIntegrityFED30_
MonitorElement * meCh_DataIntegrityFED12_
MonitorElement * meCh_DataIntegrityFED10_
MonitorElement * meCh_DataIntegrityFED19_
MonitorElement * meCh_DataIntegrityFED08_
edm::EDGetTokenT< HcalUnpackerReport > tok_unpack_
MonitorElement * meCh_DataIntegrityFED29_
MonitorElement * meCh_DataIntegrityFED00_
MonitorElement * meCh_DataIntegrityFED26_
MonitorElement * meCh_DataIntegrityFED16_
MonitorElement * meCh_DataIntegrityFED07_
MonitorElement * meCh_DataIntegrityFED28_
MonitorElement * meCh_DataIntegrityFED20_
MonitorElement * meCh_DataIntegrityFED01_
MonitorElement * meCh_DataIntegrityFED15_
MonitorElement * meCh_DataIntegrityFED31_
edm::InputTag digiLabel_
MonitorElement * meCh_DataIntegrityFED21_
MonitorElement * meCh_DataIntegrityFED18_
MonitorElement * meCh_DataIntegrityFED22_
HcalRawDataMonitor::HcalRawDataMonitor ( )
inline

Definition at line 36 of file HcalRawDataMonitor.h.

36 {};
HcalRawDataMonitor::~HcalRawDataMonitor ( )

Definition at line 75 of file HcalRawDataMonitor.cc.

75 {}

Member Function Documentation

void HcalRawDataMonitor::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

NumBadHE+= problemcount[eta][phi][d];

Reimplemented from HcalBaseDQMonitor.

Definition at line 528 of file HcalRawDataMonitor.cc.

References funct::abs(), HcalBaseDQMonitor::analyze(), HcalObjRepresent::CalcIeta(), gather_cfg::cout, HcalBaseDQMonitor::debug_, DEPTHBINS, digiLabel_, eta(), ETABINS, FEDRawDataCollection_, edm::Event::getByToken(), HcalBarrel, HcalEmpty, HcalEndcap, HcalForward, HcalOuter, HcalBaseDQMonitor::ievt_, HcalBaseDQMonitor::IsAllowedCalibType(), isHB(), isHE(), isHF(), isHO(), HcalBaseDQMonitor::LumiInOrder(), edm::EventBase::luminosityBlock(), NumBadHB, NumBadHE, NumBadHF, NumBadHFLUMI, NumBadHO, NumBadHO0, NumBadHO12, phi, PHIBINS, problemcount, processEvent(), zeeHLT_cff::report, tok_raw_, tok_unpack_, and uniqcounter.

528  {
529  if (!IsAllowedCalibType()) return;
530  if (LumiInOrder(e.luminosityBlock())==false) return;
531 
532  HcalBaseDQMonitor::analyze(e,s); // base class increments ievt_, etc. counters
533 
534  // try to get die Data
536  if (!(e.getByToken(tok_raw_,rawraw)))
537  // if (!(e.getByType(rawraw)))
538  {
539  edm::LogWarning("HcalRawDataMonitor")<<" raw data with label "<<FEDRawDataCollection_ <<" not available";
540  return;
541  }
543  if (!(e.getByToken(tok_unpack_,report)))
544  {
545  edm::LogWarning("HcalRawDataMonitor")<<" Unpacker Report "<<digiLabel_<<" not available";
546  return;
547  }
548 
549  // all objects grabbed; event is good
550  if (debug_>1) std::cout <<"\t<HcalRawDataMonitor::analyze> Processing good event! event # = "<<ievt_<<std::endl;
551 
552  // Raw Data collection was grabbed successfully; process the Event
553  processEvent(*rawraw, *report);
554 
555  //Loop over all cells, tallying problem counts before resetting
556  //Extract the subdetector region given the location
557  for (int d=0; d<DEPTHBINS; d++) {
558  for (int eta=0; eta<ETABINS; eta++) {
559  int ieta=CalcIeta(eta,d+1);
560  if (ieta==-9999) continue;
561  for (int phi=0; phi<PHIBINS; phi++){
562  if (problemcount[eta][phi][d]) {
563  // std::cout<<" "<<eta<<","<<phi<<","<<d<<" count:"<<problemcount[eta][phi][d]<<std::endl;
564  HcalSubdetector subdet=HcalEmpty;
565  if (isHB(eta,d+1))subdet=HcalBarrel;
566  else if (isHE(eta,d+1)) subdet=HcalEndcap;
567  else if (isHF(eta,d+1)) subdet=HcalForward;
568  else if (isHO(eta,d+1)) subdet=HcalOuter;
569  if (subdet!=HcalEmpty){
570  if (subdet==HcalBarrel) {if(uniqcounter[eta][phi][d]<1) NumBadHB+= problemcount[eta][phi][d]; uniqcounter[eta][phi][d]++; }
571  else if (subdet==HcalEndcap) {if(uniqcounter[eta][phi][d]<1) NumBadHE+= problemcount[eta][phi][d]; uniqcounter[eta][phi][d]++; }
573  else if (subdet==HcalOuter)
574  {
575  if(uniqcounter[eta][phi][d]<1)
576  NumBadHO += problemcount[eta][phi][d];
577  uniqcounter[eta][phi][d]++;
578  if (abs(ieta)<5) NumBadHO0+= problemcount[eta][phi][d];
579  else NumBadHO12+= problemcount[eta][phi][d];
580  }
581  else if (subdet==HcalForward)
582  {
583  if(uniqcounter[eta][phi][d]<1)
584  NumBadHF+= problemcount[eta][phi][d];
585  uniqcounter[eta][phi][d]++;
586  if (d==1 && (abs(ieta)==33 || abs(ieta)==34))
588  else if (d==2 && (abs(ieta)==35 || abs(ieta)==36))
590  }
591  }
592  problemcount[eta][phi][d]=0;
593  }
594  }
595  }
596  }
597 }
bool isHO(int etabin, int depth)
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
void processEvent(const FEDRawDataCollection &rawraw, const HcalUnpackerReport &report)
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
bool isHE(int etabin, int depth)
uint64_t problemcount[ETABINS][PHIBINS][DEPTHBINS]
T eta() const
#define DEPTHBINS
tuple report
Definition: zeeHLT_cff.py:9
edm::InputTag FEDRawDataCollection_
int CalcIeta(int subdet, int eta, int depth)
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
HcalSubdetector
Definition: HcalAssistant.h:31
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool isHB(int etabin, int depth)
bool isHF(int etabin, int depth)
edm::EDGetTokenT< HcalUnpackerReport > tok_unpack_
#define ETABINS
#define PHIBINS
tuple cout
Definition: gather_cfg.py:121
uint64_t uniqcounter[ETABINS][PHIBINS][DEPTHBINS]
edm::InputTag digiLabel_
Definition: DDAxes.h:10
void HcalRawDataMonitor::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 172 of file HcalRawDataMonitor.cc.

References HcalBaseDQMonitor::beginLuminosityBlock(), HcalBaseDQMonitor::LumiInOrder(), edm::LuminosityBlockBase::luminosityBlock(), HcalBaseDQMonitor::ProblemsCurrentLB, and MonitorElement::Reset().

173  {
174  if (LumiInOrder(lumiSeg.luminosityBlock())==false) return;
176  //zeroCounters(); // zero hot cell counters at the start of each luminosity block
178  return;
179 }
bool LumiInOrder(int lumisec)
MonitorElement * ProblemsCurrentLB
LuminosityBlockNumber_t luminosityBlock() const
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
void Reset(void)
reset ME (ie. contents, errors, etc)
void HcalRawDataMonitor::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 131 of file HcalRawDataMonitor.cc.

References HcalElectronicsMap::allElectronicsIdPrecision(), HcalBaseDQMonitor::beginRun(), DetId::det(), edm::EventSetup::get(), hashup(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HcalElectronicsMap::lookup(), DetId::null(), readoutMap_, stashHDI(), and DetId::subdetId().

131  {
134  c.get<HcalDbRecord>().get( pSetup );
135 
136  readoutMap_=pSetup->getHcalMapping();
137  DetId detid_;
138  HcalDetId hcaldetid_;
139 
140  // Build a map of readout hardware unit to calorimeter channel
141  std::vector <HcalElectronicsId> AllElIds = readoutMap_->allElectronicsIdPrecision();
142  uint32_t itsdcc =0;
143  uint32_t itsspigot =0;
144  uint32_t itshtrchan=0;
145 
146  // by looping over all precision (non-trigger) items.
147  for (std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin();
148  eid != AllElIds.end();
149  eid++) {
150 
151  //Get the HcalDetId from the HcalElectronicsId
152  detid_ = readoutMap_->lookup(*eid);
153  // NULL if illegal; ignore
154  if (!detid_.null()) {
155  if (detid_.det()!=4) continue; //not Hcal
156  if (detid_.subdetId()!=HcalBarrel &&
157  detid_.subdetId()!=HcalEndcap &&
158  detid_.subdetId()!=HcalOuter &&
159  detid_.subdetId()!=HcalForward) continue;
160 
161  itsdcc =(uint32_t) eid->dccid();
162  itsspigot =(uint32_t) eid->spigot();
163  itshtrchan=(uint32_t) eid->htrChanId();
164  hcaldetid_ = HcalDetId(detid_);
165  stashHDI(hashup(itsdcc,itsspigot,itshtrchan),
166  hcaldetid_);
167  } // if (!detid_.null())
168  }
169 }
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
void stashHDI(int thehash, HcalDetId thehcaldetid)
virtual void beginRun(const edm::Run &run, const edm::EventSetup &c)
const HcalElectronicsMap * readoutMap_
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
Definition: DetId.h:18
const T & get() const
Definition: EventSetup.h:55
bool null() const
is this a null id ?
Definition: DetId.h:45
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
int hashup(uint32_t d=0, uint32_t s=0, uint32_t c=1)
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
void HcalRawDataMonitor::endJob ( void  )
protectedvirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 1299 of file HcalRawDataMonitor.cc.

References HcalBaseDQMonitor::cleanup(), gather_cfg::cout, HcalBaseDQMonitor::debug_, and HcalBaseDQMonitor::enableCleanup_.

1299  {
1300  if (debug_>0) std::cout <<"HcalRawDataMonitor::endJob()"<<std::endl;
1301  if (enableCleanup_) cleanup(); // when do we force cleanup?
1302 }
virtual void cleanup(void)
tuple cout
Definition: gather_cfg.py:121
void HcalRawDataMonitor::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 1257 of file HcalRawDataMonitor.cc.

References DEPTHBINS, eta(), ETABINS, MonitorElement::Fill(), HcalBaseDQMonitor::levt_, edm::LuminosityBlockBase::luminosityBlock(), NumBadHB, NumBadHE, NumBadHF, NumBadHFLUMI, NumBadHO, NumBadHO0, NumBadHO12, phi, PHIBINS, HcalBaseDQMonitor::ProblemsCurrentLB, HcalBaseDQMonitor::ProblemsVsLB, HcalBaseDQMonitor::ProblemsVsLB_HB, HcalBaseDQMonitor::ProblemsVsLB_HBHEHF, HcalBaseDQMonitor::ProblemsVsLB_HE, HcalBaseDQMonitor::ProblemsVsLB_HF, HcalBaseDQMonitor::ProblemsVsLB_HO, MonitorElement::Reset(), MonitorElement::setBinContent(), uniqcounter, and UpdateMEs().

1258  {
1259 
1260 
1267 
1268  // Reset current LS histogram, if it exists
1269  if (ProblemsCurrentLB)
1271  if (ProblemsCurrentLB)
1272  {
1273 
1274  ProblemsCurrentLB->setBinContent(0,0, levt_); // underflow bin contains number of events
1282 
1283  }
1284 
1285  for (int d=0; d<DEPTHBINS; d++) {
1286  for (int eta=0; eta<ETABINS; eta++) {
1287  for (int phi=0; phi<PHIBINS; phi++){
1288  uniqcounter[eta][phi][d] = 0.0;
1289  }
1290  }
1291  }
1292 
1293  UpdateMEs();
1294 }
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * ProblemsCurrentLB
MonitorElement * ProblemsVsLB_HF
T eta() const
void Fill(long long x)
LuminosityBlockNumber_t luminosityBlock() const
#define DEPTHBINS
MonitorElement * ProblemsVsLB_HBHEHF
MonitorElement * ProblemsVsLB_HB
#define ETABINS
MonitorElement * ProblemsVsLB_HE
#define PHIBINS
MonitorElement * ProblemsVsLB_HO
MonitorElement * ProblemsVsLB
uint64_t uniqcounter[ETABINS][PHIBINS][DEPTHBINS]
void Reset(void)
reset ME (ie. contents, errors, etc)
Definition: DDAxes.h:10
void HcalRawDataMonitor::endRun ( const edm::Run run,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 1296 of file HcalRawDataMonitor.cc.

1296 {}
HcalDetId HcalRawDataMonitor::HashToHDI ( int  thehash)
inlineprotected

Definition at line 69 of file HcalRawDataMonitor.h.

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

Referenced by mapChannproblem().

69  {
70  return ( ( (thehash<0) || (thehash>(NUMDCCS*NUMSPIGS*HTRCHANMAX)) )
72  :(hashedHcalDetId_[thehash]));
73  };
static const HcalDetId Undefined
Definition: HcalDetId.h:50
#define NUMDCCS
HcalDetId hashedHcalDetId_[NUMDCCS *NUMSPIGS *HTRCHANMAX]
#define NUMSPIGS
#define HTRCHANMAX
int HcalRawDataMonitor::hashup ( uint32_t  d = 0,
uint32_t  s = 0,
uint32_t  c = 1 
)
inlineprotected

Definition at line 65 of file HcalRawDataMonitor.h.

References trackerHits::c, HTRCHANMAX, NUMSPIGS, and alignCSCRings::s.

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

65  {
66  return (int) ( (d*NUMSPIGS*HTRCHANMAX)+(s*HTRCHANMAX)+(c)); }
#define NUMSPIGS
#define HTRCHANMAX
void HcalRawDataMonitor::HTRPrint ( const HcalHTRData htr,
int  prtlvl 
)
private

Definition at line 1364 of file HcalRawDataMonitor.cc.

References HcalHTRData::getBunchNumber(), HcalHTRData::getErrorsWord(), HcalHTRData::getFib1OrbMsgBCN(), HcalHTRData::getFib2OrbMsgBCN(), HcalHTRData::getFib3OrbMsgBCN(), HcalHTRData::getFib4OrbMsgBCN(), HcalHTRData::getFib5OrbMsgBCN(), HcalHTRData::getFib6OrbMsgBCN(), HcalHTRData::getFib7OrbMsgBCN(), HcalHTRData::getFib8OrbMsgBCN(), HcalHTRData::getL1ANumber(), HcalHTRData::htrSlot(), HcalHTRData::htrTopBottom(), and HcalHTRData::readoutVMECrateId().

Referenced by unpack().

1364  {
1365  if (prtlvl == 1){
1366  int cratenum = htr.readoutVMECrateId();
1367  float slotnum = htr.htrSlot() + 0.5*htr.htrTopBottom();
1368  printf("Crate,Slot,ErrWord,Evt#,BCN: %3i %4.1f %6X %7i %4X \n", cratenum,slotnum,htr.getErrorsWord(),htr.getL1ANumber(),htr.getBunchNumber());
1369  // printf(" DLLunlk,TTCrdy:%2i %2i \n",htr.getDLLunlock(),htr.getTTCready());
1370  }
1371  // This one needs new version of HcalHTRData.h to activate
1372  else if (prtlvl == 2){
1373  int cratenum = htr.readoutVMECrateId();
1374  float slotnum = htr.htrSlot() + 0.5*htr.htrTopBottom();
1375  printf("Crate, Slot:%3i %4.1f \n", cratenum,slotnum);
1376  // printf(" Ext Hdr: %4X %4X %4X %4X %4X %4X %4X %4X \n",htr.getExtHdr1(),htr.getExtHdr2(),htr.getExtHdr3(),htr.getExtHdr4(),htr.getExtHdr5(),htr.getExtHdr6(),htr.getExtHdr7(),htr.getExtHdr8());
1377  }
1378 
1379  else if (prtlvl == 3){
1380  int cratenum = htr.readoutVMECrateId();
1381  float slotnum = htr.htrSlot() + 0.5*htr.htrTopBottom();
1382  printf("Crate, Slot:%3i %4.1f", cratenum,slotnum);
1383  printf(" FibOrbMsgBCNs: %4X %4X %4X %4X %4X %4X %4X %4X \n",htr.getFib1OrbMsgBCN(),htr.getFib2OrbMsgBCN(),htr.getFib3OrbMsgBCN(),htr.getFib4OrbMsgBCN(),htr.getFib5OrbMsgBCN(),htr.getFib6OrbMsgBCN(),htr.getFib7OrbMsgBCN(),htr.getFib8OrbMsgBCN());
1384  }
1385 
1386  return;
1387 }
unsigned int getFib6OrbMsgBCN() const
Definition: HcalHTRData.h:201
unsigned int getFib1OrbMsgBCN() const
Get the BCN of the Fiber Orbit Messages.
Definition: HcalHTRData.h:182
unsigned int htrTopBottom() const
HcalElectronicsId-style HTR top/bottom (1=top/0=bottom)
Definition: HcalHTRData.cc:342
unsigned int getFib8OrbMsgBCN() const
Definition: HcalHTRData.h:209
unsigned int htrSlot() const
HcalElectronicsId-style HTR slot.
Definition: HcalHTRData.cc:338
unsigned int getFib7OrbMsgBCN() const
Definition: HcalHTRData.h:205
unsigned int getFib3OrbMsgBCN() const
Definition: HcalHTRData.h:189
unsigned int getFib5OrbMsgBCN() const
Definition: HcalHTRData.h:197
unsigned int getErrorsWord() const
Get the errors word.
Definition: HcalHTRData.h:156
unsigned int readoutVMECrateId() const
HcalElectronicsId-style VME crate number.
Definition: HcalHTRData.cc:346
unsigned int getFib4OrbMsgBCN() const
Definition: HcalHTRData.h:193
unsigned int getBunchNumber() const
Get the HTR bunch number.
Definition: HcalHTRData.h:114
unsigned int getFib2OrbMsgBCN() const
Definition: HcalHTRData.h:185
unsigned int getL1ANumber() const
Get the HTR event number.
Definition: HcalHTRData.h:110
void HcalRawDataMonitor::label_xChanns ( MonitorElement me_ptr,
int  xbins 
)
private

Definition at line 1314 of file HcalRawDataMonitor.cc.

References HcalHTRData::CHANNELS_PER_SPIGOT, diffTwoXMLs::label, and MonitorElement::setBinLabel().

Referenced by setup().

1314  {
1315  char label[32];
1316  for (int ch=0; ch<HcalHTRData::CHANNELS_PER_SPIGOT; ch++) {
1317  snprintf(label, 32, "Ch %02d", ch+1);
1318  me_ptr->setBinLabel((2+(ch*xbins)), label, 1); //margin of 3 at low value
1319  }
1320 }
const double xbins[]
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
static const int CHANNELS_PER_SPIGOT
Definition: HcalHTRData.h:18
void HcalRawDataMonitor::label_xFEDs ( MonitorElement me_ptr,
int  xbins 
)
private

Definition at line 1323 of file HcalRawDataMonitor.cc.

References diffTwoXMLs::label, NUMDCCS, and MonitorElement::setBinLabel().

Referenced by setup().

1323  {
1324  char label[32];
1325  for (int thfed=0; thfed<NUMDCCS; thfed++) {
1326  snprintf(label, 32, "%03d", thfed+700);
1327  me_ptr->setBinLabel((2+(thfed*xbins)), label, 1); //margin of 1 at low value
1328  }
1329 }
const double xbins[]
#define NUMDCCS
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
void HcalRawDataMonitor::label_ySpigots ( MonitorElement me_ptr,
int  ybins 
)
private

Definition at line 1305 of file HcalRawDataMonitor.cc.

References diffTwoXMLs::label, MonitorElement::setBinLabel(), and HcalDCCHeader::SPIGOT_COUNT.

Referenced by setup().

1305  {
1306  char label[32];
1307  for (int spig=0; spig<HcalDCCHeader::SPIGOT_COUNT; spig++) {
1308  snprintf(label, 32, "Spgt %02d", spig);
1309  me_ptr->setBinLabel((2+(spig*ybins)), label, 2); //margin of 1 at low value
1310  }
1311 }
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
static const int SPIGOT_COUNT
Definition: HcalDCCHeader.h:19
void HcalRawDataMonitor::labelHTRBits ( MonitorElement mePlot,
unsigned int  axisType 
)
private

Definition at line 1331 of file HcalRawDataMonitor.cc.

Referenced by setup().

1331  {
1332 
1333  if (axisType !=1 && axisType != 2) return;
1334 
1335  mePlot -> setBinLabel(1,"Overflow Warn",axisType);
1336  mePlot -> setBinLabel(2,"Buffer Busy",axisType);
1337  mePlot -> setBinLabel(3,"Empty Event",axisType);
1338  mePlot -> setBinLabel(4,"Rejected L1A",axisType);
1339  mePlot -> setBinLabel(5,"Invalid Stream",axisType);
1340  mePlot -> setBinLabel(6,"Latency Warn",axisType);
1341  mePlot -> setBinLabel(7,"OptDat Err",axisType);
1342  mePlot -> setBinLabel(8,"Clock Err",axisType);
1343  mePlot -> setBinLabel(9,"Bunch Err",axisType);
1344  mePlot -> setBinLabel(10,"b9",axisType);
1345  mePlot -> setBinLabel(11,"b10",axisType);
1346  mePlot -> setBinLabel(12,"b11",axisType);
1347  mePlot -> setBinLabel(13,"Test Mode",axisType);
1348  mePlot -> setBinLabel(14,"Histo Mode",axisType);
1349  mePlot -> setBinLabel(15,"Calib Trig",axisType);
1350  mePlot -> setBinLabel(16,"Bit15 Err",axisType);
1351 
1352  return;
1353 }
void HcalRawDataMonitor::mapChannproblem ( int  dcc,
int  spigot,
int  htrchan 
)
protected

Definition at line 1524 of file HcalRawDataMonitor.cc.

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

Referenced by unpack().

1524  {
1525  int myeta = 0;
1526  int myphi =-1;
1527  int mydepth = 0;
1528  HcalDetId HDI;
1529  //Light up the affected cell.
1530  int i=hashup(dcc,spigot,htrchan);
1531  HDI = HashToHDI(i);
1532  if (HDI==HcalDetId::Undefined) {
1533  return; // Do nothing at all, instead.
1534  }
1535  mydepth = HDI.depth();
1536  myphi = HDI.iphi();
1537  myeta = CalcEtaBin(HDI.subdet(),
1538  HDI.ieta(),
1539  mydepth);
1540  //Protect against indexing off array
1541  if (myeta>=0 && myeta<85 &&
1542  (myphi-1)>=0 && (myphi-1)<72 &&
1543  (mydepth-1)>=0 && (mydepth-1)<4){
1544  problemfound[myeta][myphi-1][mydepth-1] = true;
1545 
1546  //exlcude the decommissioned HO ring2, except SiPMs
1547  if(mydepth==4 && excludeHORing2_==true)
1548  if (abs(HDI.ieta())>=11 && abs(HDI.ieta())<=15 && !isSiPM(HDI.ieta(),HDI.iphi(),mydepth))
1549  problemfound[myeta][myphi-1][mydepth-1] = false;
1550 
1551  if (debug_>0)
1552  std::cout<<" mapDCCproblem found error! "<<HDI.subdet()<<"("<<HDI.ieta()<<", "<<HDI.iphi()<<", "<<HDI.depth()<<")"<<std::endl;
1553  }
1554 } // void HcalRawDataMonitor::mapChannproblem(...)
static const HcalDetId Undefined
Definition: HcalDetId.h:50
int i
Definition: DBlmapReader.cc:9
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:30
bool isSiPM(int ieta, int iphi, int depth)
int depth() const
get the tower depth
Definition: HcalDetId.h:40
int ieta() const
get the cell ieta
Definition: HcalDetId.h:36
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool problemfound[ETABINS][PHIBINS][DEPTHBINS]
int iphi() const
get the cell iphi
Definition: HcalDetId.h:38
int CalcEtaBin(int subdet, int ieta, int depth)
tuple cout
Definition: gather_cfg.py:121
HcalDetId HashToHDI(int thehash)
int hashup(uint32_t d=0, uint32_t s=0, uint32_t c=1)
void HcalRawDataMonitor::mapDCCproblem ( int  dcc)
protected

Definition at line 1455 of file HcalRawDataMonitor.cc.

References funct::abs(), CalcEtaBin(), gather_cfg::cout, HcalBaseDQMonitor::debug_, HcalDetId::depth(), excludeHORing2_, hashedHcalDetId_, hashup(), HTRCHANMAX, i, HcalDetId::ieta(), HcalDetId::iphi(), isSiPM(), NUMSPIGS, problemfound, HcalDetId::subdet(), and HcalDetId::Undefined.

Referenced by unpack().

1455  {
1456  int myeta = 0;
1457  int myphi =-1;
1458  int mydepth = 0;
1459  HcalDetId HDI;
1460  //Light up all affected cells.
1461  for (int i=hashup(dcc);
1462  i<hashup(dcc)+(NUMSPIGS*HTRCHANMAX);
1463  i++) {
1464  HDI = hashedHcalDetId_[i];
1465  if (HDI==HcalDetId::Undefined)
1466  continue;
1467  mydepth = HDI.depth();
1468  myphi = HDI.iphi();
1469  myeta = CalcEtaBin(HDI.subdet(),
1470  HDI.ieta(),
1471  mydepth);
1472  //Protect against indexing off array
1473  if (myeta>=0 && myeta<85 &&
1474  (myphi-1)>=0 && (myphi-1)<72 &&
1475  (mydepth-1)>=0 && (mydepth-1)<4){
1476  problemfound[myeta][myphi-1][mydepth-1] = true;
1477 
1478  //exlcude the decommissioned HO ring2, except SiPMs
1479  if(mydepth==4 && excludeHORing2_==true)
1480  if (abs(HDI.ieta())>=11 && abs(HDI.ieta())<=15 && !isSiPM(HDI.ieta(),HDI.iphi(),mydepth))
1481  problemfound[myeta][myphi-1][mydepth-1] = false;
1482 
1483  if (debug_>0)
1484  std::cout<<" mapDCCproblem found error! "<<HDI.subdet()<<"("<<HDI.ieta()<<", "<<HDI.iphi()<<", "<<HDI.depth()<<")"<<std::endl;
1485  }
1486  }
1487 }
static const HcalDetId Undefined
Definition: HcalDetId.h:50
int i
Definition: DBlmapReader.cc:9
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:30
#define HTRCHANMAX
HcalDetId hashedHcalDetId_[NUMDCCS *NUMSPIGS *HTRCHANMAX]
#define NUMSPIGS
bool isSiPM(int ieta, int iphi, int depth)
int depth() const
get the tower depth
Definition: HcalDetId.h:40
int ieta() const
get the cell ieta
Definition: HcalDetId.h:36
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool problemfound[ETABINS][PHIBINS][DEPTHBINS]
int iphi() const
get the cell iphi
Definition: HcalDetId.h:38
int CalcEtaBin(int subdet, int ieta, int depth)
tuple cout
Definition: gather_cfg.py:121
int hashup(uint32_t d=0, uint32_t s=0, uint32_t c=1)
void HcalRawDataMonitor::mapHTRproblem ( int  dcc,
int  spigot 
)
protected

Definition at line 1488 of file HcalRawDataMonitor.cc.

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

Referenced by unpack().

1488  {
1489  int myeta = 0;
1490  int myphi =-1;
1491  int mydepth = 0;
1492  HcalDetId HDI;
1493  //Light up all affected cells.
1494  for (int i=hashup(dcc,spigot);
1495  i<hashup(dcc,spigot)+(HTRCHANMAX); //nice, linear hash....
1496  i++) {
1497  HDI = hashedHcalDetId_[i];
1498  if (HDI==HcalDetId::Undefined) {
1499  continue;
1500  }
1501  mydepth = HDI.depth();
1502  myphi = HDI.iphi();
1503  myeta = CalcEtaBin(HDI.subdet(),
1504  HDI.ieta(),
1505  mydepth);
1506  //Protect against indexing off array
1507  if (myeta>=0 && myeta<85 &&
1508  (myphi-1)>=0 && (myphi-1)<72 &&
1509  (mydepth-1)>=0 && (mydepth-1)<4){
1510  problemfound[myeta][myphi-1][mydepth-1] = true;
1511 
1512  //exlcude the decommissioned HO ring2, except SiPMs
1513  if(mydepth==4 && excludeHORing2_==true)
1514  if (abs(HDI.ieta())>=11 && abs(HDI.ieta())<=15 && !isSiPM(HDI.ieta(),HDI.iphi(),mydepth))
1515  problemfound[myeta][myphi-1][mydepth-1] = false;
1516 
1517  if (debug_>0)
1518  std::cout<<" mapDCCproblem found error! "<<HDI.subdet()<<"("<<HDI.ieta()<<", "<<HDI.iphi()<<", "<<HDI.depth()<<")"<<std::endl;
1519  }
1520 
1521  }
1522 } // void HcalRawDataMonitor::mapHTRproblem(...)
static const HcalDetId Undefined
Definition: HcalDetId.h:50
int i
Definition: DBlmapReader.cc:9
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:30
#define HTRCHANMAX
HcalDetId hashedHcalDetId_[NUMDCCS *NUMSPIGS *HTRCHANMAX]
bool isSiPM(int ieta, int iphi, int depth)
int depth() const
get the tower depth
Definition: HcalDetId.h:40
int ieta() const
get the cell ieta
Definition: HcalDetId.h:36
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool problemfound[ETABINS][PHIBINS][DEPTHBINS]
int iphi() const
get the cell iphi
Definition: HcalDetId.h:38
int CalcEtaBin(int subdet, int ieta, int depth)
tuple cout
Definition: gather_cfg.py:121
int hashup(uint32_t d=0, uint32_t s=0, uint32_t c=1)
void HcalRawDataMonitor::processEvent ( const FEDRawDataCollection rawraw,
const HcalUnpackerReport report 
)
protected

Definition at line 599 of file HcalRawDataMonitor.cc.

References HcalBaseDQMonitor::dbe_, HcalBaseDQMonitor::debug_, DEPTHBINS, ETABINS, f, FEDRawDataCollection::FEDData(), i, FEDNumbering::MAXHCALFEDID, meChann_DataIntegrityCheck_, meChannSumm_DataIntegrityCheck_, meDataFlowInd_, meHalfHTRDataCorruptionIndicators_, meLRBDataCorruptionIndicators_, FEDNumbering::MINHCALFEDID, NUMDCCS, PHIBINS, problemcount, problemfound, FEDRawData::size(), unpack(), update, MonitorElement::update(), x, detailsBasic3DVector::y, and detailsBasic3DVector::z.

Referenced by analyze().

600  {
601  if(!dbe_) {
602  if (debug_>1)
603  printf("HcalRawDataMonitor::processEvent DQMStore not instantiated!\n");
604  return;}
605 
606  // Fill event counters (underflow bins of histograms)
610  for (int f=0; f<NUMDCCS; f++)
613 
614  // Loop over all FEDs reporting the event, unpacking if good.
616  const FEDRawData& fed = rawraw.FEDData(i);
617  if (fed.size()<12) continue; //At least the size of headers and trailers of a DCC.
618  unpack(fed); //Interpret data, fill histograms, everything.
619  }
620 
621  //increment problemcount[] where problemfound[], and clear problemfound[]
622  for (int x=0; x<ETABINS; x++)
623  for (int y=0; y<PHIBINS; y++)
624  for (int z=0; z<DEPTHBINS; z++)
625  if (problemfound[x][y][z]) {
626  problemcount[x][y][z]++;
627  problemfound[x][y][z]=false;
628  }
629  return;
630 } //void HcalRawDataMonitor::processEvent()
int i
Definition: DBlmapReader.cc:9
#define NUMDCCS
MonitorElement * meChannSumm_DataIntegrityCheck_
void update(void)
Mark the object updated.
uint64_t problemcount[ETABINS][PHIBINS][DEPTHBINS]
float float float z
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
MonitorElement * meDataFlowInd_
#define DEPTHBINS
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void unpack(const FEDRawData &raw)
MonitorElement * meChann_DataIntegrityCheck_[NUMDCCS]
double f[11][100]
bool problemfound[ETABINS][PHIBINS][DEPTHBINS]
MonitorElement * meLRBDataCorruptionIndicators_
#define ETABINS
#define update(a, b)
#define PHIBINS
Definition: DDAxes.h:10
MonitorElement * meHalfHTRDataCorruptionIndicators_
void HcalRawDataMonitor::reset ( void  )
protectedvirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 78 of file HcalRawDataMonitor.cc.

References Chann_DataIntegrityCheck_, ChannSumm_DataIntegrityCheck_, DataFlowInd_, DEPTHBINS, eta(), ETABINS, f, HalfHTRDataCorruptionIndicators_, hashedHcalDetId_, HTRCHANMAX, i, LRBDataCorruptionIndicators_, NumBadHB, NumBadHE, NumBadHF, NumBadHFLUMI, NumBadHO, NumBadHO0, NumBadHO12, NUMDCCS, NUMSPIGS, phi, PHIBINS, problemcount, problemfound, alignCSCRings::s, THREE_FED, THREE_SPG, TWO___FED, TWO__SPGT, TWO_CHANN, HcalDetId::Undefined, uniqcounter, UScount, x, and detailsBasic3DVector::y.

Referenced by HcalRawDataMonitor().

79 {
80 
81  for (int f=0; f<NUMDCCS; f++) {
82  for (int s=0; s<15; s++) {
83  UScount[f][s]=0;}}
84 
85  for (int x=0; x<THREE_FED; x++)
86  for (int y=0; y<THREE_SPG; y++)
88 
89  for (int x=0; x<THREE_FED; x++)
90  for (int y=0; y<THREE_SPG; y++)
92 
93  for (int x=0; x<TWO___FED; x++)
94  for (int y=0; y<TWO__SPGT; y++)
96 
97  for (int x=0; x<TWO___FED; x++)
98  for (int y=0; y<THREE_SPG; y++)
99  DataFlowInd_[x][y]=0;
100 
101  for (int f=0; f<NUMDCCS; f++)
102  for (int x=0; x< TWO_CHANN; x++)
103  for (int y=0; y<TWO__SPGT; y++)
105 
106  for (int i=0; i<(NUMDCCS * NUMSPIGS * HTRCHANMAX); i++)
108 
109  for (int d=0; d<DEPTHBINS; d++) {
110  for (int eta=0; eta<ETABINS; eta++) {
111  for (int phi=0; phi<PHIBINS; phi++){
112  uniqcounter[eta][phi][d] = 0.0;
113  problemcount[eta][phi][d] = 0.0;
114  problemfound[eta][phi][d] = false;
115  }
116  }
117  }
118 
119  // Properly initialze bylumi counters.
120  NumBadHB=0;
121  NumBadHE=0;
122  NumBadHO=0;
123  NumBadHF=0;
124  NumBadHFLUMI=0;
125  NumBadHO0=0;
126  NumBadHO12=0;
127 
128 } // HcalRawDataMonitor::HcalRawDataMonitor()
float ChannSumm_DataIntegrityCheck_[TWO___FED][TWO__SPGT]
static const HcalDetId Undefined
Definition: HcalDetId.h:50
int i
Definition: DBlmapReader.cc:9
#define TWO_CHANN
#define THREE_FED
#define HTRCHANMAX
#define NUMDCCS
HcalDetId hashedHcalDetId_[NUMDCCS *NUMSPIGS *HTRCHANMAX]
uint64_t problemcount[ETABINS][PHIBINS][DEPTHBINS]
T eta() const
#define NUMSPIGS
#define DEPTHBINS
float LRBDataCorruptionIndicators_[THREE_FED][THREE_SPG]
#define TWO__SPGT
double f[11][100]
bool problemfound[ETABINS][PHIBINS][DEPTHBINS]
#define TWO___FED
#define ETABINS
float HalfHTRDataCorruptionIndicators_[THREE_FED][THREE_SPG]
#define THREE_SPG
uint64_t UScount[NUMDCCS][NUMSPIGS]
#define PHIBINS
float Chann_DataIntegrityCheck_[NUMDCCS][TWO_CHANN][TWO__SPGT]
Definition: DDAxes.h:10
uint64_t uniqcounter[ETABINS][PHIBINS][DEPTHBINS]
float DataFlowInd_[TWO___FED][THREE_SPG]
Definition: DDAxes.h:10
void HcalRawDataMonitor::setup ( void  )
protectedvirtual

Below, "Corruption" FOLDER

Reimplemented from HcalBaseDQMonitor.

Definition at line 181 of file HcalRawDataMonitor.cc.

References DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookInt(), DQMStore::bookProfile(), gather_cfg::cout, HcalBaseDQMonitor::dbe_, HcalBaseDQMonitor::debug_, excludeHORing2_, f, MonitorElement::Fill(), MonitorElement::getTProfile(), HTR_StatusWd_HBHE, HTR_StatusWd_HF, HTR_StatusWd_HO, diffTwoXMLs::label, label_xChanns(), label_xFEDs(), label_ySpigots(), labelHTRBits(), meBCN_, meBCNCheck_, meBCNSynch_, meBCNwhenOrNDiff_, meCDFErrorFound_, meChann_DataIntegrityCheck_, meChannSumm_DataIntegrityCheck_, meCrate0HTRStatus_, meCrate10HTRStatus_, meCrate11HTRStatus_, meCrate12HTRStatus_, meCrate13HTRStatus_, meCrate14HTRStatus_, meCrate15HTRStatus_, meCrate17HTRStatus_, meCrate1HTRStatus_, meCrate2HTRStatus_, meCrate3HTRStatus_, meCrate4HTRStatus_, meCrate5HTRStatus_, meCrate6HTRStatus_, meCrate7HTRStatus_, meCrate9HTRStatus_, meDataFlowInd_, medccBCN_, meDCCEventFormatError_, meDCCVersion_, meEvFragSize2_, meEvFragSize_, meEvtNCheck_, meEvtNumberSynch_, mefedEntries_, meFEDRawDataSizes_, meFib1OrbMsgBCN_, meFib2OrbMsgBCN_, meFib3OrbMsgBCN_, meFib4OrbMsgBCN_, meFib5OrbMsgBCN_, meFib6OrbMsgBCN_, meFib7OrbMsgBCN_, meFib8OrbMsgBCN_, meFibBCN_, meHalfHTRDataCorruptionIndicators_, meHTRFWVersion_, meInvHTRData_, meLRBDataCorruptionIndicators_, meOrNCheck_, meOrNSynch_, meStatusWdCrate_, meUSFractSpigs_, HcalBaseDQMonitor::NLumiBlocks_, NUMDCCS, HcalBaseDQMonitor::ProblemsVsLB, HcalBaseDQMonitor::ProblemsVsLB_HB, HcalBaseDQMonitor::ProblemsVsLB_HBHEHF, HcalBaseDQMonitor::ProblemsVsLB_HE, HcalBaseDQMonitor::ProblemsVsLB_HF, HcalBaseDQMonitor::ProblemsVsLB_HO, alignCSCRings::s, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), HcalBaseDQMonitor::setup(), HcalDCCHeader::SPIGOT_COUNT, AlCaHLTBitMon_QueryRunRegistry::string, HcalBaseDQMonitor::subdir_, THREE_FED, THREE_SPG, TWO___FED, TWO__SPGT, and TWO_CHANN.

181  {
182  // Call base class setup
184  if (!dbe_) {
185  if (debug_>1)
186  std::cout <<"<HcalRawDataMonitor::setup> No DQMStore instance available. Bailing out."<<std::endl;
187  return;}
188 
189  /******* Set up all histograms ********/
190  if (debug_>1)
191  std::cout <<"<HcalRawDataMonitor::beginRun> Setting up histograms"<<std::endl;
192 
194  ProblemsVsLB=dbe_->bookProfile("RAW_Problems_HCAL_vs_LS",
195  "Total HCAL RAW Problems vs lumi section",
196  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
197 
198  ProblemsVsLB_HB=dbe_->bookProfile("Total_RAW_Problems_HB_vs_LS",
199  "Total HB RAW Problems vs lumi section",
200  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,3000);
201  ProblemsVsLB_HE=dbe_->bookProfile("Total_RAW_Problems_HE_vs_LS",
202  "Total HE RAW Problems vs lumi section",
203  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,3000);
204  ProblemsVsLB_HO=dbe_->bookProfile("Total_RAW_Problems_HO_vs_LS",
205  "Total HO RAW Problems vs lumi section",
206  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,3000);
207  ProblemsVsLB_HF=dbe_->bookProfile("Total_RAW_Problems_HF_vs_LS",
208  "Total HF RAW Problems vs lumi section",
209  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,2000);
210  ProblemsVsLB_HBHEHF=dbe_->bookProfile("Total_RAW_Problems_HBHEHF_vs_LS",
211  "Total HBHEHF RAW Problems vs lumi section",
212  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,2000);
213 
214  ProblemsVsLB->getTProfile()->SetMarkerStyle(20);
215  ProblemsVsLB_HB->getTProfile()->SetMarkerStyle(20);
216  ProblemsVsLB_HE->getTProfile()->SetMarkerStyle(20);
217  ProblemsVsLB_HO->getTProfile()->SetMarkerStyle(20);
218  ProblemsVsLB_HF->getTProfile()->SetMarkerStyle(20);
219  ProblemsVsLB_HBHEHF->getTProfile()->SetMarkerStyle(20);
220  MonitorElement* excludeHO2=dbe_->bookInt("ExcludeHOring2");
221  // Fill with 0 if ring is not to be excluded; fill with 1 if it is to be excluded
222  if (excludeHO2) excludeHO2->Fill(excludeHORing2_==true ? 1 : 0);
223 
224 
225  // Already done in base class:
226  //dbe_->setCurrentFolder(subdir_);
227  //meIevt_ = dbe_->bookInt("EventsProcessed");
228  //if (meIevt_) meIevt_->Fill(-1);
229  //meLevt_ = dbe_->bookInt("EventsProcessed_currentLS");
230  //if (meLevt_) meLevt_->Fill(-1);
231  //meTevt_ = dbe_->bookInt("EventsProcessed_All");
232  //if (meTevt_) meTevt_->Fill(-1);
233  //meTevtHist_=dbe_->book1D("EventsProcessed_AllHists","Counter of Events Processed By This Task",1,0.5,1.5);
234  //if (meTevtHist_) meTevtHist_->Reset();
235 
237 
238  dbe_->setCurrentFolder(subdir_ + "Corruption");
239  type = "01 Common Data Format violations";
240  meCDFErrorFound_ = dbe_->book2D(type,type,32,699.5,731.5,9,0.5,9.5);
241  meCDFErrorFound_->setAxisTitle("HCAL FED ID", 1);
242  meCDFErrorFound_->setBinLabel(1, "Hdr1BitUnset", 2);
243  meCDFErrorFound_->setBinLabel(2, "FmtNumChange", 2);
244  meCDFErrorFound_->setBinLabel(3, "BOE not '0x5'", 2);
245  meCDFErrorFound_->setBinLabel(4, "Hdr2Bit Set", 2);
246  meCDFErrorFound_->setBinLabel(5, "Hdr1 36-55", 2);
247  meCDFErrorFound_->setBinLabel(6, "BOE not 0", 2);
248  meCDFErrorFound_->setBinLabel(7, "Trlr1Bit Set", 2);
249  meCDFErrorFound_->setBinLabel(8, "Size Error", 2);
250  meCDFErrorFound_->setBinLabel(9, "TrailerBad", 2);
251 
252  type = "02 DCC Event Format violation";
253  meDCCEventFormatError_ = dbe_->book2D(type,type,32,699.5,731.5,6,0.5,6.5);
254  meDCCEventFormatError_->setAxisTitle("HCAL FED ID", 1);
255  meDCCEventFormatError_->setBinLabel(1, "FmtVers Changed", 2);
256  meDCCEventFormatError_->setBinLabel(2, "StrayBits Changed", 2);
257  meDCCEventFormatError_->setBinLabel(3, "HTRStatusPad", 2);
258  meDCCEventFormatError_->setBinLabel(4, "32bitPadErr", 2);
259  meDCCEventFormatError_->setBinLabel(5, "Number Mismatch Bit Miscalc", 2);
260  meDCCEventFormatError_->setBinLabel(6, "Low 8 HTR Status Bits Miscopy", 2);
261 
262  type = "04 HTR BCN when OrN Diff";
263  meBCNwhenOrNDiff_ = dbe_->book1D(type,type,3564,-0.5,3563.5);
265  meBCNwhenOrNDiff_->setAxisTitle("# of Entries",2);
266 
267  type = "03 OrN NonZero Difference HTR - DCC";
268  meOrNCheck_ = dbe_->book1D(type,type,65,-32.5,32.5);
269  meOrNCheck_->setAxisTitle("htr OrN - dcc OrN",1);
270 
271  type = "03 OrN Inconsistent - HTR vs DCC";
272  meOrNSynch_= dbe_->book2D(type,type,32,700,732, 15,0,15);
273  meOrNSynch_->setAxisTitle("FED #",1);
274  meOrNSynch_->setAxisTitle("Spigot #",2);
275 
276  type = "05 BCN NonZero Difference HTR - DCC";
277  meBCNCheck_ = dbe_->book1D(type,type,501,-250.5,250.5);
278  meBCNCheck_->setAxisTitle("htr BCN - dcc BCN",1);
279 
280  type = "05 BCN Inconsistent - HTR vs DCC";
281  meBCNSynch_= dbe_->book2D(type,type,32,700,732, 15,0,15);
282  meBCNSynch_->setAxisTitle("FED #",1);
283  meBCNSynch_->setAxisTitle("Slot #",2);
284 
285  type = "06 EvN NonZero Difference HTR - DCC";
286  meEvtNCheck_ = dbe_->book1D(type,type,601,-300.5,300.5);
287  meEvtNCheck_->setAxisTitle("htr Evt # - dcc Evt #",1);
288 
289  type = "06 EvN Inconsistent - HTR vs DCC";
290  meEvtNumberSynch_= dbe_->book2D(type,type,32,700,732, 15,0,15);
291  meEvtNumberSynch_->setAxisTitle("FED #",1);
292  meEvtNumberSynch_->setAxisTitle("Slot #",2);
293 
294  // ----------------
295  // | E!P | UE | TR |
296  // ----| ND | OV | ID |
297  // | T | CRC | ST | ODD|
298  // --------------------
299  type="07 LRB Data Corruption Indicators";
302  THREE_SPG,0,THREE_SPG);
303  label_xFEDs (meLRBDataCorruptionIndicators_, 4); // 3 bins + 1 margin per ch.
304  label_ySpigots(meLRBDataCorruptionIndicators_, 4); // 3 bins + 1 margin each spgt
305 
306  // ----------------
307  // | CT | BE | |
308  // | HM | 15 | WW | (Wrong Wordcount)
309  // | TM | CK | IW | (Illegal Wordcount)
310  // ----------------
311  type="08 Half-HTR Data Corruption Indicators";
314  THREE_SPG,0,THREE_SPG);
315  label_xFEDs (meHalfHTRDataCorruptionIndicators_, 4); // 3 bins + 1 margin per ch.
316  label_ySpigots(meHalfHTRDataCorruptionIndicators_, 4); // 3 bins + 1 margin each spgt
317 
318  // ------------
319  // | !DV | Er |
320  // | NTS | Cap |
321  // ------------
322  type = "09 Channel Integrity Summarized by Spigot";
325  TWO__SPGT,0,TWO__SPGT);
326  label_xFEDs (meChannSumm_DataIntegrityCheck_, 3); // 2 bins + 1 margin per ch.
327  label_ySpigots(meChannSumm_DataIntegrityCheck_, 3); // 2 bins + 1 margin per spgt
328 
329  dbe_->setCurrentFolder(subdir_ + "Corruption/Channel Data Integrity");
330  char label[256];
331  for (int f=0; f<NUMDCCS; f++){
332  snprintf(label, 256, "FED %03d Channel Integrity", f+700);
333  meChann_DataIntegrityCheck_[f] = dbe_->book2D(label,label,
335  TWO__SPGT,0,TWO__SPGT);
336  label_xChanns (meChann_DataIntegrityCheck_[f], 3); // 2 bins + 1 margin per ch.
337  label_ySpigots(meChann_DataIntegrityCheck_[f], 3); // 2 bins + 1 margin per spgt
338  ;}
339 
340  dbe_->setCurrentFolder(subdir_ + "Data Flow");
341  type="DCC Event Counts";
342  mefedEntries_ = dbe_->book1D(type,type,32,699.5,731.5);
343 
344  type = "BCN from DCCs";
345  medccBCN_ = dbe_->book1D(type,type,3564,-0.5,3563.5);
346  medccBCN_->setAxisTitle("BCN",1);
347  medccBCN_->setAxisTitle("# of Entries",2);
348 
349  type = "BCN from HTRs";
350  meBCN_ = dbe_->book1D(type,type,3564,-0.5,3563.5);
351  meBCN_->setAxisTitle("BCN",1);
352  meBCN_->setAxisTitle("# of Entries",2);
353 
354  type = "DCC Data Block Size Distribution";
355  meFEDRawDataSizes_=dbe_->book1D(type,type,1200,-0.5,12000.5);
356  meFEDRawDataSizes_->setAxisTitle("# of bytes",1);
357  meFEDRawDataSizes_->setAxisTitle("# of Data Blocks",2);
358 
359  type = "DCC Data Block Size Profile";
360  meEvFragSize_ = dbe_->bookProfile(type,type,32,699.5,731.5,100,-1000.0,12000.0,"");
361  type = "DCC Data Block Size Each FED";
362  meEvFragSize2_ = dbe_->book2D(type,type,64,699.5,731.5, 240,0,12000);
363 
364  // ------------
365  // | OW | OFW | "Two Caps HTR; Three Caps FED."
366  // | BZ | BSY |
367  // | EE | RL |
368  // ----------------
369  // | CE | (corrected error, Hamming code)
370  // ------
371  type = "01 Data Flow Indicators";
372  meDataFlowInd_= dbe_->book2D(type,type,
374  THREE_SPG,0,THREE_SPG);
375  label_xFEDs (meDataFlowInd_, 3); // 2 bins + 1 margin per ch.
376  label_ySpigots(meDataFlowInd_, 4); // 3 bins + 1 margin each spgt
377 
378  dbe_->setCurrentFolder(subdir_ + "Diagnostics");
379 
380  type = "DCC Firmware Version";
381  meDCCVersion_ = dbe_->bookProfile(type,type, 32, 699.5, 731.5, 256, -0.5, 255.5);
382  meDCCVersion_ ->setAxisTitle("FED ID", 1);
383 
384  type = "HTR Status Word HBHE";
385  HTR_StatusWd_HBHE = dbe_->book1D(type,type,16,-0.5,15.5);
387 
388  type = "HTR Status Word HF";
389  HTR_StatusWd_HF = dbe_->book1D(type,type,16,-0.5,15.5);
391 
392  type = "HTR Status Word HO";
393  HTR_StatusWd_HO = dbe_->book1D(type,type,16,-0.5,15.5);
395 
396  int maxbits = 16;//Look at all 16 bits of the Error Words
397  type = "HTR Status Word by Crate";
398  meStatusWdCrate_ = dbe_->book2D(type,type,18,-0.5,17.5,maxbits,-0.5,maxbits-0.5);
399  meStatusWdCrate_ -> setAxisTitle("Crate #",1);
401 
402  type = "Unpacking - HcalHTRData check failures";
403  meInvHTRData_= dbe_->book2D(type,type,16,-0.5,15.5,32,699.5,731.5);
404  meInvHTRData_->setAxisTitle("Spigot #",1);
405  meInvHTRData_->setAxisTitle("DCC #",2);
406 
407  type = "HTR Fiber Orbit Message BCN";
408  meFibBCN_ = dbe_->book1D(type,type,3564,-0.5,3563.5);
409  meFibBCN_->setAxisTitle("BCN of Fib Orb Msg",1);
410 
411  type = "HTR Status Word - Crate 0";
412  meCrate0HTRStatus_ = dbe_->book2D(type,type,40,-0.25,19.75,maxbits,-0.5,maxbits-0.5);
413  meCrate0HTRStatus_ ->setAxisTitle("Slot #",1);
415 
416  type = "HTR Status Word - Crate 1";
417  meCrate1HTRStatus_ = dbe_->book2D(type,type,40,-0.25,19.75,maxbits,-0.5,maxbits-0.5);
418  meCrate1HTRStatus_ ->setAxisTitle("Slot #",1);
420 
421  type = "HTR Status Word - Crate 2";
422  meCrate2HTRStatus_ = dbe_->book2D(type,type,40,-0.25,19.75,maxbits,-0.5,maxbits-0.5);
423  meCrate2HTRStatus_ ->setAxisTitle("Slot #",1);
425 
426  type = "HTR Status Word - Crate 3";
427  meCrate3HTRStatus_ = dbe_->book2D(type,type,40,-0.25,19.75,maxbits,-0.5,maxbits-0.5);
428  meCrate3HTRStatus_ ->setAxisTitle("Slot #",1);
430 
431  type = "HTR Status Word - Crate 4";
432  meCrate4HTRStatus_ = dbe_->book2D(type,type,40,-0.25,19.75,maxbits,-0.5,maxbits-0.5);
433  meCrate4HTRStatus_ ->setAxisTitle("Slot #",1);
435 
436  type = "HTR Status Word - Crate 5";
437  meCrate5HTRStatus_ = dbe_->book2D(type,type,40,-0.25,19.75,maxbits,-0.5,maxbits-0.5);
438  meCrate5HTRStatus_ ->setAxisTitle("Slot #",1);
440 
441  type = "HTR Status Word - Crate 6";
442  meCrate6HTRStatus_ = dbe_->book2D(type,type,40,-0.25,19.75,maxbits,-0.5,maxbits-0.5);
443  meCrate6HTRStatus_ ->setAxisTitle("Slot #",1);
445 
446  type = "HTR Status Word - Crate 7";
447  meCrate7HTRStatus_ = dbe_->book2D(type,type,40,-0.25,19.75,maxbits,-0.5,maxbits-0.5);
448  meCrate7HTRStatus_ ->setAxisTitle("Slot #",1);
450 
451  type = "HTR Status Word - Crate 9";
452  meCrate9HTRStatus_ = dbe_->book2D(type,type,40,-0.25,19.75,maxbits,-0.5,maxbits-0.5);
453  meCrate9HTRStatus_ ->setAxisTitle("Slot #",1);
455 
456  type = "HTR Status Word - Crate 10";
457  meCrate10HTRStatus_ = dbe_->book2D(type,type,40,-0.25,19.75,maxbits,-0.5,maxbits-0.5);
458  meCrate10HTRStatus_ ->setAxisTitle("Slot #",1);
460 
461  type = "HTR Status Word - Crate 11";
462  meCrate11HTRStatus_ = dbe_->book2D(type,type,40,-0.25,19.75,maxbits,-0.5,maxbits-0.5);
463  meCrate11HTRStatus_ ->setAxisTitle("Slot #",1);
465 
466  type = "HTR Status Word - Crate 12";
467  meCrate12HTRStatus_ = dbe_->book2D(type,type,40,-0.25,19.75,maxbits,-0.5,maxbits-0.5);
468  meCrate12HTRStatus_ ->setAxisTitle("Slot #",1);
470 
471  type = "HTR Status Word - Crate 13";
472  meCrate13HTRStatus_ = dbe_->book2D(type,type,40,-0.25,19.75,maxbits,-0.5,maxbits-0.5);
473  meCrate13HTRStatus_ ->setAxisTitle("Slot #",1);
475 
476  type = "HTR Status Word - Crate 14";
477  meCrate14HTRStatus_ = dbe_->book2D(type,type,40,-0.25,19.75,maxbits,-0.5,maxbits-0.5);
478  meCrate14HTRStatus_ ->setAxisTitle("Slot #",1);
480 
481  type = "HTR Status Word - Crate 15";
482  meCrate15HTRStatus_ = dbe_->book2D(type,type,40,-0.25,19.75,maxbits,-0.5,maxbits-0.5);
483  meCrate15HTRStatus_ ->setAxisTitle("Slot #",1);
485 
486  type = "HTR Status Word - Crate 17";
487  meCrate17HTRStatus_ = dbe_->book2D(type,type,40,-0.25,19.75,maxbits,-0.5,maxbits-0.5);
488  meCrate17HTRStatus_ ->setAxisTitle("Slot #",1);
490 
491  type = "HTR UnSuppressed Event Fractions";
492  meUSFractSpigs_ = dbe_->book1D(type,type,481,0,481);
493  for(int f=0; f<NUMDCCS; f++) {
494  snprintf(label, 256, "FED 7%02d", f);
496  for(int s=1; s<HcalDCCHeader::SPIGOT_COUNT; s++) {
497  snprintf(label, 256, "sp%02d", s);
498  meUSFractSpigs_->setBinLabel(1+(HcalDCCHeader::SPIGOT_COUNT*f)+s, label);}}
499 
500  // Firmware version
501  type = "HTR Firmware Version";
502  // Maybe change to Profile histo eventually
503  //meHTRFWVersion_ = dbe_->bookProfile(type,type,18,-0.5,17.5,245,10.0,255.0,"");
504  meHTRFWVersion_ = dbe_->book2D(type,type ,18,-0.5,17.5,180,75.5,255.5);
505  meHTRFWVersion_->setAxisTitle("Crate #",1);
506  meHTRFWVersion_->setAxisTitle("HTR Firmware Version",2);
507 
508  type = "HTR Fiber 1 Orbit Message BCNs";
509  meFib1OrbMsgBCN_= dbe_->book2D(type,type,40,-0.25,19.75,18,-0.5,17.5);
510  type = "HTR Fiber 2 Orbit Message BCNs";
511  meFib2OrbMsgBCN_= dbe_->book2D(type,type,40,-0.25,19.75,18,-0.5,17.5);
512  type = "HTR Fiber 3 Orbit Message BCNs";
513  meFib3OrbMsgBCN_= dbe_->book2D(type,type,40,-0.25,19.75,18,-0.5,17.5);
514  type = "HTR Fiber 4 Orbit Message BCNs";
515  meFib4OrbMsgBCN_= dbe_->book2D(type,type,40,-0.25,19.75,18,-0.5,17.5);
516  type = "HTR Fiber 5 Orbit Message BCNs";
517  meFib5OrbMsgBCN_= dbe_->book2D(type,type,40,-0.25,19.75,18,-0.5,17.5);
518  type = "HTR Fiber 6 Orbit Message BCNs";
519  meFib6OrbMsgBCN_= dbe_->book2D(type,type,40,-0.25,19.75,18,-0.5,17.5);
520  type = "HTR Fiber 7 Orbit Message BCNs";
521  meFib7OrbMsgBCN_= dbe_->book2D(type,type,40,-0.25,19.75,18,-0.5,17.5);
522  type = "HTR Fiber 8 Orbit Message BCNs";
523  meFib8OrbMsgBCN_= dbe_->book2D(type,type,40,-0.25,19.75,18,-0.5,17.5);
524 
525 }
type
Definition: HCALResponse.h:21
MonitorElement * meUSFractSpigs_
MonitorElement * meBCN_
MonitorElement * meCDFErrorFound_
MonitorElement * meCrate7HTRStatus_
void label_xFEDs(MonitorElement *me_ptr, int xbins)
MonitorElement * meCrate4HTRStatus_
MonitorElement * meEvtNumberSynch_
#define TWO_CHANN
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:942
MonitorElement * meCrate3HTRStatus_
MonitorElement * meFib5OrbMsgBCN_
#define THREE_FED
MonitorElement * ProblemsVsLB_HF
MonitorElement * meBCNCheck_
#define NUMDCCS
MonitorElement * meCrate17HTRStatus_
MonitorElement * meChannSumm_DataIntegrityCheck_
MonitorElement * meCrate13HTRStatus_
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * meOrNCheck_
MonitorElement * meCrate2HTRStatus_
void label_xChanns(MonitorElement *me_ptr, int xbins)
MonitorElement * meBCNSynch_
MonitorElement * meCrate14HTRStatus_
void labelHTRBits(MonitorElement *mePlot, unsigned int axisType)
MonitorElement * meCrate15HTRStatus_
MonitorElement * meDataFlowInd_
void Fill(long long x)
#define TWO__SPGT
MonitorElement * meCrate6HTRStatus_
MonitorElement * ProblemsVsLB_HBHEHF
MonitorElement * ProblemsVsLB_HB
MonitorElement * HTR_StatusWd_HO
MonitorElement * meCrate5HTRStatus_
MonitorElement * meCrate0HTRStatus_
MonitorElement * meChann_DataIntegrityCheck_[NUMDCCS]
MonitorElement * meOrNSynch_
double f[11][100]
void label_ySpigots(MonitorElement *me_ptr, int ybins)
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1256
MonitorElement * meCrate12HTRStatus_
MonitorElement * meFibBCN_
MonitorElement * meDCCEventFormatError_
MonitorElement * medccBCN_
#define TWO___FED
MonitorElement * HTR_StatusWd_HBHE
MonitorElement * meFib4OrbMsgBCN_
MonitorElement * meInvHTRData_
MonitorElement * meEvtNCheck_
MonitorElement * meBCNwhenOrNDiff_
MonitorElement * meFib1OrbMsgBCN_
MonitorElement * meCrate11HTRStatus_
MonitorElement * meFib8OrbMsgBCN_
MonitorElement * meLRBDataCorruptionIndicators_
MonitorElement * meCrate1HTRStatus_
MonitorElement * meStatusWdCrate_
MonitorElement * meFib7OrbMsgBCN_
MonitorElement * ProblemsVsLB_HE
#define THREE_SPG
static const int SPIGOT_COUNT
Definition: HcalDCCHeader.h:19
MonitorElement * meEvFragSize_
MonitorElement * HTR_StatusWd_HF
TProfile * getTProfile(void) const
MonitorElement * meFib2OrbMsgBCN_
MonitorElement * meEvFragSize2_
tuple cout
Definition: gather_cfg.py:121
MonitorElement * meDCCVersion_
MonitorElement * ProblemsVsLB_HO
MonitorElement * meCrate10HTRStatus_
MonitorElement * ProblemsVsLB
MonitorElement * meHTRFWVersion_
MonitorElement * meFEDRawDataSizes_
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:849
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:1070
MonitorElement * mefedEntries_
virtual void setup(void)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * meHalfHTRDataCorruptionIndicators_
MonitorElement * meFib3OrbMsgBCN_
MonitorElement * meFib6OrbMsgBCN_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:655
MonitorElement * meCrate9HTRStatus_
void HcalRawDataMonitor::stashHDI ( int  thehash,
HcalDetId  thehcaldetid 
)
protected

Definition at line 1355 of file HcalRawDataMonitor.cc.

References hashedHcalDetId_, HTRCHANMAX, NUMDCCS, and NUMSPIGS.

Referenced by beginRun().

1355  {
1356  //Let's not allow indexing off the array...
1357  if ((thehash<0)||(thehash>(NUMDCCS*NUMSPIGS*HTRCHANMAX)))return;
1358  //...but still do the job requested.
1359  hashedHcalDetId_[thehash] = thehcaldetid;
1360 }
#define HTRCHANMAX
#define NUMDCCS
HcalDetId hashedHcalDetId_[NUMDCCS *NUMSPIGS *HTRCHANMAX]
#define NUMSPIGS
void HcalRawDataMonitor::unpack ( const FEDRawData raw)
protected

check that all HTRs have the same L1A number.

check that all HTRs have the same BCN

check that all HTRs have the same OrN

branch point between 2006-2011 data format and 2012+ data format

Definition at line 633 of file HcalRawDataMonitor.cc.

References HcalDCCHeader::BOEshouldBe5Always(), HcalDCCHeader::BOEshouldBeZeroAlways(), HcalQIESample::capid(), CDFReservedBits_it, CDFReservedBits_list, CDFvers_it, CDFversionNumber_list, Chann_DataIntegrityCheck_, ChannSumm_DataIntegrityCheck_, hitfit::char, FEDTrailer::check(), HcalHTRData::check(), gather_cfg::cout, FEDRawData::data(), DataFlowInd_, HcalHTRData::dataPointers(), DCCEvtFormat_it, DCCEvtFormat_list, HcalBaseDQMonitor::debug_, HcalQIESample::dv(), HWWFunctions::EE, HcalQIESample::er(), HcalQIESample::fiber(), HcalQIESample::fiberChan(), MonitorElement::Fill(), HcalObjRepresent::Fill(), HcalDCCHeader::getAcceptTimeTTS(), HcalDCCHeader::getBunchId(), HcalHTRData::getBunchNumber(), HcalDCCHeader::getBxMismatchWithDCC(), HcalDCCHeader::getCDFversionNumber(), HcalDCCHeader::getDCCDataFormatVersion(), HcalDCCHeader::getDCCEventNumber(), HcalHTRData::getErrorsWord(), HcalHTRData::getExtHdr6(), HcalHTRData::getExtHdr7(), HcalHTRData::getFib1OrbMsgBCN(), HcalHTRData::getFib2OrbMsgBCN(), HcalHTRData::getFib3OrbMsgBCN(), HcalHTRData::getFib4OrbMsgBCN(), HcalHTRData::getFib5OrbMsgBCN(), HcalHTRData::getFib6OrbMsgBCN(), HcalHTRData::getFib7OrbMsgBCN(), HcalHTRData::getFib8OrbMsgBCN(), HcalHTRData::getFirmwareRevision(), HcalHTRData::getFormatVersion(), HcalHTRData::getL1ANumber(), HcalDCCHeader::getLRBErrorBits(), HcalHTRData::getNDD(), HcalDCCHeader::getOrbitNumber(), HcalHTRData::getOrbitNumber(), HcalHTRData::getRawData(), HcalHTRData::getRawLength(), HcalDCCHeader::getSlink64ReservedBits(), HcalDCCHeader::getSourceId(), HcalDCCHeader::getSpigotCRCError(), HcalDCCHeader::getSpigotData(), HcalDCCHeader::getSpigotDataLength(), HcalDCCHeader::getSpigotDataTruncated(), HcalDCCHeader::getSpigotEnabled(), HcalDCCHeader::getSpigotErrorBits(), HcalDCCHeader::getSpigotPresent(), HcalDCCHeader::getSpigotSummary(), HcalDCCHeader::getSpigotValid(), HalfHTRDataCorruptionIndicators_, hashedHcalDetId_, hashup(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HTR_StatusWd_HBHE, HTR_StatusWd_HF, HTR_StatusWd_HO, HTRPrint(), HcalHTRData::htrSlot(), HcalHTRData::htrTopBottom(), i, HcalHTRData::is_channel_header(), HcalHTRData::isHistogramEvent(), FEDTrailer::lenght(), LRBDataCorruptionIndicators_, mapChannproblem(), mapDCCproblem(), mapHTRproblem(), max(), meBCN_, meBCNCheck_, meBCNSynch_, meBCNwhenOrNDiff_, meCDFErrorFound_, meCrate0HTRStatus_, meCrate10HTRStatus_, meCrate11HTRStatus_, meCrate12HTRStatus_, meCrate13HTRStatus_, meCrate14HTRStatus_, meCrate15HTRStatus_, meCrate17HTRStatus_, meCrate1HTRStatus_, meCrate2HTRStatus_, meCrate3HTRStatus_, meCrate4HTRStatus_, meCrate5HTRStatus_, meCrate6HTRStatus_, meCrate7HTRStatus_, meCrate9HTRStatus_, medccBCN_, meDCCEventFormatError_, meDCCVersion_, meEvFragSize2_, meEvFragSize_, meEvtNCheck_, meEvtNumberSynch_, mefedEntries_, meFEDRawDataSizes_, meFib1OrbMsgBCN_, meFib2OrbMsgBCN_, meFib3OrbMsgBCN_, meFib4OrbMsgBCN_, meFib5OrbMsgBCN_, meFib6OrbMsgBCN_, meFib7OrbMsgBCN_, meFib8OrbMsgBCN_, meFibBCN_, meHTRFWVersion_, meInvHTRData_, meOrNCheck_, meOrNSynch_, meStatusWdCrate_, meUSFractSpigs_, bookConverter::min, FEDTrailer::moreTrailers(), NULL, HcalQIESample::raw(), HcalHTRData::readoutVMECrateId(), FEDRawData::size(), HcalDCCHeader::SPIGOT_COUNT, DetId::subdetId(), HcalDCCHeader::thereIsASecondCDFHeaderWord(), HcalDCCHeader::thereIsAThirdCDFHeaderWord(), FEDTrailer::ttsBits(), HcalDetId::Undefined, HcalHTRData::unpack_per_channel_header(), and UScount.

Referenced by processEvent().

633  {
634 
635  // get the DCC header & trailer (or bail out)
636  const HcalDCCHeader* dccHeader=(const HcalDCCHeader*)(raw.data());
637  if(!dccHeader) return;
638  unsigned char* trailer_ptr = (unsigned char*) (raw.data()+raw.size()-sizeof(uint64_t));
639  FEDTrailer trailer = FEDTrailer(trailer_ptr);
640 
641  // FED id declared in the header
642  int dccid=dccHeader->getSourceId();
643  //Force 0<= dcc_ <= 31
644  int dcc_=std::max(0,dccid-700);
645  dcc_ = std::min(dcc_,31);
646  if(debug_>1) std::cout << "DCC " << dccid << std::endl;
647  uint64_t* dccfw= (uint64_t*) (raw.data()+(sizeof(uint64_t)*2)); //64-bit DAQ word number 2 (from 0)
648  int dcc_fw = ( ((*dccfw)>>(6*8))&0x00000000000000FF ); //Shift right 6 bytes, get that low byte.
649  meDCCVersion_ -> Fill(dccid,dcc_fw);
650 
651  //Before all else, how much data are we dealing with here?
652  uint64_t* lastDataWord = (uint64_t*) ( raw.data()+(raw.size())-(1*sizeof(uint64_t)) );
653  int EvFragLength = (int) (*lastDataWord>>(4*8)) & 0x0000000000FFFFFF ; //Shift right 4 bytes, get low 3 bytes.
654  meFEDRawDataSizes_->Fill(EvFragLength*8); //# 64-bit DAQ words *8 = # bytes.
655  meEvFragSize_ ->Fill(dccid, EvFragLength*8); //# 64-bit DAQ words *8 = # bytes.
656  meEvFragSize2_ ->Fill(dccid, EvFragLength*8); //# 64-bit DAQ words *8 = # bytes.
657 
658  //Orbit, BunchCount, and Event Numbers
659  unsigned long dccEvtNum = dccHeader->getDCCEventNumber();
660  int dccBCN = dccHeader->getBunchId();
661  //Mask down to 5 bits, since only used for comparison to HTR's five bit number...
662  unsigned int dccOrN = (unsigned int) (dccHeader->getOrbitNumber() & 0x0000001F);
663  medccBCN_ -> Fill(dccBCN);
664 
666  bool CDFProbThisDCC = false;
667  /* 1 */ //There should always be a second CDF header word indicated.
668  if (!dccHeader->thereIsASecondCDFHeaderWord()
669  //TESTME_HCALRAWDATA//
670  //|| ((dccid==702)&&(tevt_%2==0))
671  ) {
672  meCDFErrorFound_->Fill(dccid, 1);
673  CDFProbThisDCC = true;
674  }
675  /* 2 */ //Make sure a reference CDF Version value has been recorded for this dccid
676  CDFvers_it = CDFversionNumber_list.find(dccid);
677  if (CDFvers_it == CDFversionNumber_list.end()) {
678  CDFversionNumber_list.insert(std::pair<int,short>
679  (dccid,dccHeader->getCDFversionNumber() ) );
680  CDFvers_it = CDFversionNumber_list.find(dccid);
681  } // then check against it.
682  if (dccHeader->getCDFversionNumber()!= CDFvers_it->second) {
683  meCDFErrorFound_->Fill(dccid,2);
684  CDFProbThisDCC = true;
685  }
686  /* 3 */ //There should always be a '5' in CDF Header word 0, bits [63:60]
687  if (dccHeader->BOEshouldBe5Always()!=5) {
688  meCDFErrorFound_->Fill(dccid, 3);
689  CDFProbThisDCC = true;
690  }
691  /* 4 */ //There should never be a third CDF Header word indicated.
692  if (dccHeader->thereIsAThirdCDFHeaderWord()) {
693  meCDFErrorFound_->Fill(dccid, 4);
694  CDFProbThisDCC = true;
695  }
696  /* 5 */ //Make sure a reference value of Reserved Bits has been recorded for this dccid
699  CDFReservedBits_list.insert(std::pair<int,short>
700  (dccid,dccHeader->getSlink64ReservedBits() & 0x0000FFFF ) );
702  } // then check against it.
703  if (((int) dccHeader->getSlink64ReservedBits() & 0x0000FFFF ) != CDFReservedBits_it->second) {
704  meCDFErrorFound_->Fill(dccid,5);
705  //CDFProbThisDCC = true;
706  }
707  /* 6 */ //There should always be 0x0 in CDF Header word 1, bits [63:60]
708  if (dccHeader->BOEshouldBeZeroAlways() !=0) {
709  meCDFErrorFound_->Fill(dccid, 6);
710  CDFProbThisDCC = true;
711  }
712  /* 7 */ //There should only be one trailer
713  if (trailer.moreTrailers()) {
714  meCDFErrorFound_->Fill(dccid, 7);
715  CDFProbThisDCC = true;
716  }
717  // if trailer.
718  /* 8 */ //CDF Trailer [55:30] should be the # 64-bit words in the EvFragment
719  if ((uint64_t) raw.size() != ( (uint64_t) trailer.lenght()*sizeof(uint64_t)) ) //The function name is a typo! Awesome.
720  {
721  meCDFErrorFound_->Fill(dccid, 8);
722  CDFProbThisDCC = true;
723  }
724  /* 9 */ //There is a rudimentary sanity check built into the FEDTrailer class
725  if (!trailer.check()) {
726  meCDFErrorFound_->Fill(dccid, 9);
727  CDFProbThisDCC = true;
728  }
729  if (CDFProbThisDCC) {
730  //Set the problem flag for the ieta, iphi of any channel in this DCC
731  mapDCCproblem(dcc_);
732  if (debug_>0) std::cout <<"CDFProbThisDCC"<<std::endl;
733  }
734 
735  mefedEntries_->Fill(dccid);
736 
737  CDFProbThisDCC = false; // reset for the next go-round.
738 
739  char CRC_err;
740  for(int i=0; i<HcalDCCHeader::SPIGOT_COUNT; i++) {
741  CRC_err = ((dccHeader->getSpigotSummary(i) >> 10) & 0x00000001);
742  if (CRC_err) {
743  mapDCCproblem(dcc_);
744  //Set the problem flag for the ieta, iphi of any channel in this DCC
745  if (debug_>0) std::cout <<"HTR Problem: CRC_err"<<std::endl;
746  }
747  }
748 
749  // The DCC TTS state at event-sending time
750  char TTS_state = (char)trailer.ttsBits();
751  // The DCC TTS state at time L1A received (event enqueued to be built)
752  char L1AtimeTTS_state=(char) dccHeader->getAcceptTimeTTS();
753  if (TTS_state==L1AtimeTTS_state) ;//party
754 
756  /* 1 */ //Make sure a reference value of the DCC Event Format version has been noted for this dcc.
757  DCCEvtFormat_it = DCCEvtFormat_list.find(dccid);
758  if (DCCEvtFormat_it == DCCEvtFormat_list.end()) {
759  DCCEvtFormat_list.insert(std::pair<int,short>
760  (dccid,dccHeader->getDCCDataFormatVersion() ) );
761  DCCEvtFormat_it = DCCEvtFormat_list.find(dccid);
762  } // then check against it.
763  if (dccHeader->getDCCDataFormatVersion()!= DCCEvtFormat_it->second) {
764  meDCCEventFormatError_->Fill(dccid,1);
765  mapDCCproblem(dcc_);
766  if (debug_>0)std::cout <<"DCC Error Type 1"<<std::endl;
767  }
768  /* 2 */ //Check for ones where there should always be zeros
769  if (false) //dccHeader->getByte1Zeroes() || dccHeader->getByte3Zeroes() || dccHeader->getByte567Zeroes())
770  {
771  meDCCEventFormatError_->Fill(dccid,2);
772  mapDCCproblem(dcc_);
773  if (debug_>0)std::cout <<"DCC Error Type 2"<<std::endl;
774  }
775  /* 3 */ //Check that there are zeros following the HTR Status words.
776  int SpigotPad = HcalDCCHeader::SPIGOT_COUNT;
777  if ( (((uint64_t) dccHeader->getSpigotSummary(SpigotPad) )
778  | ((uint64_t) dccHeader->getSpigotSummary(SpigotPad+1))
779  | ((uint64_t) dccHeader->getSpigotSummary(SpigotPad+2))) != 0){
780  meDCCEventFormatError_->Fill(dccid,3);
781  mapDCCproblem(dcc_);
782  if (debug_>0)std::cout <<"DCC Error Type 3"<<std::endl;
783  }
784  /* 4 */ //Check that there are zeros following the HTR Payloads, if needed.
785  int nHTR32BitWords=0;
786  // add up all the declared HTR Payload lengths
787  for(int i=0; i<HcalDCCHeader::SPIGOT_COUNT; i++) {
788  nHTR32BitWords += dccHeader->getSpigotDataLength(i); }
789  // if it's an odd number, check for the padding zeroes
790  if (( nHTR32BitWords % 2) == 1) {
791  uint64_t* lastDataWord = (uint64_t*) ( raw.data()+raw.size()-(2*sizeof(uint64_t)) );
792  if ((*lastDataWord>>32) != 0x00000000){
793  meDCCEventFormatError_->Fill(dccid, 4);
794  mapDCCproblem(dcc_);
795  if (debug_>0)std::cout <<"DCC Error Type 4"<<std::endl;
796  }
797  }
798 
799  //unsigned char HTRErrorList=0;
800  //for(int j=0; j<HcalDCCHeader::SPIGOT_COUNT; j++) {
801  // HTRErrorList=dccHeader->getSpigotErrorBits(j);
802  //}
803 
804  // These will be used in FED-vs-spigot 2D Histograms
805  const int fed3offset = 1 + (4*dcc_); //3 bins, plus one of margin, each DCC
806  const int fed2offset = 1 + (3*dcc_); //2 bins, plus one of margin, each DCC
807  if (TTS_state & 0x8) /*RDY*/
808  ;
809  if (TTS_state & 0x2) /*SYN*/
810  {
811  mapDCCproblem(dcc_);
812  if (debug_>0)std::cout <<"TTS_state Error:sync"<<std::endl;
813  }
814  //Histogram per-Spigot bits from the DCC Header
815  int WholeErrorList=0;
816  for(int spigot=0; spigot<HcalDCCHeader::SPIGOT_COUNT; spigot++) {
817  if (!( dccHeader->getSpigotEnabled((unsigned int) spigot)) )
818  continue; //skip when not enabled
819  // This will be used in FED-vs-spigot 2D Histograms
820  const int spg3offset = 1 + (4*spigot); //3 bins, plus one of margin, each spigot
821 
822  if (TTS_state & 0x4) /*BSY*/
823  ++DataFlowInd_[fed2offset+1][spg3offset+1];
824  if (TTS_state & 0x1) /*OFW*/
825  ++DataFlowInd_[fed2offset+1][spg3offset+2];
826 
827  WholeErrorList=dccHeader->getLRBErrorBits((unsigned int) spigot);
828  if (WholeErrorList!=0) {
829  if ((WholeErrorList>>0)&0x01) //HammingCode Corrected -- Not data corruption!
830  DataFlowInd_[fed2offset-1][spg3offset-1]++;
831  if (((WholeErrorList>>1)&0x01)!=0) {//HammingCode Uncorrected Error
832  LRBDataCorruptionIndicators_[fed3offset+1][spg3offset+2]++;
833  mapHTRproblem(dcc_,spigot);
834  }
835  if (((WholeErrorList>>2)&0x01)!=0) {//Truncated data coming into LRB
836  LRBDataCorruptionIndicators_[fed3offset+2][spg3offset+2]++;
837  mapHTRproblem(dcc_,spigot);
838  }
839  if (((WholeErrorList>>3)&0x01)!=0) {//FIFO Overflow
840  LRBDataCorruptionIndicators_[fed3offset+1][spg3offset+1]++;
841  mapHTRproblem(dcc_,spigot);
842  }
843  if (((WholeErrorList>>4)&0x01)!=0) {//ID (EvN Mismatch), htr payload metadeta
844  LRBDataCorruptionIndicators_[fed3offset+2][spg3offset+1]++;
845  mapHTRproblem(dcc_,spigot);
846  }
847  if (((WholeErrorList>>5)&0x01)!=0) {//STatus: hdr/data/trlr error
848  LRBDataCorruptionIndicators_[fed3offset+1][spg3offset+0]++;
849  mapHTRproblem(dcc_,spigot);
850  }
851  if (((WholeErrorList>>6)&0x01)!=0) {//ODD 16-bit word count from HTR
852  LRBDataCorruptionIndicators_[fed3offset+2][spg3offset+0]++;
853  mapHTRproblem(dcc_,spigot);
854  }
855  }
856  if (!dccHeader->getSpigotPresent((unsigned int) spigot)){
857  LRBDataCorruptionIndicators_[fed3offset+0][spg3offset+2]++; //Enabled, but data not present!
858  mapHTRproblem(dcc_,spigot);
859  if (debug_>0)std::cout <<"HTR Problem: Spigot Not Present"<<std::endl;
860  } else {
861  if ( dccHeader->getSpigotDataTruncated((unsigned int) spigot)) {
862  LRBDataCorruptionIndicators_[fed3offset-1][spg3offset+0]++; // EventBuilder truncated babbling LRB
863  mapHTRproblem(dcc_,spigot);
864  if (debug_>0)std::cout <<"HTR Problem: Spigot Data Truncated"<<std::endl;
865  }
866  if ( dccHeader->getSpigotCRCError((unsigned int) spigot)) {
867  LRBDataCorruptionIndicators_[fed3offset+0][spg3offset+0]++;
868  mapHTRproblem(dcc_,spigot);
869  }
870  } //else spigot marked "Present"
871  if (dccHeader->getSpigotDataLength(spigot) <(unsigned long)4) {
872  LRBDataCorruptionIndicators_[fed3offset+0][spg3offset+1]++; //Lost HTR Data for sure.
873  mapHTRproblem(dcc_,spigot);
874  if (debug_>0)std::cout <<"HTR Problem: Spigot Data Length too small"<<std::endl;
875  }
876  }
877 
878  // Walk through the HTR data...
879  HcalHTRData htr;
880  for (int spigot=0; spigot<HcalDCCHeader::SPIGOT_COUNT; spigot++) {
881  const int spg3offset = 1 + (4*spigot); //3 bins, plus one of margin, each spigot
882  const int spg2offset = 1 + (3*spigot); //3 bins, plus one of margin, each spigot
883  if (!dccHeader->getSpigotPresent(spigot)) continue;
884 
885  // Load the given decoder with the pointer and length from this spigot.
886  // i.e. initialize htr, within dcc raw data size.
887  dccHeader->getSpigotData(spigot,htr, raw.size());
888  const unsigned short* HTRraw = htr.getRawData();
889 
890  // check min length, correct wordcount, empty event, or total length if histo event.
891  if (!htr.check()) {
892  meInvHTRData_ -> Fill(spigot,dccid);
893  mapHTRproblem(dcc_,spigot);
894  if (debug_>0)std::cout <<"HTR Problem: HTR check fails"<<std::endl;
895  }
896 
897  unsigned short HTRwdcount = htr.getRawLength();
898 
899  // Size checks for internal consistency
900  // getNTP(), get NDD() seems to be mismatched with format. Manually:
901  int NTP = ((htr.getExtHdr6() >> 8) & 0x00FF);
902  int NDAQ = (HTRraw[htr.getRawLength() - 4] & 0x7FF);
903 
904  if ( ! ((HTRwdcount != 8) ||
905  (HTRwdcount != 12 + NTP + NDAQ) ||
906  (HTRwdcount != 20 + NTP + NDAQ) )) {
907  ++HalfHTRDataCorruptionIndicators_[fed3offset+2][spg3offset+0];
908  mapHTRproblem(dcc_,spigot);
909  if (debug_>0)std::cout <<"HTR Problem: NTP+NDAQ size consistency check fails"<<std::endl;
910  //incompatible Sizes declared. Skip it.
911  continue; }
912  bool EE = ((dccHeader->getSpigotErrorBits(spigot) >> 2) & 0x01);
913  if (EE) {
914  if (HTRwdcount != 8) { //incompatible Sizes declared. Skip it.
915  ++HalfHTRDataCorruptionIndicators_[fed3offset+2][spg3offset+1];
916  if (debug_>0)std::cout <<"HTR Problem: HTRwdcount !=8"<<std::endl;
917  }
918  DataFlowInd_[fed2offset+0][spg3offset+0]++;
919  continue;}
920  else{ //For non-EE, both CompactMode and !CompactMode
921  bool CM = (htr.getExtHdr7() >> 14)&0x0001;
922  int paddingsize = ((NDAQ+NTP)%2); //Extra padding to make HTRwdcount even
923  if (( CM && ( (HTRwdcount-NDAQ-NTP-paddingsize) != 12) )
924  ||
925  (!CM && ( (HTRwdcount-NDAQ-NTP-paddingsize) != 20) ) ) { //incompatible Sizes declared. Skip it.
926  ++HalfHTRDataCorruptionIndicators_[fed3offset+2][spg3offset+1];
927  mapHTRproblem(dcc_,spigot);
928  continue;} }
929 
930  if (htr.isHistogramEvent()) continue;
931 
932  //We trust the data now. Finish with the check against DCCHeader
933  unsigned int htrOrN = htr.getOrbitNumber();
934  unsigned int htrBCN = htr.getBunchNumber();
935  unsigned int htrEvtN = htr.getL1ANumber();
936  meBCN_->Fill(htrBCN); //The only periodic number for whole events.
937 
938  if (( (htrOrN == dccOrN ) &&
939  (htrBCN == (unsigned int) dccBCN) )
940  != (dccHeader->getBxMismatchWithDCC(spigot)) ){
941  meDCCEventFormatError_->Fill(dccid,5);
942  mapHTRproblem(dcc_,spigot);
943  if (debug_>0)std::cout <<"Orbit or BCN HTR/DCC mismatch"<<std::endl;
944  }
945  if ( (htrEvtN == dccEvtNum) !=
946  dccHeader->getSpigotValid(spigot) ) {
947  meDCCEventFormatError_->Fill(dccid,5);
948  mapHTRproblem(dcc_,spigot);
949  if (debug_>0)std::cout <<"DCC invalid spigot"<<std::endl;
950  }
951  int cratenum = htr.readoutVMECrateId();
952  float slotnum = htr.htrSlot() + 0.5*htr.htrTopBottom();
953  if (debug_ > 0) HTRPrint(htr,debug_);
954  unsigned int htrFWVer = htr.getFirmwareRevision() & 0xFF;
955  meHTRFWVersion_->Fill(cratenum,htrFWVer);
956 
958  int EvtNdiff = htrEvtN - dccEvtNum;
959  if (EvtNdiff!=0) {
960  meEvtNumberSynch_->Fill(dccid,spigot);
961  mapHTRproblem(dcc_,spigot);
962  meEvtNCheck_->Fill(EvtNdiff);
963  if (debug_ == 1)std::cout << "++++ Evt # out of sync, ref, this HTR: "<< dccEvtNum << " "<<htrEvtN <<std::endl;
964  }
965 
967  int BCNdiff = htrBCN-dccBCN;
968  if ((BCNdiff!=0)
969  //TESTME_HCALRAWDATA//
970  //|| ((dccid==727) && (spigot==8) && (dccEvtNum%3==0))
971  ){
972  meBCNSynch_->Fill(dccid,spigot);
973  mapHTRproblem(dcc_,spigot);
974  meBCNCheck_->Fill(BCNdiff);
975  if (debug_==1)std::cout << "++++ BCN # out of sync, ref, this HTR: "<< dccBCN << " "<<htrBCN <<std::endl;
976  }
977 
979  int OrNdiff = htrOrN-dccOrN;
980  if (OrNdiff!=0) {
981  meOrNSynch_->Fill(dccid,spigot);
982  mapHTRproblem(dcc_,spigot);
983  meOrNCheck_->Fill(OrNdiff);
984  meBCNwhenOrNDiff_->Fill(htrBCN); // Are there special BCN where OrN mismatched occur? Let's see.
985  if (debug_==1)std::cout << "++++ OrN # out of sync, ref, this HTR: "<< dccOrN << " "<<htrOrN <<std::endl;
986  }
987 
988  bool htrUnSuppressed=(HTRraw[6]>>15 & 0x0001);
989  if (htrUnSuppressed) {
990  UScount[dcc_][spigot]++;
991  int here=1+(HcalDCCHeader::SPIGOT_COUNT*(dcc_))+spigot;
992  meUSFractSpigs_->Fill(here,
993  ((double)UScount[dcc_][spigot]));}
994 
995  MonitorElement* tmpErr = 0;
996  HcalDetId HDI = hashedHcalDetId_[hashup(dcc_,spigot)];
997  if (HDI != HcalDetId::Undefined) {
998  switch (HDI.subdetId()) {
999  case (HcalBarrel): {
1000  tmpErr = HTR_StatusWd_HBHE;
1001  } break;
1002  case (HcalEndcap): {
1003  tmpErr = HTR_StatusWd_HBHE;
1004  } break;
1005  case (HcalOuter): {
1006  tmpErr = HTR_StatusWd_HO;
1007  } break;
1008  case (HcalForward): {
1009  tmpErr = HTR_StatusWd_HF;
1010  } break;
1011  default: break;
1012  }
1013  }
1014 
1015  int errWord = htr.getErrorsWord() & 0xFFFF;
1016  if ( (((dccHeader->getSpigotSummary( spigot))>>24)&0x00FF)
1017  != (errWord&0x00FF) ){
1018  meDCCEventFormatError_->Fill(dccid,6);//Low 8 bits miscopied into DCCHeader
1019  mapHTRproblem(dcc_,spigot);
1020  if (debug_>0)std::cout <<"DCC spigot summary error or HTR error word"<<std::endl;
1021  //What other problems may lurk? Spooky.
1022  }
1023  if(tmpErr!=NULL){
1024  for(int i=0; i<16; i++){
1025  int errbit = errWord&(0x01<<i);
1026  // Bit 15 should always be 1; consider it an error if it isn't.
1027  if (i==15) errbit = errbit - 0x8000;
1028  if (errbit !=0) {
1029  tmpErr->Fill(i);
1030  //Only certain bits indicate corrupted data:
1031  switch (i) {
1032  case (14): //CT (obsolete Calibration Trigger scheme used)
1033  HalfHTRDataCorruptionIndicators_[fed3offset+0][spg3offset+2]++;
1034  mapHTRproblem(dcc_,spigot);
1035  if (debug_>0)std::cout <<"HTR Problem: Case 14"<<std::endl;
1036  break;
1037  case (13): //HM
1038  HalfHTRDataCorruptionIndicators_[fed3offset+0][spg3offset+1]++;
1039  mapHTRproblem(dcc_,spigot);
1040  if (debug_>0)std::cout <<"HTR Problem: Case 13"<<std::endl;
1041  break;
1042  case (12): //TM
1043  HalfHTRDataCorruptionIndicators_[fed3offset+0][spg3offset+0]++;
1044  mapHTRproblem(dcc_,spigot);
1045  if (debug_>0)std::cout <<"HTR Problem: Case 12"<<std::endl;
1046  break;
1047  case ( 8): //BE
1048  HalfHTRDataCorruptionIndicators_[fed3offset+1][spg3offset+2]++;
1049  mapHTRproblem(dcc_,spigot);
1050  if (debug_>0)std::cout <<"HTR Problem: Case 8"<<std::endl;
1051  break;
1052  case (15): //b15
1053  HalfHTRDataCorruptionIndicators_[fed3offset+1][spg3offset+1]++;
1054  mapHTRproblem(dcc_,spigot);
1055  break;
1056  case ( 7): //CK
1057  HalfHTRDataCorruptionIndicators_[fed3offset+1][spg3offset+0]++;
1058  mapHTRproblem(dcc_,spigot);
1059  if (debug_>0)std::cout <<"HTR Problem: Case 7"<<std::endl;
1060  break;
1061  //\\case ( 5): //LW removed 2010.02.16
1062  //\\ HalfHTRDataCorruptionIndicators_[fed3offset+2][spg3offset+2]++;
1063  //\\ //Sometimes set spuriously at startup, per-fiber, .: Leniency: 8
1064  //\\ if (HalfHTRDataCorruptionIndicators_[fed3offset+2][spg3offset+2] > 8) {
1065  //\\ if (debug_>0)std::cout <<"HTR Problem: Case 5"<<std::endl;
1066  //\\ break;
1067  //\\ }
1068  case ( 3): //L1 (previous L1A violated trigger rules)
1069  DataFlowInd_[fed2offset+1][spg3offset+0]++; break;
1070  case ( 1): //BZ
1071  DataFlowInd_[fed2offset+0][spg3offset+1]++; break;
1072  case ( 0): //OW
1073  DataFlowInd_[fed2offset+0][spg3offset+2]++;
1074  default: break;
1075  }
1076  meStatusWdCrate_->Fill(cratenum,i);
1077  if (cratenum == 0) meCrate0HTRStatus_ -> Fill(slotnum,i);
1078  else if (cratenum == 1) meCrate1HTRStatus_ -> Fill(slotnum,i);
1079  else if (cratenum == 2) meCrate2HTRStatus_ -> Fill(slotnum,i);
1080  else if (cratenum == 3) meCrate3HTRStatus_ -> Fill(slotnum,i);
1081  else if (cratenum == 4) meCrate4HTRStatus_ -> Fill(slotnum,i);
1082  else if (cratenum == 5) meCrate5HTRStatus_ -> Fill(slotnum,i);
1083  else if (cratenum == 6) meCrate6HTRStatus_ -> Fill(slotnum,i);
1084  else if (cratenum == 7) meCrate7HTRStatus_ -> Fill(slotnum,i);
1085  else if (cratenum == 9) meCrate9HTRStatus_ -> Fill(slotnum,i);
1086  else if (cratenum ==10)meCrate10HTRStatus_ -> Fill(slotnum,i);
1087  else if (cratenum ==11)meCrate11HTRStatus_ -> Fill(slotnum,i);
1088  else if (cratenum ==12)meCrate12HTRStatus_ -> Fill(slotnum,i);
1089  else if (cratenum ==13)meCrate13HTRStatus_ -> Fill(slotnum,i);
1090  else if (cratenum ==14)meCrate14HTRStatus_ -> Fill(slotnum,i);
1091  else if (cratenum ==15)meCrate15HTRStatus_ -> Fill(slotnum,i);
1092  else if (cratenum ==17)meCrate17HTRStatus_ -> Fill(slotnum,i);
1093  }
1094  }
1095  }
1096 
1097  // Fish out Front-End Errors from the precision channels
1098  const short unsigned int* daq_first, *daq_last, *tp_first, *tp_last;
1099  const HcalQIESample* qie_begin, *qie_end, *qie_work;
1100 
1101  // get pointers
1102  htr.dataPointers(&daq_first,&daq_last,&tp_first,&tp_last);
1103  qie_begin=(HcalQIESample*)daq_first;
1104  qie_end=(HcalQIESample*)(daq_last+1); // one beyond last..
1105 
1106  //TESTME_HCALRAWDATA//if (dccid==715 && spigot==5 && tevt_%3==0)
1107  //TESTME_HCALRAWDATA// Chann_DataIntegrityCheck_[dcc_][16][spg2offset]++;
1108 
1110  if (htr.getFormatVersion() < 6 ) { //HcalHTRData::FORMAT_VERSION_COMPACT_DATA is 6
1111 
1112  int lastcapid=-1;
1113  int samplecounter=-1;
1114  int htrchan=-1; // Valid: [1,24]
1115  int chn2offset=0;
1116  int NTS = htr.getNDD(); //number time slices, in precision channels
1117 
1118  ChannSumm_DataIntegrityCheck_ [fed2offset-1][spg2offset+0]=-NTS;//For normalization by client - NB! negative!
1119  // Run over DAQ words for this spigot
1120  for (qie_work=qie_begin; qie_work!=qie_end; qie_work++) {
1121  if (qie_work->raw()==0xFFFF) // filler word
1122  continue;
1123  //Beginning a channel's samples?
1124  if (( 1 + ( 3* (qie_work->fiber()-1) ) + qie_work->fiberChan() ) != htrchan) { //new channel starting
1125  // A fiber [1..8] carries three fiber channels, each is [0..2]. Make htrchan [1..24]
1126  htrchan= (3* (qie_work->fiber()-1) ) + qie_work->fiberChan();
1127  chn2offset = (htrchan*3)+1;
1128  --ChannSumm_DataIntegrityCheck_ [fed2offset-1][spg2offset-1];//event tally -- NB! negative!
1129  --Chann_DataIntegrityCheck_[dcc_][chn2offset-1][spg2offset-1];//event tally -- NB! negative!
1130  if (samplecounter !=-1) { //Wrap up the previous channel if there is one
1131  //Check the previous digi for number of timeslices
1132  if (((samplecounter != NTS) &&
1133  (samplecounter != 1) )
1134  //||
1135  //((htrchan==5) && (spigot==5) && (dcc_==5))
1136  )
1137  { //Wrong DigiSize
1138  ++ChannSumm_DataIntegrityCheck_ [fed2offset+0][spg2offset+0];
1139  ++Chann_DataIntegrityCheck_[dcc_][chn2offset+0][spg2offset+0];
1140  mapChannproblem(dcc_,spigot,htrchan);
1141  if (debug_)std::cout <<"mapChannelProblem: Wrong Digi Size"<<std::endl;
1142  }
1143  }
1144  //set up for this new channel
1145  lastcapid=qie_work->capid();
1146  samplecounter=1;} // fi (qie_work->fiberAndChan() != lastfibchan)
1147  else { //precision samples not the first timeslice
1148  int hope = lastcapid +1;// What capid would we hope for here?
1149  if (hope==4) hope = 0; // What capid would we hope for here?
1150  if (qie_work->capid() != hope){
1151  ++ChannSumm_DataIntegrityCheck_ [fed2offset+1][spg2offset+0];
1152  ++Chann_DataIntegrityCheck_[dcc_][chn2offset+1][spg2offset+0];
1153  mapChannproblem(dcc_,spigot,htrchan);
1154  if (debug_)std::cout <<"mapChannelProblem: Wrong Cap ID"<<std::endl;
1155  }
1156  lastcapid=qie_work->capid();
1157  samplecounter++;}
1158  //For every sample, whether the first of the channel or not, !DV, Er
1159  if (!(qie_work->dv())){
1160  ++ChannSumm_DataIntegrityCheck_ [fed2offset+0][spg2offset+1];
1161  ++Chann_DataIntegrityCheck_[dcc_][chn2offset+0][spg2offset+1];
1162  }
1163  if (qie_work->er()) { // FEE - Front End Error
1164  ++ChannSumm_DataIntegrityCheck_ [fed2offset+1][spg2offset+1];
1165  ++Chann_DataIntegrityCheck_[dcc_][chn2offset+1][spg2offset+1];
1166  mapChannproblem(dcc_,spigot,htrchan);
1167  if (debug_)std::cout <<"mapChannelProblem: FE Error"<<std::endl;
1168  }
1169  } // for (qie_work = qie_begin;...) end loop over all timesamples in this spigot
1170  //Wrap up the last channel
1171  //Check the last digi for number of timeslices
1172  if ((samplecounter != NTS) &&
1173  (samplecounter != 1) &&
1174  (samplecounter !=-1) ) { //Wrong DigiSize (unexpected num. timesamples)
1175  ++ChannSumm_DataIntegrityCheck_ [fed2offset+0][spg2offset+0];
1176  ++Chann_DataIntegrityCheck_[dcc_][chn2offset+0][spg2offset+0];
1177  mapChannproblem(dcc_,spigot,htrchan);
1178  if (debug_)std::cout <<"mapChannelProblem: Wrong Digi Size (last digi)"<<std::endl;
1179  }
1180  } else { // this is the branch for unpacking the compact data format with per-channel headers
1181  const unsigned short* ptr_header=daq_first;
1182  const unsigned short* ptr_end=daq_last+1;
1183  int flavor, error_flags, capid0, channelid;
1184  // int samplecounter=-1; // for a digisize check
1185  int htrchan=-1; // Valid: [1,24]
1186  int chn2offset=0;
1187  int NTS = htr.getNDD(); //number time slices, in precision channels
1188  int Nchan = 3; // 3 channels per fiber
1189  while (ptr_header!=ptr_end) {
1190  if (*ptr_header==0xFFFF) { // impossible filler word
1191  ptr_header++;
1192  continue;
1193  }
1194  error_flags = capid0 = channelid = 0;
1195  // unpack the header word
1196  bool isheader=HcalHTRData::unpack_per_channel_header(*ptr_header,flavor,error_flags,capid0,channelid);
1197  if (!isheader) {
1198  ptr_header++;
1199  continue;
1200  }
1201  // A fiber [1..8] carries three fiber channels, each is [0..2]. Make htrchan [1..24]
1202  int fiber = 1 + ((channelid & 0x1C) >> 2); //Mask and shift to get bits [2:4]
1203  int chan = channelid & 0x3; //bits [0:1]
1204  htrchan = ((fiber -1) * Nchan) + chan + 1; //ta-dah! I really wish everything counted from zero...
1205  chn2offset = ((htrchan-1)*3)+1; //For placing the errors on the histogram. Also very tidy. Sorry.
1206  //debug// if (error_flags) std::cout<<fiber<<","<<chan<<" = "<<htrchan<<" @"<<chn2offset<<std::endl;
1207  ChannSumm_DataIntegrityCheck_ [fed2offset-1][spg2offset-1] -= NTS;//event tally -- NB: negative!
1208  Chann_DataIntegrityCheck_[dcc_][chn2offset-1][spg2offset-1] -= NTS;//event tally -- NB: negative!
1209  if (error_flags & 2) { //a CapId violation (non correct rotation)
1210  ++ChannSumm_DataIntegrityCheck_ [fed2offset+1][spg2offset+0];
1211  ++Chann_DataIntegrityCheck_[dcc_][chn2offset+1][spg2offset+0];
1212  mapChannproblem(dcc_,spigot,htrchan);
1213  }
1214  if (error_flags & 1) { //an asserted Link-Error (Er)
1215  ++ChannSumm_DataIntegrityCheck_ [fed2offset+1][spg2offset+1];
1216  ++Chann_DataIntegrityCheck_[dcc_][chn2offset+1][spg2offset+1];
1217  mapChannproblem(dcc_,spigot,htrchan);
1218  }
1219 
1220  for (ptr_header++;
1221  ptr_header!=ptr_end && !HcalHTRData::is_channel_header(*ptr_header);
1222  ptr_header++);
1223  }
1224  }
1225  unsigned int fib1BCN = htr.getFib1OrbMsgBCN();
1226  unsigned int fib2BCN = htr.getFib2OrbMsgBCN();
1227  unsigned int fib3BCN = htr.getFib3OrbMsgBCN();
1228  unsigned int fib4BCN = htr.getFib4OrbMsgBCN();
1229  unsigned int fib5BCN = htr.getFib5OrbMsgBCN();
1230  unsigned int fib6BCN = htr.getFib6OrbMsgBCN();
1231  unsigned int fib7BCN = htr.getFib7OrbMsgBCN();
1232  unsigned int fib8BCN = htr.getFib8OrbMsgBCN();
1233  meFibBCN_->Fill(fib1BCN);
1234  meFibBCN_->Fill(fib2BCN);
1235  meFibBCN_->Fill(fib3BCN);
1236  meFibBCN_->Fill(fib4BCN);
1237  meFibBCN_->Fill(fib5BCN);
1238  meFibBCN_->Fill(fib6BCN);
1239  meFibBCN_->Fill(fib7BCN);
1240  meFibBCN_->Fill(fib8BCN);
1241  // Disable for now?
1242  meFib1OrbMsgBCN_->Fill(slotnum, cratenum, fib1BCN);
1243  meFib2OrbMsgBCN_->Fill(slotnum, cratenum, fib2BCN);
1244  meFib3OrbMsgBCN_->Fill(slotnum, cratenum, fib3BCN);
1245  meFib4OrbMsgBCN_->Fill(slotnum, cratenum, fib4BCN);
1246  meFib5OrbMsgBCN_->Fill(slotnum, cratenum, fib5BCN);
1247  meFib6OrbMsgBCN_->Fill(slotnum, cratenum, fib6BCN);
1248  meFib7OrbMsgBCN_->Fill(slotnum, cratenum, fib7BCN);
1249  meFib8OrbMsgBCN_->Fill(slotnum, cratenum, fib8BCN);
1250 
1251  } // loop over spigots
1252  return;
1253 } // loop over DCCs void HcalRawDataMonitor::unpack(
float ChannSumm_DataIntegrityCheck_[TWO___FED][TWO__SPGT]
unsigned int getFib6OrbMsgBCN() const
Definition: HcalHTRData.h:201
static const HcalDetId Undefined
Definition: HcalDetId.h:50
MonitorElement * meUSFractSpigs_
int i
Definition: DBlmapReader.cc:9
MonitorElement * meBCN_
int getSpigotSummary(int nspigot) const
Definition: HcalDCCHeader.h:82
MonitorElement * meCDFErrorFound_
int getNDD() const
Get the number of daq data samples per channel when not zero-suppressed.
Definition: HcalHTRData.cc:388
unsigned int getFib1OrbMsgBCN() const
Get the BCN of the Fiber Orbit Messages.
Definition: HcalHTRData.h:182
MonitorElement * meCrate7HTRStatus_
MonitorElement * meCrate4HTRStatus_
bool check()
Definition: FEDTrailer.cc:64
unsigned int getSlink64ReservedBits() const
Definition: HcalDCCHeader.h:48
unsigned char getSpigotErrorBits(unsigned int nspigot) const
Access the HTR error bits (decoding tbd)
unsigned int getSpigotDataLength(int nspigot) const
Definition: HcalDCCHeader.h:96
uint16_t raw() const
get the raw word
Definition: HcalQIESample.h:20
bool check() const
Check for a good event Requires a minimum length, matching wordcount and length, not an empty event...
Definition: HcalHTRData.cc:62
MonitorElement * meEvtNumberSynch_
MonitorElement * meCrate3HTRStatus_
unsigned int htrTopBottom() const
HcalElectronicsId-style HTR top/bottom (1=top/0=bottom)
Definition: HcalHTRData.cc:342
MonitorElement * meFib5OrbMsgBCN_
int getAcceptTimeTTS() const
Definition: HcalDCCHeader.h:58
int fiberChan() const
get the fiber channel number
Definition: HcalQIESample.h:34
MonitorElement * meBCNCheck_
MonitorElement * meCrate17HTRStatus_
bool getSpigotCRCError(unsigned int nspigot) const
Read the &quot;CRC-Mismatch&quot; bit for this spigot.
bool moreTrailers()
Definition: FEDTrailer.cc:37
MonitorElement * meCrate13HTRStatus_
bool dv() const
is the Data Valid bit set?
Definition: HcalQIESample.h:28
std::map< int, short > CDFversionNumber_list
MonitorElement * meOrNCheck_
HcalDetId hashedHcalDetId_[NUMDCCS *NUMSPIGS *HTRCHANMAX]
unsigned int getExtHdr6() const
Definition: HcalHTRData.h:226
#define NULL
Definition: scimark2.h:8
unsigned int getFib8OrbMsgBCN() const
Definition: HcalHTRData.h:209
MonitorElement * meCrate2HTRStatus_
std::map< int, short > CDFReservedBits_list
MonitorElement * meBCNSynch_
bool thereIsAThirdCDFHeaderWord() const
Definition: HcalDCCHeader.h:44
static bool unpack_per_channel_header(unsigned short, int &flav, int &error_flags, int &capid0, int &channelid)
Unpack a per-channel header word (compact format)
Definition: HcalHTRData.cc:433
MonitorElement * meCrate14HTRStatus_
int getSpigotData(int nspigot, HcalHTRData &decodeTool, int validSize) const
unsigned char getLRBErrorBits(unsigned int nspigot) const
Access the Link Receiver Board error bits (decoding tbd)
unsigned int getOrbitNumber() const
Get the HTR orbit number.
Definition: HcalHTRData.cc:324
int getFormatVersion() const
Get the version number of this event.
Definition: HcalHTRData.h:33
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
MonitorElement * meCrate15HTRStatus_
void Fill(long long x)
std::map< int, short >::iterator CDFReservedBits_it
unsigned int getOrbitNumber() const
Definition: HcalDCCHeader.h:46
float LRBDataCorruptionIndicators_[THREE_FED][THREE_SPG]
int getBunchId() const
Definition: HcalDCCHeader.h:34
unsigned int htrSlot() const
HcalElectronicsId-style HTR slot.
Definition: HcalHTRData.cc:338
MonitorElement * meCrate6HTRStatus_
std::map< int, short >::iterator DCCEvtFormat_it
static bool is_channel_header(unsigned short value)
check top bit to see if this is a compact format channel header word
Definition: HcalHTRData.h:90
bool getBxMismatchWithDCC(unsigned int nspigot) const
Read the &quot;BxID FAILS TO MATCH WITH DCC&quot; bit for this spigot.
const T & max(const T &a, const T &b)
unsigned int getFib7OrbMsgBCN() const
Definition: HcalHTRData.h:205
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * HTR_StatusWd_HO
MonitorElement * meCrate5HTRStatus_
MonitorElement * meCrate0HTRStatus_
const int getRawLength() const
Get the length of the raw data.
Definition: HcalHTRData.h:39
MonitorElement * meOrNSynch_
int fiber() const
get the fiber number
Definition: HcalQIESample.h:32
bool getSpigotPresent(unsigned int nspigot) const
Read the &quot;PRESENT&quot; bit for this spigot.
MonitorElement * meCrate12HTRStatus_
std::map< int, short >::iterator CDFvers_it
MonitorElement * meFibBCN_
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
MonitorElement * meDCCEventFormatError_
MonitorElement * medccBCN_
unsigned int getFib3OrbMsgBCN() const
Definition: HcalHTRData.h:189
MonitorElement * HTR_StatusWd_HBHE
bool getSpigotEnabled(unsigned int nspigot) const
Read the &quot;ENABLED&quot; bit for this spigot.
Definition: HcalDCCHeader.h:99
MonitorElement * meFib4OrbMsgBCN_
int ttsBits()
Current value of the Trigger Throttling System bitsAQ).
Definition: FEDTrailer.cc:32
MonitorElement * meInvHTRData_
int getSourceId() const
Definition: HcalDCCHeader.h:32
void mapHTRproblem(int dcc, int spigot)
MonitorElement * meEvtNCheck_
MonitorElement * meBCNwhenOrNDiff_
MonitorElement * meFib1OrbMsgBCN_
void HTRPrint(const HcalHTRData &htr, int prtlvl)
unsigned long long uint64_t
Definition: Time.h:15
MonitorElement * meCrate11HTRStatus_
int capid() const
get the Capacitor id
Definition: HcalQIESample.h:26
MonitorElement * meFib8OrbMsgBCN_
unsigned int getFib5OrbMsgBCN() const
Definition: HcalHTRData.h:197
const unsigned short * getRawData() const
Get a pointer to the raw data.
Definition: HcalHTRData.h:36
int lenght()
The length of the event fragment counted in 64-bit words including header and trailer.
Definition: FEDTrailer.cc:17
void dataPointers(const unsigned short **daq_first, const unsigned short **daq_last, const unsigned short **tp_first, const unsigned short **tp_last) const
Obtain the starting and ending pointers for external unpacking of the data.
Definition: HcalHTRData.cc:153
unsigned int getErrorsWord() const
Get the errors word.
Definition: HcalHTRData.h:156
float HalfHTRDataCorruptionIndicators_[THREE_FED][THREE_SPG]
MonitorElement * meCrate1HTRStatus_
unsigned int getExtHdr7() const
Definition: HcalHTRData.h:228
MonitorElement * meStatusWdCrate_
MonitorElement * meFib7OrbMsgBCN_
short BOEshouldBeZeroAlways() const
Definition: HcalDCCHeader.h:50
void mapChannproblem(int dcc, int spigot, int htrchan)
unsigned int readoutVMECrateId() const
HcalElectronicsId-style VME crate number.
Definition: HcalHTRData.cc:346
bool getSpigotValid(unsigned int nspigot) const
Read the &quot;VALID&quot; bit for this spigot; TTC EvN matched HTR EvN.
unsigned int getFib4OrbMsgBCN() const
Definition: HcalHTRData.h:193
static const int SPIGOT_COUNT
Definition: HcalDCCHeader.h:19
uint64_t UScount[NUMDCCS][NUMSPIGS]
MonitorElement * meEvFragSize_
MonitorElement * HTR_StatusWd_HF
unsigned int getBunchNumber() const
Get the HTR bunch number.
Definition: HcalHTRData.h:114
unsigned int getFib2OrbMsgBCN() const
Definition: HcalHTRData.h:185
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
MonitorElement * meFib2OrbMsgBCN_
float Chann_DataIntegrityCheck_[NUMDCCS][TWO_CHANN][TWO__SPGT]
MonitorElement * meEvFragSize2_
bool getSpigotDataTruncated(unsigned int nspigot) const
Read the &quot;TRUNCATED&quot; bit for this spigot; LRB truncated data (took too long)
tuple cout
Definition: gather_cfg.py:121
short getCDFversionNumber() const
Definition: HcalDCCHeader.h:30
short getDCCDataFormatVersion() const
Definition: HcalDCCHeader.h:57
MonitorElement * meDCCVersion_
std::map< int, short > DCCEvtFormat_list
MonitorElement * meCrate10HTRStatus_
unsigned int getFirmwareRevision() const
Get the HTR firmware version.
Definition: HcalHTRData.cc:406
MonitorElement * meHTRFWVersion_
MonitorElement * meFEDRawDataSizes_
unsigned short BOEshouldBe5Always() const
Definition: HcalDCCHeader.h:40
MonitorElement * mefedEntries_
float DataFlowInd_[TWO___FED][THREE_SPG]
unsigned int getL1ANumber() const
Get the HTR event number.
Definition: HcalHTRData.h:110
bool thereIsASecondCDFHeaderWord() const
Definition: HcalDCCHeader.h:28
unsigned long getDCCEventNumber() const
Definition: HcalDCCHeader.h:36
int hashup(uint32_t d=0, uint32_t s=0, uint32_t c=1)
MonitorElement * meFib3OrbMsgBCN_
bool er() const
is the error bit set?
Definition: HcalQIESample.h:30
MonitorElement * meFib6OrbMsgBCN_
bool isHistogramEvent() const
Is this event a histogram event? (do not call standard unpack in this case!!!!!)
Definition: HcalHTRData.cc:385
MonitorElement * meCrate9HTRStatus_
void HcalRawDataMonitor::UpdateMEs ( void  )
private

Definition at line 1390 of file HcalRawDataMonitor.cc.

References Chann_DataIntegrityCheck_, ChannSumm_DataIntegrityCheck_, DataFlowInd_, f, MonitorElement::getBinContent(), HalfHTRDataCorruptionIndicators_, LRBDataCorruptionIndicators_, meChann_DataIntegrityCheck_, meChannSumm_DataIntegrityCheck_, meDataFlowInd_, meHalfHTRDataCorruptionIndicators_, meLRBDataCorruptionIndicators_, HcalBaseDQMonitor::meTevtHist_, NumBadHB, NumBadHE, NumBadHF, NumBadHFLUMI, NumBadHO, NumBadHO0, NumBadHO12, NUMDCCS, MonitorElement::setBinContent(), HcalBaseDQMonitor::tevt_, THREE_FED, THREE_SPG, TWO___FED, TWO__SPGT, TWO_CHANN, x, and detailsBasic3DVector::y.

Referenced by endLuminosityBlock().

1390  {
1391  tevt_=0;
1392  if (meTevtHist_) tevt_= (int)meTevtHist_->getBinContent(1);
1393  NumBadHB=0;
1394  NumBadHE=0;
1395  NumBadHO=0;
1396  NumBadHF=0;
1397  NumBadHFLUMI=0;
1398  NumBadHO0=0;
1399  NumBadHO12=0;
1400 
1401 
1403  for (int x=0; x<THREE_FED; x++)
1404  for (int y=0; y<THREE_SPG; y++)
1407 
1409  for (int x=0; x<THREE_FED; x++)
1410  for (int y=0; y<THREE_SPG; y++)
1413 
1415  for (int x=0; x<TWO___FED; x++)
1416  for (int y=0; y<TWO__SPGT; y++)
1419 
1420  for (int f=0; f<NUMDCCS; f++){
1422  for (int x=0; x<TWO_CHANN; x++)
1423  for (int y=0; y<TWO__SPGT; y++)
1424  if (Chann_DataIntegrityCheck_[f][x][y])
1426  }
1427 
1429  for (int x=0; x<TWO___FED; x++)
1430  for (int y=0; y<THREE_SPG; y++)
1431  if (DataFlowInd_[x][y])
1433 } //UpdateMEs
float ChannSumm_DataIntegrityCheck_[TWO___FED][TWO__SPGT]
void setBinContent(int binx, double content)
set content of bin (1-D)
#define TWO_CHANN
#define THREE_FED
#define NUMDCCS
MonitorElement * meChannSumm_DataIntegrityCheck_
MonitorElement * meDataFlowInd_
float LRBDataCorruptionIndicators_[THREE_FED][THREE_SPG]
#define TWO__SPGT
MonitorElement * meTevtHist_
MonitorElement * meChann_DataIntegrityCheck_[NUMDCCS]
double f[11][100]
#define TWO___FED
MonitorElement * meLRBDataCorruptionIndicators_
float HalfHTRDataCorruptionIndicators_[THREE_FED][THREE_SPG]
#define THREE_SPG
double getBinContent(int binx) const
get content of bin (1-D)
float Chann_DataIntegrityCheck_[NUMDCCS][TWO_CHANN][TWO__SPGT]
Definition: DDAxes.h:10
float DataFlowInd_[TWO___FED][THREE_SPG]
MonitorElement * meHalfHTRDataCorruptionIndicators_
void HcalRawDataMonitor::whosebad ( int  subdet)
protected

Definition at line 1436 of file HcalRawDataMonitor.cc.

1436  {
1437 // if (subdet==HcalBarrel) ++NumBadHB;
1438 // else if (subdet==HcalEndcap) ++NumBadHE;
1439 // else if (subdet==HcalOuter)
1440 // {
1441 // ++NumBadHO;
1442 // if (abs(ieta)<5) ++NumBadHO0;
1443 // else ++NumBadHO12;
1444 // }
1445 // else if (subdet==HcalForward)
1446 // {
1447 // ++NumBadHF;
1448 // if (depth==1 && (abs(ieta)==33 || abs(ieta)==34))
1449 // ++NumBadHFLUMI;
1450 // else if (depth==2 && (abs(ieta)==35 || abs(ieta)==36))
1451 // ++NumBadHFLUMI;
1452 // }
1453 }

Member Data Documentation

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

Definition at line 144 of file HcalRawDataMonitor.h.

Referenced by unpack().

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

Definition at line 143 of file HcalRawDataMonitor.h.

Referenced by unpack().

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

Definition at line 142 of file HcalRawDataMonitor.h.

Referenced by unpack().

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

Definition at line 141 of file HcalRawDataMonitor.h.

Referenced by unpack().

float HcalRawDataMonitor::Chann_DataIntegrityCheck_[NUMDCCS][TWO_CHANN][TWO__SPGT]
private

Definition at line 122 of file HcalRawDataMonitor.h.

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

float HcalRawDataMonitor::ChannSumm_DataIntegrityCheck_[TWO___FED][TWO__SPGT]
private

Definition at line 121 of file HcalRawDataMonitor.h.

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

float HcalRawDataMonitor::DataFlowInd_[TWO___FED][THREE_SPG]
private

Definition at line 123 of file HcalRawDataMonitor.h.

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

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

Definition at line 146 of file HcalRawDataMonitor.h.

Referenced by unpack().

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

Definition at line 145 of file HcalRawDataMonitor.h.

Referenced by unpack().

edm::InputTag HcalRawDataMonitor::digiLabel_
protected

Definition at line 58 of file HcalRawDataMonitor.h.

Referenced by analyze(), and HcalRawDataMonitor().

bool HcalRawDataMonitor::excludeHORing2_
private
edm::InputTag HcalRawDataMonitor::FEDRawDataCollection_
protected

Definition at line 57 of file HcalRawDataMonitor.h.

Referenced by analyze(), and HcalRawDataMonitor().

float HcalRawDataMonitor::HalfHTRDataCorruptionIndicators_[THREE_FED][THREE_SPG]
private

Definition at line 119 of file HcalRawDataMonitor.h.

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

HcalDetId HcalRawDataMonitor::hashedHcalDetId_[NUMDCCS *NUMSPIGS *HTRCHANMAX]
private

Definition at line 135 of file HcalRawDataMonitor.h.

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

MonitorElement* HcalRawDataMonitor::HTR_StatusWd_HBHE
private

Definition at line 173 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::HTR_StatusWd_HF
private

Definition at line 174 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::HTR_StatusWd_HO
private

Definition at line 175 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

float HcalRawDataMonitor::LRBDataCorruptionIndicators_[THREE_FED][THREE_SPG]
private

Definition at line 120 of file HcalRawDataMonitor.h.

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

MonitorElement* HcalRawDataMonitor::meBCN_
private

Definition at line 154 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meBCNCheck_
private

Definition at line 156 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meBCNSynch_
private

Definition at line 157 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meBCNwhenOrNDiff_
private

Definition at line 164 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCDFErrorFound_
private

Definition at line 150 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED00_
private

Definition at line 83 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED01_
private

Definition at line 84 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED02_
private

Definition at line 85 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED03_
private

Definition at line 86 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED04_
private

Definition at line 87 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED05_
private

Definition at line 88 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED06_
private

Definition at line 89 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED07_
private

Definition at line 90 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED08_
private

Definition at line 91 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED09_
private

Definition at line 92 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED10_
private

Definition at line 93 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED11_
private

Definition at line 94 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED12_
private

Definition at line 95 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED13_
private

Definition at line 96 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED14_
private

Definition at line 97 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED15_
private

Definition at line 98 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED16_
private

Definition at line 99 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED17_
private

Definition at line 100 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED18_
private

Definition at line 101 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED19_
private

Definition at line 102 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED20_
private

Definition at line 103 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED21_
private

Definition at line 104 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED22_
private

Definition at line 105 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED23_
private

Definition at line 106 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED24_
private

Definition at line 107 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED25_
private

Definition at line 108 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED26_
private

Definition at line 109 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED27_
private

Definition at line 110 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED28_
private

Definition at line 111 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED29_
private

Definition at line 112 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED30_
private

Definition at line 113 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meCh_DataIntegrityFED31_
private

Definition at line 114 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor().

MonitorElement* HcalRawDataMonitor::meChann_DataIntegrityCheck_[NUMDCCS]
private

Definition at line 116 of file HcalRawDataMonitor.h.

Referenced by HcalRawDataMonitor(), processEvent(), setup(), and UpdateMEs().

MonitorElement* HcalRawDataMonitor::meChannSumm_DataIntegrityCheck_
private

Definition at line 127 of file HcalRawDataMonitor.h.

Referenced by processEvent(), setup(), and UpdateMEs().

MonitorElement* HcalRawDataMonitor::meCrate0HTRStatus_
private

Definition at line 182 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCrate10HTRStatus_
private

Definition at line 191 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCrate11HTRStatus_
private

Definition at line 192 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCrate12HTRStatus_
private

Definition at line 193 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCrate13HTRStatus_
private

Definition at line 194 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCrate14HTRStatus_
private

Definition at line 195 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCrate15HTRStatus_
private

Definition at line 196 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCrate17HTRStatus_
private

Definition at line 197 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCrate1HTRStatus_
private

Definition at line 183 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCrate2HTRStatus_
private

Definition at line 184 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCrate3HTRStatus_
private

Definition at line 185 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCrate4HTRStatus_
private

Definition at line 186 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCrate5HTRStatus_
private

Definition at line 187 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCrate6HTRStatus_
private

Definition at line 188 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCrate7HTRStatus_
private

Definition at line 189 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meCrate9HTRStatus_
private

Definition at line 190 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meDataFlowInd_
private

Definition at line 128 of file HcalRawDataMonitor.h.

Referenced by processEvent(), setup(), and UpdateMEs().

MonitorElement* HcalRawDataMonitor::medccBCN_
private

Definition at line 155 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meDCCEventFormatError_
private

Definition at line 151 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meDCCVersion_
private

Definition at line 170 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meEvFragSize2_
private

Definition at line 169 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meEvFragSize_
private

Definition at line 168 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meEvtNCheck_
private

Definition at line 159 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meEvtNumberSynch_
private

Definition at line 160 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::mefedEntries_
private

Definition at line 166 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meFEDRawDataSizes_
private

Definition at line 167 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meFib1OrbMsgBCN_
private

Definition at line 201 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meFib2OrbMsgBCN_
private

Definition at line 202 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meFib3OrbMsgBCN_
private

Definition at line 203 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meFib4OrbMsgBCN_
private

Definition at line 204 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meFib5OrbMsgBCN_
private

Definition at line 205 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meFib6OrbMsgBCN_
private

Definition at line 206 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meFib7OrbMsgBCN_
private

Definition at line 207 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meFib8OrbMsgBCN_
private

Definition at line 208 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meFibBCN_
private

Definition at line 178 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meHalfHTRDataCorruptionIndicators_
private

Definition at line 125 of file HcalRawDataMonitor.h.

Referenced by processEvent(), setup(), and UpdateMEs().

MonitorElement* HcalRawDataMonitor::meHTRFWVersion_
private

Definition at line 200 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meInvHTRData_
private

Definition at line 177 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meLRBDataCorruptionIndicators_
private

Definition at line 126 of file HcalRawDataMonitor.h.

Referenced by processEvent(), setup(), and UpdateMEs().

MonitorElement* HcalRawDataMonitor::meOrNCheck_
private

Definition at line 162 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meOrNSynch_
private

Definition at line 163 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meStatusWdCrate_
private

Definition at line 176 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

MonitorElement* HcalRawDataMonitor::meUSFractSpigs_
private

Definition at line 199 of file HcalRawDataMonitor.h.

Referenced by setup(), and unpack().

int HcalRawDataMonitor::NumBadHB
private

Definition at line 210 of file HcalRawDataMonitor.h.

Referenced by analyze(), endLuminosityBlock(), reset(), and UpdateMEs().

int HcalRawDataMonitor::NumBadHE
private

Definition at line 210 of file HcalRawDataMonitor.h.

Referenced by analyze(), endLuminosityBlock(), reset(), and UpdateMEs().

int HcalRawDataMonitor::NumBadHF
private

Definition at line 210 of file HcalRawDataMonitor.h.

Referenced by analyze(), endLuminosityBlock(), reset(), and UpdateMEs().

int HcalRawDataMonitor::NumBadHFLUMI
private

Definition at line 210 of file HcalRawDataMonitor.h.

Referenced by analyze(), endLuminosityBlock(), reset(), and UpdateMEs().

int HcalRawDataMonitor::NumBadHO
private

Definition at line 210 of file HcalRawDataMonitor.h.

Referenced by analyze(), endLuminosityBlock(), reset(), and UpdateMEs().

int HcalRawDataMonitor::NumBadHO0
private

Definition at line 210 of file HcalRawDataMonitor.h.

Referenced by analyze(), endLuminosityBlock(), reset(), and UpdateMEs().

int HcalRawDataMonitor::NumBadHO12
private

Definition at line 210 of file HcalRawDataMonitor.h.

Referenced by analyze(), endLuminosityBlock(), reset(), and UpdateMEs().

uint64_t HcalRawDataMonitor::problemcount[ETABINS][PHIBINS][DEPTHBINS]
protected

Definition at line 75 of file HcalRawDataMonitor.h.

Referenced by analyze(), processEvent(), and reset().

bool HcalRawDataMonitor::problemfound[ETABINS][PHIBINS][DEPTHBINS]
protected
const HcalElectronicsMap* HcalRawDataMonitor::readoutMap_
protected

Definition at line 63 of file HcalRawDataMonitor.h.

Referenced by beginRun().

edm::EDGetTokenT<FEDRawDataCollection> HcalRawDataMonitor::tok_raw_
protected

Definition at line 60 of file HcalRawDataMonitor.h.

Referenced by analyze(), and HcalRawDataMonitor().

edm::EDGetTokenT<HcalUnpackerReport> HcalRawDataMonitor::tok_unpack_
protected

Definition at line 61 of file HcalRawDataMonitor.h.

Referenced by analyze(), and HcalRawDataMonitor().

uint64_t HcalRawDataMonitor::uniqcounter[ETABINS][PHIBINS][DEPTHBINS]
protected

Definition at line 73 of file HcalRawDataMonitor.h.

Referenced by analyze(), endLuminosityBlock(), and reset().

uint64_t HcalRawDataMonitor::UScount[NUMDCCS][NUMSPIGS]
private

Definition at line 118 of file HcalRawDataMonitor.h.

Referenced by reset(), and unpack().