CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
< HcalElectronicsId
ElectronicsIdVector
 

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

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

Definition at line 39 of file HcalUnpackerReport.h.

Definition at line 40 of file HcalUnpackerReport.h.

Constructor & Destructor Documentation

HcalUnpackerReport::HcalUnpackerReport ( )

Member Function Documentation

void HcalUnpackerReport::addError ( int  fed)

Definition at line 22 of file HcalUnpackerReport.cc.

References FEDsError_.

22 { FEDsError_.push_back(fed); }
std::vector< int > FEDsError_
void HcalUnpackerReport::addUnpacked ( int  fed)

Definition at line 20 of file HcalUnpackerReport.cc.

References FEDsUnpacked_.

20 { FEDsUnpacked_.push_back(fed); }
std::vector< int > FEDsUnpacked_
bool HcalUnpackerReport::anyValidHCAL ( ) const

Definition at line 18 of file HcalUnpackerReport.cc.

References FEDsUnpacked_.

18 { return !FEDsUnpacked_.empty(); }
std::vector< int > FEDsUnpacked_
DetIdVector::const_iterator HcalUnpackerReport::bad_quality_begin ( ) const
inline

Definition at line 42 of file HcalUnpackerReport.h.

References badqualityIds_.

42 { return badqualityIds_.begin(); }
DetIdVector badqualityIds_
DetIdVector::const_iterator HcalUnpackerReport::bad_quality_end ( ) const
inline

Definition at line 43 of file HcalUnpackerReport.h.

References badqualityIds_.

43 { return badqualityIds_.end(); }
DetIdVector badqualityIds_
int HcalUnpackerReport::badQualityDigis ( ) const
inline

Definition at line 24 of file HcalUnpackerReport.h.

References badqualityDigis_.

24 { return badqualityDigis_; }
int HcalUnpackerReport::busySpigots ( ) const
inline

Definition at line 30 of file HcalUnpackerReport.h.

References busySpigots_.

30 { return busySpigots_; }
void HcalUnpackerReport::countBadQualityDigi ( )
void HcalUnpackerReport::countBadQualityDigi ( const DetId did)

Definition at line 40 of file HcalUnpackerReport.cc.

References badqualityDigis_, and badqualityIds_.

40  {
42  badqualityIds_.push_back(id);
43 }
DetIdVector badqualityIds_
void HcalUnpackerReport::countBusySpigot ( )

Definition at line 37 of file HcalUnpackerReport.cc.

References busySpigots_.

Referenced by HcalUnpacker::unpackVME().

void HcalUnpackerReport::countDigi ( )

Definition at line 24 of file HcalUnpackerReport.cc.

References totalDigis_.

void HcalUnpackerReport::countEmptyEventSpigot ( )

Definition at line 35 of file HcalUnpackerReport.cc.

References emptyEventSpigots_.

Referenced by HcalUnpacker::unpackVME().

void HcalUnpackerReport::countOFWSpigot ( )

Definition at line 36 of file HcalUnpackerReport.cc.

References ofwSpigots_.

Referenced by HcalUnpacker::unpackVME().

void HcalUnpackerReport::countSpigotFormatError ( )
void HcalUnpackerReport::countTPDigi ( bool  ho = false)

Definition at line 25 of file HcalUnpackerReport.cc.

References totalHOTPDigis_, and totalTPDigis_.

25  {
26  if (ho)
28  else
29  totalTPDigis_++;
30 }
void HcalUnpackerReport::countUnmappedDigi ( )
void HcalUnpackerReport::countUnmappedDigi ( const HcalElectronicsId eid)

Definition at line 44 of file HcalUnpackerReport.cc.

References unmappedDigis_, and unmappedIds_.

44  {
46  unmappedIds_.push_back(eid);
47 }
ElectronicsIdVector unmappedIds_
void HcalUnpackerReport::countUnmappedTPDigi ( )

Definition at line 33 of file HcalUnpackerReport.cc.

References unmappedTPDigis_.

Referenced by HcalUnpacker::unpackUTCA(), and HcalUnpacker::unpackVME().

