CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripFEDErrorsDQM.h
Go to the documentation of this file.
1 #ifndef DQMOffline_CalibTracker_SiStripFEDErrorsDQM_H
2 #define DQMOffline_CalibTracker_SiStripFEDErrorsDQM_H
3 
13 
16 
22 
26 
27 #include <TFile.h>
28 #include <string>
29 #include <map>
30 
37 class SiStripFEDErrorsDQM : public edm::EDAnalyzer, public SiStripBaseServiceFromDQM<SiStripBadStrip>
38 {
39  public:
40  SiStripFEDErrorsDQM(const edm::ParameterSet& iConfig);
42 
43  private:
44  virtual void beginJob();
45  virtual void analyze(const edm::Event&, const edm::EventSetup&);
46  virtual void endJob() ;
47 
48  bool readBadAPVs();
49 
50  void readHistogram(MonitorElement* aMe,
51  unsigned int & aCounter,
52  const float aNorm,
53  const unsigned int aFedId);
54 
55  void addBadAPV(const FedChannelConnection & aConnection,
56  const unsigned short aAPVNumber,
57  const unsigned short aFlag,
58  unsigned int & aCounter);
59 
60  void addBadStrips(const FedChannelConnection & aConnection,
61  const unsigned int aDetId,
62  const unsigned short aApvNum,
63  const unsigned short aFlag,
64  unsigned int & aCounter);
65 
67  void addErrors();
68 
69  //set corresponding bit to 1 in flag
70  void setFlagBit(unsigned short & aFlag, const unsigned short aBit);
71 
72  //update the cabling if necessary
73  void updateCabling(const edm::EventSetup& eventSetup);
74 
77 
78  uint32_t cablingCacheId_;
80 
81  double threshold_;
82  unsigned int debug_;
83  std::map<uint32_t, std::vector<unsigned int> > detIdErrors_;
84 };
85 
86 #endif
std::map< uint32_t, std::vector< unsigned int > > detIdErrors_
void addErrors()
Writes the errors to the db.
void addBadAPV(const FedChannelConnection &aConnection, const unsigned short aAPVNumber, const unsigned short aFlag, unsigned int &aCounter)
SiStripFEDErrorsDQM(const edm::ParameterSet &iConfig)
void setFlagBit(unsigned short &aFlag, const unsigned short aBit)
Class containning control, module, detector and connection information, at the level of a FED channel...
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
const SiStripFedCabling * cabling_
edm::ParameterSet iConfig_
void updateCabling(const edm::EventSetup &eventSetup)
void readHistogram(MonitorElement *aMe, unsigned int &aCounter, const float aNorm, const unsigned int aFedId)
void addBadStrips(const FedChannelConnection &aConnection, const unsigned int aDetId, const unsigned short aApvNum, const unsigned short aFlag, unsigned int &aCounter)