CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
HcalUnpackerReport Class Reference

#include <HcalUnpackerReport.h>

Public Types

typedef std::vector< DetIdDetIdVector
 
typedef std::vector< HcalElectronicsIdElectronicsIdVector
 

Public Member Functions

void addError (int fed)
 
void addUnpacked (int fed)
 
bool anyValidHCAL () const
 
DetIdVector::const_iterator bad_quality_begin () const
 
DetIdVector::const_iterator bad_quality_end () const
 
int badQualityDigis () const
 
int busySpigots () const
 
void countBadQualityDigi ()
 
void countBadQualityDigi (const DetId &did)
 
void countBusySpigot ()
 
void countDigi ()
 
void countEmptyEventSpigot ()
 
void countOFWSpigot ()
 
void countSpigotFormatError ()
 
void countTPDigi (bool ho=false)
 
void countUnmappedDigi ()
 
void countUnmappedDigi (const HcalElectronicsId &eid)
 
void countUnmappedTPDigi ()
 
void countUnmappedTPDigi (const HcalElectronicsId &eid)
 
int emptyEventSpigots () const
 
bool errorFree () const
 
HcalCalibrationEventType fedCalibType (uint16_t fed) const
 
const std::vector< int > & getFedsError () const
 
const std::vector< int > & getFedsUnpacked () const
 
std::string getReportInfo (const std::string &name) const
 
std::vector< std::string > getReportKeys () const
 
bool hasFedWithCalib () const
 
bool hasReportInfo (const std::string &name) const
 
 HcalUnpackerReport ()
 
int OFWSpigots () const
 
void setFedCalibInfo (uint16_t fed, HcalCalibrationEventType ctype)
 
void setReportInfo (const std::string &name, const std::string &value)
 
void setUnsuppressed (bool isSup)
 
int spigotFormatErrors () const
 
int totalDigis () const
 
int totalHOTPDigis () const
 
int totalTPDigis () const
 
ElectronicsIdVector::const_iterator unmapped_begin () const
 
ElectronicsIdVector::const_iterator unmapped_end () const
 
int unmappedDigis () const
 
int unmappedTPDigis () const
 
bool unsuppressedChannels () const
 

Private Attributes

int badqualityDigis_
 
DetIdVector badqualityIds_
 
int busySpigots_
 
int emptyEventSpigots_
 
std::vector< uint16_t > fedInfo_
 
std::vector< int > FEDsError_
 
std::vector< int > FEDsUnpacked_
 
int ofwSpigots_
 
std::vector< std::string > reportInfo_
 
int spigotFormatErrors_
 
int totalDigis_
 
int totalHOTPDigis_
 
int totalTPDigis_
 
int unmappedDigis_
 
ElectronicsIdVector unmappedIds_
 
int unmappedTPDigis_
 
bool unsuppressed_
 

Detailed Description

Author
J. Mans - Minnesota

Definition at line 14 of file HcalUnpackerReport.h.

Member Typedef Documentation

◆ DetIdVector

typedef std::vector<DetId> HcalUnpackerReport::DetIdVector

Definition at line 39 of file HcalUnpackerReport.h.

◆ ElectronicsIdVector

Definition at line 40 of file HcalUnpackerReport.h.

Constructor & Destructor Documentation

◆ HcalUnpackerReport()

HcalUnpackerReport::HcalUnpackerReport ( )

Definition at line 3 of file HcalUnpackerReport.cc.

4  : unmappedDigis_(0),
8  totalDigis_(0),
9  totalTPDigis_(0),
10  totalHOTPDigis_(0),
11  unsuppressed_(false),
13  ofwSpigots_(0),
14  busySpigots_(0) {}

Member Function Documentation

◆ addError()

void HcalUnpackerReport::addError ( int  fed)

Definition at line 22 of file HcalUnpackerReport.cc.

22 { FEDsError_.push_back(fed); }

References FEDsError_.

◆ addUnpacked()

void HcalUnpackerReport::addUnpacked ( int  fed)

Definition at line 20 of file HcalUnpackerReport.cc.

20 { FEDsUnpacked_.push_back(fed); }

References FEDsUnpacked_.

◆ anyValidHCAL()

bool HcalUnpackerReport::anyValidHCAL ( ) const

Definition at line 18 of file HcalUnpackerReport.cc.

18 { return !FEDsUnpacked_.empty(); }

References FEDsUnpacked_.

◆ bad_quality_begin()

