CMS 3D CMS Logo

HcalUnpackerReport.h

Go to the documentation of this file.
00001 #ifndef DATAFORMATS_HCALDIGI_HCALUNPACKERREPORT_H
00002 #define DATAFORMATS_HCALDIGI_HCALUNPACKERREPORT_H 1
00003 
00004 #include <vector>
00005 #include "DataFormats/DetId/interface/DetId.h"
00006 #include "DataFormats/HcalDetId/interface/HcalElectronicsId.h"
00007 
00014 class HcalUnpackerReport {
00015 public:
00016   HcalUnpackerReport();
00017   const std::vector<int>& getFedsUnpacked() const { return FEDsUnpacked_; }
00018   const std::vector<int>& getFedsError() const { return FEDsError_; }
00019   bool errorFree() const;
00020   bool anyValidHCAL() const;
00021   int unmappedDigis() const { return unmappedDigis_; }
00022   int unmappedTPDigis() const { return unmappedTPDigis_; }
00023   int spigotFormatErrors() const { return spigotFormatErrors_; }
00024   int badQualityDigis() const { return badqualityDigis_; }
00025   int totalDigis() const { return totalDigis_; }
00026   int totalTPDigis() const { return totalTPDigis_; }
00027   int totalHOTPDigis() const { return totalHOTPDigis_; }
00028 
00029 
00030   typedef std::vector<DetId> DetIdVector;
00031   typedef std::vector<HcalElectronicsId> ElectronicsIdVector;
00032 
00033   DetIdVector::const_iterator bad_quality_begin() const { return badqualityIds_.begin(); }
00034   DetIdVector::const_iterator bad_quality_end() const { return badqualityIds_.end(); }
00035   ElectronicsIdVector::const_iterator unmapped_begin() const { return unmappedIds_.begin(); }
00036   ElectronicsIdVector::const_iterator unmapped_end() const { return unmappedIds_.end(); }
00037 
00038   // setters
00039   void addUnpacked(int fed);
00040   void addError(int fed);
00041   void countDigi();
00042   void countTPDigi(bool ho=false);
00043   void countUnmappedDigi();
00044   void countUnmappedTPDigi();
00045   void countSpigotFormatError();
00046   void countBadQualityDigi();
00047   void countUnmappedDigi(const HcalElectronicsId& eid);
00048   void countUnmappedTPDigi(const HcalElectronicsId& eid);
00049   void countBadQualityDigi(const DetId& did);
00050 private:
00051   std::vector<int> FEDsUnpacked_;
00052   std::vector<int> FEDsError_;
00053   int unmappedDigis_, unmappedTPDigis_;
00054   int spigotFormatErrors_, badqualityDigis_;
00055   int totalDigis_, totalTPDigis_, totalHOTPDigis_;
00056   DetIdVector badqualityIds_;
00057   ElectronicsIdVector unmappedIds_;
00058 };
00059 
00060 #endif

Generated on Tue Jun 9 17:31:00 2009 for CMSSW by  doxygen 1.5.4