CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripMonitorDigi.h
Go to the documentation of this file.
1 #ifndef SiStripMonitorDigi_SiStripMonitorDigi_h
2 #define SiStripMonitorDigi_SiStripMonitorDigi_h
3 // -*- C++ -*-
4 // Package: SiStripMonitorDigi
5 // Class : SiStripMonitorDigi
9 // Original Author: dkcira
10 // Created: Sat Feb 4 20:49:51 CET 2006
11 // $Id: SiStripMonitorDigi.h,v 1.29 2011/10/27 19:49:19 fiori Exp $
12 #include <memory>
23 
24 class DQMStore;
25 class SiStripDCSStatus;
26 class SiStripDetCabling;
27 
29  public:
30  explicit SiStripMonitorDigi(const edm::ParameterSet&);
32  virtual void analyze(const edm::Event&, const edm::EventSetup&);
33  virtual void beginJob();
34  virtual void endJob() ;
35  virtual void beginRun(const edm::Run&, const edm::EventSetup&);
36  virtual void endRun(const edm::Run&, const edm::EventSetup&);
37  virtual void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&);
38  virtual void endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&);
39 
40 
41  struct ModMEs{
42 
49  };
50 
51  struct LayerMEs{
52 
65 
66  };
67 
68  struct SubDetMEs{
69 
70  int totNDigis;
74 
75  //int totApvShots;
76  std::vector<APVShot> SubDetApvShots;
82  };
83 
87  };
88 
89  private:
90  void createMEs(const edm::EventSetup& es);
91  void ResetModuleMEs(uint32_t idet);
92  void bookLayer();
93  MonitorElement* bookMETrend(const char* ParameterSetLabel, const char* HistoName);
94  MonitorElement* bookME1D(const char* ParameterSetLabel, const char* HistoName);
95  void bookTrendMEs(TString name,int32_t layer,uint32_t id,std::string flag);
96  void fillDigiADCsMEs(int value, std::string name);
97  void fillTrend(MonitorElement* me ,float value, float timeinorbit);
98  inline void fillME(MonitorElement* ME,float value1){if (ME!=0)ME->Fill(value1);}
99  inline void fillME(MonitorElement* ME,float value1,float value2){if (ME!=0)ME->Fill(value1,value2);}
100  inline void fillME(MonitorElement* ME,float value1,float value2,float value3){if (ME!=0)ME->Fill(value1,value2,value3);}
101  inline void fillME(MonitorElement* ME,float value1,float value2,float value3,float value4){if (ME!=0)ME->Fill(value1,value2,value3,value4);}
102  bool AllDigis( const edm::EventSetup& es);
103 
104  void createModuleMEs(ModMEs& mod_single, uint32_t detid);
105  void createLayerMEs(std::string label, int ndet);
106  void createSubDetMEs(std::string label);
107  void createSubDetTH2(std::string label);
108  int getDigiSourceIndex(uint32_t id);
109  void AddApvShotsToSubDet(const std::vector<APVShot> &, std::vector<APVShot> &);
110  void FillApvShotsMap(TkHistoMap*, const std::vector<APVShot> &, uint32_t id ,int);
111 
112  private:
113 
114 
117  std::vector<edm::InputTag> digiProducerList;
118  std::map<uint32_t, ModMEs> DigiMEs; // uint32_t me_type: 1=#digis/module; 2=adcs of hottest strip/module; 3= adcs of coolest strips/module.
120 
121  std::map<std::string, std::vector< uint32_t > > LayerDetMap;
122  std::map<std::string, LayerMEs> LayerMEsMap;
123  std::map<std::string, SubDetMEs> SubDetMEsMap;
124  std::map<std::string, std::string> SubDetPhasePartMap;
126 
127  TString name;
129  std::map<std::pair<std::string,int32_t>,bool> DetectedLayers;
130  std::vector<const edm::DetSetVector<SiStripDigi> *> digi_detset_handles;
131 
132  unsigned long long m_cacheID_;
134  std::vector<uint32_t> ModulesToBeExcluded_;
135 
136  //Global MEs to monitor APV Shots properties
138 
140 
144 
146 
155 
162 
166 
169 
175 
181 
182 
184 
185  bool Mod_On_;
186 
191 
193 
194  std::string topDir;
197 
199 };
200 #endif
201 
bool AllDigis(const edm::EventSetup &es)
void ResetModuleMEs(uint32_t idet)
void createSubDetTH2(std::string label)
void createSubDetMEs(std::string label)
long int flag
Definition: mlp_lapack.h:47
std::map< std::string, LayerMEs > LayerMEsMap
MonitorElement * LayerNumberOfDigisTrend
std::map< std::pair< std::string, int32_t >, bool > DetectedLayers
MonitorElement * LayerStripOccupancy
MonitorElement * LayerADCsHottestStrip
edm::InputTag historyProducer_
void createModuleMEs(ModMEs &mod_single, uint32_t detid)
MonitorElement * LayerADCsHottestStripTrend
MonitorElement * NApvShotsGlobalProf
std::map< uint32_t, ModMEs > DigiMEs
std::map< std::string, std::string > SubDetPhasePartMap
MonitorElement * MedianChargeApvShotsGlobal
TkHistoMap * tkmapNstripApvshot
MonitorElement * StripMultiplicityApvShotsGlobal
MonitorElement * LayerNumberOfDigisProfile
void Fill(long long x)
std::vector< APVShot > SubDetApvShots
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
unsigned long long m_cacheID_
MonitorElement * SubDetNApvShotsNApvTH1
Definition: ME.h:11
MonitorElement * NumberOfDigisPerStrip
MonitorElement * ADCsCoolestStrip
SiStripDCSStatus * dcsStatus_
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
MonitorElement * bookMETrend(const char *ParameterSetLabel, const char *HistoName)
MonitorElement * LayerADCsCoolestStripTrend
MonitorElement * SubDetNStripsApvShotsTH1
DigiFailureMEs digiFailureMEs
void fillME(MonitorElement *ME, float value1)
void fillME(MonitorElement *ME, float value1, float value2, float value3, float value4)
MonitorElement * NApvApvShotsGlobal
std::vector< const edm::DetSetVector< SiStripDigi > * > digi_detset_handles
void createLayerMEs(std::string label, int ndet)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void bookTrendMEs(TString name, int32_t layer, uint32_t id, std::string flag)
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * ADCsHottestStrip
void fillTrend(MonitorElement *me, float value, float timeinorbit)
MonitorElement * NApvShotsGlobal
MonitorElement * LayerDigiADCProfile
int getDigiSourceIndex(uint32_t id)
void fillME(MonitorElement *ME, float value1, float value2, float value3)
SiStripMonitorDigi(const edm::ParameterSet &)
edm::InputTag apvPhaseProducer_
std::map< std::string, std::vector< uint32_t > > LayerDetMap
void fillME(MonitorElement *ME, float value1, float value2)
MonitorElement * SubDetChargeMedianApvShotsTH1
edm::ParameterSet conf_
std::string HistoName
std::vector< edm::InputTag > digiProducerList
TkHistoMap * tkmapMedianChargeApvshots
TkHistoMap * tkmapNApvshots
MonitorElement * LayerStripOccupancyTrend
virtual void endRun(const edm::Run &, const edm::EventSetup &)
MonitorElement * LayerADCsCoolestStrip
std::vector< uint32_t > ModulesToBeExcluded_
void AddApvShotsToSubDet(const std::vector< APVShot > &, std::vector< APVShot > &)
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
SiStripFolderOrganizer folder_organizer
MonitorElement * ShotsVsTimeApvShotsGlobal
void createMEs(const edm::EventSetup &es)
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
void fillDigiADCsMEs(int value, std::string name)
void FillApvShotsMap(TkHistoMap *, const std::vector< APVShot > &, uint32_t id, int)
Definition: Run.h:33
MonitorElement * bookME1D(const char *ParameterSetLabel, const char *HistoName)