DetIdVector::const_iterator HcalUnpackerReport::bad_quality_begin ( ) const
inline

Definition at line 42 of file HcalUnpackerReport.h.

42 { return badqualityIds_.begin(); }

References badqualityIds_.

Referenced by NoCQTask::_process(), and RawTask::_process().

◆ bad_quality_end()

DetIdVector::const_iterator HcalUnpackerReport::bad_quality_end ( ) const
inline

Definition at line 43 of file HcalUnpackerReport.h.

43 { return badqualityIds_.end(); }

References badqualityIds_.

Referenced by NoCQTask::_process(), and RawTask::_process().

◆ badQualityDigis()

int HcalUnpackerReport::badQualityDigis ( ) const
inline

Definition at line 24 of file HcalUnpackerReport.h.

24 { return badqualityDigis_; }

References badqualityDigis_.

Referenced by RawTask::_process().

◆ busySpigots()

int HcalUnpackerReport::busySpigots ( ) const
inline

Definition at line 30 of file HcalUnpackerReport.h.

30 { return busySpigots_; }

References busySpigots_.

◆ countBadQualityDigi() [1/2]

void HcalUnpackerReport::countBadQualityDigi ( )

Definition at line 39 of file HcalUnpackerReport.cc.

39 { badqualityDigis_++; }

References badqualityDigis_.

◆ countBadQualityDigi() [2/2]

void HcalUnpackerReport::countBadQualityDigi ( const DetId did)

Definition at line 40 of file HcalUnpackerReport.cc.

40  {
42  badqualityIds_.push_back(id);
43 }

References badqualityDigis_, and badqualityIds_.

◆ countBusySpigot()

void HcalUnpackerReport::countBusySpigot ( )

Definition at line 37 of file HcalUnpackerReport.cc.

37 { busySpigots_++; }

References busySpigots_.

◆ countDigi()

void HcalUnpackerReport::countDigi ( )

Definition at line 24 of file HcalUnpackerReport.cc.

24 { totalDigis_++; }

References totalDigis_.

◆ countEmptyEventSpigot()

void HcalUnpackerReport::countEmptyEventSpigot ( )

Definition at line 35 of file HcalUnpackerReport.cc.

35 { emptyEventSpigots_++; }

References emptyEventSpigots_.

◆ countOFWSpigot()

void HcalUnpackerReport::countOFWSpigot ( )

Definition at line 36 of file HcalUnpackerReport.cc.

36 { ofwSpigots_++; }

References ofwSpigots_.

◆ countSpigotFormatError()

void HcalUnpackerReport::countSpigotFormatError ( )

Definition at line 34 of file HcalUnpackerReport.cc.

References spigotFormatErrors_.

◆ countTPDigi()

void HcalUnpackerReport::countTPDigi ( bool  ho = false)

Definition at line 25 of file HcalUnpackerReport.cc.

25  {
26  if (ho)
28  else
29  totalTPDigis_++;
30 }

References photonIsolationHIProducer_cfi::ho, totalHOTPDigis_, and totalTPDigis_.

◆ countUnmappedDigi() [1/2]

void HcalUnpackerReport::countUnmappedDigi ( )

Definition at line 32 of file HcalUnpackerReport.cc.

32 { unmappedDigis_++; }

References unmappedDigis_.

◆ countUnmappedDigi() [2/2]

void HcalUnpackerReport::countUnmappedDigi ( const HcalElectronicsId eid)

Definition at line 44 of file HcalUnpackerReport.cc.

44  {
46  unmappedIds_.push_back(eid);
47 }

References runTauDisplay::eid, unmappedDigis_, and unmappedIds_.

◆ countUnmappedTPDigi() [1/2]

void HcalUnpackerReport::countUnmappedTPDigi ( )

Definition at line 33 of file HcalUnpackerReport.cc.

33 { unmappedTPDigis_++; }

References unmappedTPDigis_.

◆ countUnmappedTPDigi() [2/2]

void HcalUnpackerReport::countUnmappedTPDigi ( const HcalElectronicsId eid)

Definition at line 48 of file HcalUnpackerReport.cc.

48  {
50  unmappedIds_.push_back(eid);
51 }

References runTauDisplay::eid, unmappedIds_, and unmappedTPDigis_.

◆ emptyEventSpigots()

int HcalUnpackerReport::emptyEventSpigots ( ) const
inline

Definition at line 28 of file HcalUnpackerReport.h.

28 { return emptyEventSpigots_; }

