CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalUnpackerReport.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_HCALDIGI_HCALUNPACKERREPORT_H
2 #define DATAFORMATS_HCALDIGI_HCALUNPACKERREPORT_H 1
3 
4 #include <vector>
5 #include <map>
9 
17 public:
19  const std::vector<int>& getFedsUnpacked() const { return FEDsUnpacked_; }
20  const std::vector<int>& getFedsError() const { return FEDsError_; }
21  bool errorFree() const;
22  bool anyValidHCAL() const;
23  int unmappedDigis() const { return unmappedDigis_; }
24  int unmappedTPDigis() const { return unmappedTPDigis_; }
25  int spigotFormatErrors() const { return spigotFormatErrors_; }
26  int badQualityDigis() const { return badqualityDigis_; }
27  int totalDigis() const { return totalDigis_; }
28  int totalTPDigis() const { return totalTPDigis_; }
29  int totalHOTPDigis() const { return totalHOTPDigis_; }
30  bool unsuppressedChannels() const { return unsuppressed_; }
31 
32  bool hasFedWithCalib() const { return !fedInfo_.empty(); }
33  HcalCalibrationEventType fedCalibType(uint16_t fed) const;
34 
35  void setFedCalibInfo(uint16_t fed, HcalCalibrationEventType ctype);
36 
37  typedef std::vector<DetId> DetIdVector;
38  typedef std::vector<HcalElectronicsId> ElectronicsIdVector;
39 
40  DetIdVector::const_iterator bad_quality_begin() const { return badqualityIds_.begin(); }
41  DetIdVector::const_iterator bad_quality_end() const { return badqualityIds_.end(); }
42  ElectronicsIdVector::const_iterator unmapped_begin() const { return unmappedIds_.begin(); }
43  ElectronicsIdVector::const_iterator unmapped_end() const { return unmappedIds_.end(); }
44 
45  bool hasReportInfo(const std::string& name) const;
46  std::string getReportInfo(const std::string& name) const;
47  std::vector<std::string> getReportKeys() const;
48 
49  // setters
50  void addUnpacked(int fed);
51  void addError(int fed);
52  void countDigi();
53  void countTPDigi(bool ho=false);
54  void countUnmappedDigi();
55  void countUnmappedTPDigi();
57  void countBadQualityDigi();
58  void countUnmappedDigi(const HcalElectronicsId& eid);
59  void countUnmappedTPDigi(const HcalElectronicsId& eid);
60  void countBadQualityDigi(const DetId& did);
61  void setUnsuppressed(bool isSup);
62  void setReportInfo(const std::string& name, const std::string& value);
63 private:
64  std::vector<int> FEDsUnpacked_;
65  std::vector<int> FEDsError_;
72 
73  std::vector<std::string> reportInfo_;
74  std::vector<uint16_t> fedInfo_; // first is fed, second is type
75 
76 };
77 
78 #endif
std::vector< std::string > reportInfo_
int spigotFormatErrors() const
ElectronicsIdVector::const_iterator unmapped_begin() const
std::vector< int > FEDsError_
ElectronicsIdVector::const_iterator unmapped_end() const
std::vector< int > FEDsUnpacked_
bool unsuppressedChannels() const
const std::vector< int > & getFedsUnpacked() const
std::vector< std::string > getReportKeys() const
void setFedCalibInfo(uint16_t fed, HcalCalibrationEventType ctype)
void setUnsuppressed(bool isSup)
bool anyValidHCAL() const
const std::vector< int > & getFedsError() const
std::vector< uint16_t > fedInfo_
HcalCalibrationEventType
ElectronicsIdVector unmappedIds_
int totalTPDigis() const
DetIdVector badqualityIds_
int unmappedTPDigis() const
bool hasReportInfo(const std::string &name) const
DetIdVector::const_iterator bad_quality_begin() const
int totalHOTPDigis() const
bool hasFedWithCalib() const
void countTPDigi(bool ho=false)
Definition: DetId.h:20
std::string getReportInfo(const std::string &name) const
int badQualityDigis() const
std::vector< HcalElectronicsId > ElectronicsIdVector
int unmappedDigis() const
void setReportInfo(const std::string &name, const std::string &value)
std::vector< DetId > DetIdVector
void addUnpacked(int fed)
Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...
DetIdVector::const_iterator bad_quality_end() const
HcalCalibrationEventType fedCalibType(uint16_t fed) const