void HcalUnpackerReport::countUnmappedTPDigi ( const HcalElectronicsId eid)

Definition at line 48 of file HcalUnpackerReport.cc.

References unmappedIds_, and unmappedTPDigis_.

48  {
50  unmappedIds_.push_back(eid);
51 }
ElectronicsIdVector unmappedIds_
int HcalUnpackerReport::emptyEventSpigots ( ) const
inline

Definition at line 28 of file HcalUnpackerReport.h.

References emptyEventSpigots_.

28 { return emptyEventSpigots_; }
bool HcalUnpackerReport::errorFree ( ) const

Definition at line 16 of file HcalUnpackerReport.cc.

References FEDsError_, and spigotFormatErrors_.

16 { return FEDsError_.empty() && spigotFormatErrors_ == 0; }
std::vector< int > FEDsError_
HcalCalibrationEventType HcalUnpackerReport::fedCalibType ( uint16_t  fed) const

Definition at line 53 of file HcalUnpackerReport.cc.

References fedInfo_, and mps_fire::i.

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 }
std::vector< uint16_t > fedInfo_
HcalCalibrationEventType
uint16_t size_type
const std::vector<int>& HcalUnpackerReport::getFedsError ( ) const
inline

Definition at line 18 of file HcalUnpackerReport.h.

References FEDsError_.

18 { return FEDsError_; }
std::vector< int > FEDsError_
const std::vector<int>& HcalUnpackerReport::getFedsUnpacked ( ) const
inline

Definition at line 17 of file HcalUnpackerReport.h.

References FEDsUnpacked_.

17 { return FEDsUnpacked_; }
std::vector< int > FEDsUnpacked_
std::string HcalUnpackerReport::getReportInfo ( const std::string &  name) const

Definition at line 93 of file HcalUnpackerReport.cc.

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

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 }
std::vector< std::string > reportInfo_
static const std::string ReportSeparator("==>")
std::vector< std::string > HcalUnpackerReport::getReportKeys ( ) const

Definition at line 106 of file HcalUnpackerReport.cc.

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

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 }
std::vector< std::string > reportInfo_
static const std::string ReportSeparator("==>")
bool HcalUnpackerReport::hasFedWithCalib ( ) const
inline

Definition at line 34 of file HcalUnpackerReport.h.

References fedInfo_.

34 { return !fedInfo_.empty(); }
std::vector< uint16_t > fedInfo_
bool HcalUnpackerReport::hasReportInfo ( const std::string &  name) const

Definition at line 85 of file HcalUnpackerReport.cc.

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

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 }
std::vector< std::string > reportInfo_
static const std::string ReportSeparator("==>")
int HcalUnpackerReport::OFWSpigots ( ) const
inline

Definition at line 29 of file HcalUnpackerReport.h.

References ofwSpigots_.

29 { return ofwSpigots_; }
void HcalUnpackerReport::setFedCalibInfo ( uint16_t  fed,
HcalCalibrationEventType  ctype 
)

Definition at line 64 of file HcalUnpackerReport.cc.

References fedInfo_, and mps_fire::i.

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 }
std::vector< uint16_t > fedInfo_
uint16_t size_type
void HcalUnpackerReport::setReportInfo ( const std::string &  name,
const std::string &  value 
)

Definition at line 81 of file HcalUnpackerReport.cc.

References reportInfo_.

81  {
82  reportInfo_.push_back(name + "==>" + value);
83 }
std::vector< std::string > reportInfo_
void HcalUnpackerReport::setUnsuppressed ( bool  isSup)

Definition at line 77 of file HcalUnpackerReport.cc.

References unsuppressed_.

77 { unsuppressed_ = isSup; }
int HcalUnpackerReport::spigotFormatErrors ( ) const
inline

Definition at line 23 of file HcalUnpackerReport.h.

References spigotFormatErrors_.

23 { return spigotFormatErrors_; }
int HcalUnpackerReport::totalDigis ( ) const
inline

Definition at line 25 of file HcalUnpackerReport.h.

References totalDigis_.