References emptyEventSpigots_.

◆ errorFree()

bool HcalUnpackerReport::errorFree ( ) const

Definition at line 16 of file HcalUnpackerReport.cc.

16 { return FEDsError_.empty() && spigotFormatErrors_ == 0; }

References FEDsError_, and spigotFormatErrors_.

◆ fedCalibType()

HcalCalibrationEventType HcalUnpackerReport::fedCalibType ( uint16_t  fed) const

Definition at line 53 of file HcalUnpackerReport.cc.

53  {
55  uint16_t retval = 0;
56  for (i = 0; i < fedInfo_.size(); i += 2)
57  if (fedInfo_[i] == fed) {
58  retval = fedInfo_[i + 1];
59  break;
60  }
61  return HcalCalibrationEventType(retval);
62 }

References fedInfo_, and mps_fire::i.

◆ getFedsError()

const std::vector<int>& HcalUnpackerReport::getFedsError ( ) const
inline

Definition at line 18 of file HcalUnpackerReport.h.

18 { return FEDsError_; }

References FEDsError_.

◆ getFedsUnpacked()

const std::vector<int>& HcalUnpackerReport::getFedsUnpacked ( ) const
inline

Definition at line 17 of file HcalUnpackerReport.h.

17 { return FEDsUnpacked_; }

References FEDsUnpacked_.

◆ getReportInfo()

std::string HcalUnpackerReport::getReportInfo ( const std::string &  name) const

Definition at line 93 of file HcalUnpackerReport.cc.

93  {
94  std::string searchFor = name + ReportSeparator;
95  std::vector<std::string>::const_iterator i;
96  for (i = reportInfo_.begin(); i != reportInfo_.end(); i++)
97  if (i->find(searchFor) == 0)
98  break;
99  std::string retval;
100  if (i != reportInfo_.end()) {
101  retval = i->substr(searchFor.length());
102  }
103  return retval;
104 }