25 { return totalDigis_; }
int HcalUnpackerReport::totalHOTPDigis ( ) const
inline

Definition at line 27 of file HcalUnpackerReport.h.

References totalHOTPDigis_.

27 { return totalHOTPDigis_; }
int HcalUnpackerReport::totalTPDigis ( ) const
inline

Definition at line 26 of file HcalUnpackerReport.h.

References totalTPDigis_.

26 { return totalTPDigis_; }
ElectronicsIdVector::const_iterator HcalUnpackerReport::unmapped_begin ( ) const
inline

Definition at line 44 of file HcalUnpackerReport.h.

References unmappedIds_.

44 { return unmappedIds_.begin(); }
ElectronicsIdVector unmappedIds_
ElectronicsIdVector::const_iterator HcalUnpackerReport::unmapped_end ( ) const
inline

Definition at line 45 of file HcalUnpackerReport.h.

References unmappedIds_.

45 { return unmappedIds_.end(); }
ElectronicsIdVector unmappedIds_
int HcalUnpackerReport::unmappedDigis ( ) const
inline

Definition at line 21 of file HcalUnpackerReport.h.

References unmappedDigis_.

21 { return unmappedDigis_; }
int HcalUnpackerReport::unmappedTPDigis ( ) const
inline

Definition at line 22 of file HcalUnpackerReport.h.

References unmappedTPDigis_.

22 { return unmappedTPDigis_; }
bool HcalUnpackerReport::unsuppressedChannels ( ) const
inline

Definition at line 32 of file HcalUnpackerReport.h.

References unsuppressed_.

32 { return unsuppressed_; }

Member Data Documentation

int HcalUnpackerReport::badqualityDigis_
private

Definition at line 73 of file HcalUnpackerReport.h.

Referenced by badQualityDigis(), and countBadQualityDigi().

DetIdVector HcalUnpackerReport::badqualityIds_
private

Definition at line 75 of file HcalUnpackerReport.h.

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

int HcalUnpackerReport::busySpigots_
private

Definition at line 82 of file HcalUnpackerReport.h.

Referenced by busySpigots(), and countBusySpigot().

int HcalUnpackerReport::emptyEventSpigots_
private

Definition at line 82 of file HcalUnpackerReport.h.

Referenced by countEmptyEventSpigot(), and emptyEventSpigots().

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

Definition at line 80 of file HcalUnpackerReport.h.

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

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

Definition at line 71 of file HcalUnpackerReport.h.

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

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

Definition at line 70 of file HcalUnpackerReport.h.

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

int HcalUnpackerReport::ofwSpigots_
private

Definition at line 82 of file HcalUnpackerReport.h.

Referenced by countOFWSpigot(), and OFWSpigots().

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

Definition at line 79 of file HcalUnpackerReport.h.

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

int HcalUnpackerReport::spigotFormatErrors_
private

Definition at line 73 of file HcalUnpackerReport.h.

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

int HcalUnpackerReport::totalDigis_
private

Definition at line 74 of file HcalUnpackerReport.h.

Referenced by countDigi(), and totalDigis().

int HcalUnpackerReport::totalHOTPDigis_
private

Definition at line 74 of file HcalUnpackerReport.h.

Referenced by countTPDigi(), and totalHOTPDigis().

int HcalUnpackerReport::totalTPDigis_
private

Definition at line 74 of file HcalUnpackerReport.h.

Referenced by countTPDigi(), and totalTPDigis().

int HcalUnpackerReport::unmappedDigis_
private

Definition at line 72 of file HcalUnpackerReport.h.

Referenced by countUnmappedDigi(), and unmappedDigis().

ElectronicsIdVector HcalUnpackerReport::unmappedIds_
private
int HcalUnpackerReport::unmappedTPDigis_
private

Definition at line 72 of file HcalUnpackerReport.h.

Referenced by countUnmappedTPDigi(), and unmappedTPDigis().

bool HcalUnpackerReport::unsuppressed_
private

Definition at line 77 of file HcalUnpackerReport.h.

Referenced by setUnsuppressed(), and unsuppressedChannels().