References mps_fire::i, Skims_PA_cff::name, reportInfo_, ReportSeparator(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ getReportKeys()

std::vector< std::string > HcalUnpackerReport::getReportKeys ( ) const

Definition at line 106 of file HcalUnpackerReport.cc.

106  {
107  std::vector<std::string> retval;
108  std::vector<std::string>::const_iterator i;
109  for (i = reportInfo_.begin(); i != reportInfo_.end(); i++)
110  retval.push_back(i->substr(0, i->find(ReportSeparator)));
111  return retval;
112 }

References mps_fire::i, reportInfo_, and ReportSeparator().

◆ hasFedWithCalib()

bool HcalUnpackerReport::hasFedWithCalib ( ) const
inline

Definition at line 34 of file HcalUnpackerReport.h.

34 { return !fedInfo_.empty(); }

References fedInfo_.

◆ hasReportInfo()

bool HcalUnpackerReport::hasReportInfo ( const std::string &  name) const

Definition at line 85 of file HcalUnpackerReport.cc.

85  {
86  std::string searchFor = name + ReportSeparator;
87  std::vector<std::string>::const_iterator i;
88  for (i = reportInfo_.begin(); i != reportInfo_.end(); i++)
89  if (i->find(searchFor) == 0)
90  break;
91  return (i != reportInfo_.end());
92 }

References mps_fire::i, Skims_PA_cff::name, reportInfo_, ReportSeparator(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ OFWSpigots()

int HcalUnpackerReport::OFWSpigots ( ) const
inline

Definition at line 29 of file HcalUnpackerReport.h.

29 { return ofwSpigots_; }

References ofwSpigots_.

◆ setFedCalibInfo()

void HcalUnpackerReport::setFedCalibInfo ( uint16_t  fed,
HcalCalibrationEventType  ctype 
)

Definition at line 64 of file HcalUnpackerReport.cc.

64  {
66  for (i = 0; i < fedInfo_.size(); i += 2)
67  if (fedInfo_[i] == fed) {
68  fedInfo_[i + 1] = uint16_t(ctype);
69  break;
70  }
71  if (i >= fedInfo_.size()) {
72  fedInfo_.push_back(fed);
73  fedInfo_.push_back(uint16_t(ctype));
74  }
75 }

References fedInfo_, and mps_fire::i.

◆ setReportInfo()

void HcalUnpackerReport::setReportInfo ( const std::string &  name,
const std::string &  value 
)

Definition at line 81 of file HcalUnpackerReport.cc.

81  {
82  reportInfo_.push_back(name + "==>" + value);
83 }

References Skims_PA_cff::name, and reportInfo_.

◆ setUnsuppressed()

void HcalUnpackerReport::setUnsuppressed ( bool  isSup)

Definition at line 77 of file HcalUnpackerReport.cc.

77 { unsuppressed_ = isSup; }

References unsuppressed_.

◆ spigotFormatErrors()

int HcalUnpackerReport::spigotFormatErrors ( ) const
inline

Definition at line 23 of file HcalUnpackerReport.h.

23 { return spigotFormatErrors_; }

References spigotFormatErrors_.

◆ totalDigis()

int HcalUnpackerReport::totalDigis ( ) const
inline

Definition at line 25 of file HcalUnpackerReport.h.

25 { return totalDigis_; }

References totalDigis_.

◆ totalHOTPDigis()

int HcalUnpackerReport::totalHOTPDigis ( ) const
inline

Definition at line 27 of file HcalUnpackerReport.h.

27 { return totalHOTPDigis_; }

References totalHOTPDigis_.

◆ totalTPDigis()

int HcalUnpackerReport::totalTPDigis ( ) const
inline

Definition at line 26 of file HcalUnpackerReport.h.

26 { return totalTPDigis_; }

References totalTPDigis_.

◆ unmapped_begin()

ElectronicsIdVector::const_iterator HcalUnpackerReport::unmapped_begin ( ) const
inline

Definition at line 44 of file HcalUnpackerReport.h.

44 { return unmappedIds_.begin(); }

References unmappedIds_.

◆ unmapped_end()

ElectronicsIdVector::const_iterator HcalUnpackerReport::unmapped_end ( ) const
inline

Definition at line 45 of file HcalUnpackerReport.h.

45 { return unmappedIds_.end(); }

References unmappedIds_.

◆ unmappedDigis()

int HcalUnpackerReport::unmappedDigis ( ) const
inline

Definition at line 21 of file HcalUnpackerReport.h.

21 { return unmappedDigis_; }

References unmappedDigis_.

◆ unmappedTPDigis()

int HcalUnpackerReport::unmappedTPDigis ( ) const
inline

Definition at line 22 of file HcalUnpackerReport.h.

22 { return unmappedTPDigis_; }

References unmappedTPDigis_.

◆ unsuppressedChannels()

bool HcalUnpackerReport::unsuppressedChannels ( ) const
inline

Definition at line 32 of file HcalUnpackerReport.h.

32 { return unsuppressed_; }

References unsuppressed_.

Member Data Documentation

◆ badqualityDigis_

int HcalUnpackerReport::badqualityDigis_
private

Definition at line 73 of file HcalUnpackerReport.h.

Referenced by badQualityDigis(), and countBadQualityDigi().

◆ badqualityIds_

DetIdVector HcalUnpackerReport::badqualityIds_
private

Definition at line 75 of file HcalUnpackerReport.h.

Referenced by bad_quality_begin(), bad_quality_end(), and countBadQualityDigi().

◆ busySpigots_

int HcalUnpackerReport::busySpigots_
private

Definition at line 82 of file HcalUnpackerReport.h.

Referenced by busySpigots(), and countBusySpigot().

◆ emptyEventSpigots_

int HcalUnpackerReport::emptyEventSpigots_
private

Definition at line 82 of file HcalUnpackerReport.h.

Referenced by countEmptyEventSpigot(), and emptyEventSpigots().

◆ fedInfo_

std::vector<uint16_t> HcalUnpackerReport::fedInfo_
private

Definition at line 80 of file HcalUnpackerReport.h.

Referenced by fedCalibType(), hasFedWithCalib(), and setFedCalibInfo().

◆ FEDsError_

std::vector<int> HcalUnpackerReport::FEDsError_
private

Definition at line 71 of file HcalUnpackerReport.h.

Referenced by addError(), errorFree(), and getFedsError().

◆ FEDsUnpacked_

std::vector<int> HcalUnpackerReport::FEDsUnpacked_
private

Definition at line 70 of file HcalUnpackerReport.h.

Referenced by addUnpacked(), anyValidHCAL(), and getFedsUnpacked().

◆ ofwSpigots_

int HcalUnpackerReport::ofwSpigots_
private

Definition at line 82 of file HcalUnpackerReport.h.

Referenced by countOFWSpigot(), and OFWSpigots().

◆ reportInfo_

std::vector<std::string> HcalUnpackerReport::reportInfo_
private

Definition at line 79 of file HcalUnpackerReport.h.

Referenced by getReportInfo(), getReportKeys(), hasReportInfo(), and setReportInfo().

◆ spigotFormatErrors_

int HcalUnpackerReport::spigotFormatErrors_
private

Definition at line 73 of file HcalUnpackerReport.h.

Referenced by countSpigotFormatError(), errorFree(), and spigotFormatErrors().

◆ totalDigis_

int HcalUnpackerReport::totalDigis_
private

Definition at line 74 of file HcalUnpackerReport.h.

Referenced by countDigi(), and totalDigis().

◆ totalHOTPDigis_

int HcalUnpackerReport::totalHOTPDigis_
private

Definition at line 74 of file HcalUnpackerReport.h.

Referenced by countTPDigi(), and totalHOTPDigis().

◆ totalTPDigis_

int HcalUnpackerReport::totalTPDigis_
private

Definition at line 74 of file HcalUnpackerReport.h.

Referenced by countTPDigi(), and totalTPDigis().

◆ unmappedDigis_

int HcalUnpackerReport::unmappedDigis_
private

Definition at line 72 of file HcalUnpackerReport.h.

Referenced by countUnmappedDigi(), and unmappedDigis().

◆ unmappedIds_

ElectronicsIdVector HcalUnpackerReport::unmappedIds_
private

◆ unmappedTPDigis_

int HcalUnpackerReport::unmappedTPDigis_
private

Definition at line 72 of file HcalUnpackerReport.h.

Referenced by countUnmappedTPDigi(), and unmappedTPDigis().

◆ unsuppressed_

bool HcalUnpackerReport::unsuppressed_
private

Definition at line 77 of file HcalUnpackerReport.h.

Referenced by setUnsuppressed(), and unsuppressedChannels().

mps_fire.i
i
Definition: mps_fire.py:428
HcalUnpackerReport::unmappedTPDigis_
int unmappedTPDigis_
Definition: HcalUnpackerReport.h:72
HcalUnpackerReport::totalHOTPDigis_
int totalHOTPDigis_
Definition: HcalUnpackerReport.h:74
HcalUnpackerReport::FEDsError_
std::vector< int > FEDsError_
Definition: HcalUnpackerReport.h:71
HcalUnpackerReport::spigotFormatErrors_
int spigotFormatErrors_
Definition: HcalUnpackerReport.h:73
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
HcalUnpackerReport::badqualityDigis_
int badqualityDigis_
Definition: HcalUnpackerReport.h:73
HcalCalibrationEventType
HcalCalibrationEventType
Definition: HcalCalibrationEventTypes.h:4
HcalUnpackerReport::reportInfo_
std::vector< std::string > reportInfo_
Definition: HcalUnpackerReport.h:79
HcalUnpackerReport::unmappedDigis_
int unmappedDigis_
Definition: HcalUnpackerReport.h:72
runTauDisplay.eid
eid
Definition: runTauDisplay.py:298
value
Definition: value.py:1
photonIsolationHIProducer_cfi.ho
ho
Definition: photonIsolationHIProducer_cfi.py:10
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalUnpackerReport::totalDigis_
int totalDigis_
Definition: HcalUnpackerReport.h:74
HcalUnpackerReport::totalTPDigis_
int totalTPDigis_
Definition: HcalUnpackerReport.h:74
HcalUnpackerReport::unmappedIds_
ElectronicsIdVector unmappedIds_
Definition: HcalUnpackerReport.h:76
HcalUnpackerReport::fedInfo_
std::vector< uint16_t > fedInfo_
Definition: HcalUnpackerReport.h:80
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HcalUnpackerReport::ofwSpigots_
int ofwSpigots_
Definition: HcalUnpackerReport.h:82
ReportSeparator
static const std::string ReportSeparator("==>")
HcalUnpackerReport::busySpigots_
int busySpigots_
Definition: HcalUnpackerReport.h:82
HcalUnpackerReport::FEDsUnpacked_
std::vector< int > FEDsUnpacked_
Definition: HcalUnpackerReport.h:70
HcalUnpackerReport::unsuppressed_
bool unsuppressed_
Definition: HcalUnpackerReport.h:77
HcalUnpackerReport::emptyEventSpigots_
int emptyEventSpigots_
Definition: HcalUnpackerReport.h:82
HcalUnpackerReport::badqualityIds_
DetIdVector badqualityIds_
Definition: HcalUnpackerReport.h:75