CMS 3D CMS Logo

SiStripBaseCondObjDQM.h
Go to the documentation of this file.
1 #ifndef SiStripMonitorSummary_SiStripBaseCondObjDQM_h
2 #define SiStripMonitorSummary_SiStripBaseCondObjDQM_h
3 
9 
10 
11 
15 
17 
20 
23 
25 
28 
31 
33 
34 #include <vector>
35 #include <map>
36 #include <string>
37 #include <sstream>
38 
39 class TrackerTopology;
41 
42 
43 
44  public:
45 
46 
47 
49  edm::RunNumber_t iRun,
50  edm::ParameterSet const& hPSet,
51  edm::ParameterSet const& fPSet );
52 
54 
55  virtual void getActiveDetIds(const edm::EventSetup & eSetup)=0;
56 
57  void analysis(const edm::EventSetup & eSetup_);
58  void analysisOnDemand(const edm::EventSetup & eSetup_, uint32_t detIdOnDemand);
59  void analysisOnDemand(const edm::EventSetup & eSetup_, const std::vector<uint32_t>& detIdsOnDemand);
60  void analysisOnDemand(const edm::EventSetup & eSetup_,
61  std::string requestedSubDetector,
62  uint32_t requestedSide,
63  uint32_t requestedLayer);
64 
65 
66  std::vector<uint32_t> getCabledModules();
67  void selectModules(std::vector<uint32_t> & detIds_, const TrackerTopology* tTopo);
68 
69  // virtual void fillTopSummaryMEs()=0;
70 
71  virtual unsigned long long getCache(const edm::EventSetup & eSetup_)=0;
72  virtual void getConditionObject(const edm::EventSetup & eSetup_)=0;
73 
74  virtual void end();
75 
76  protected:
77 
78  struct ModMEs{
89  };
90 
91 
92  void getModMEs(ModMEs& CondObj_ME, const uint32_t& detId_, const TrackerTopology* tTopo);
93  void getSummaryMEs(ModMEs& CondObj_ME, const uint32_t& detId_, const TrackerTopology* tTopo);
94  std::pair<std::string,uint32_t> getLayerNameAndId(const uint32_t& detId_, const TrackerTopology* tTopo);
95  std::pair<std::string,uint32_t> getStringNameAndId(const uint32_t& detId_, const TrackerTopology* tTopo);
96  std::vector<uint32_t> GetSameLayerDetId(const std::vector<uint32_t>& activeDetIds, uint32_t selDetId, const TrackerTopology* tTopo);
97 
98 
99  virtual void fillModMEs(const std::vector<uint32_t> & selectedDetIds, const edm::EventSetup& es);
100  virtual void fillSummaryMEs(const std::vector<uint32_t> & selectedDetIds, const edm::EventSetup& es);
101  virtual void fillMEsForDet(const ModMEs& selModME_,uint32_t selDetId_, const TrackerTopology* tTopo)=0;
102  virtual void fillMEsForLayer( /*std::map<uint32_t, ModMEs> selModMEsMap_, */ uint32_t selDetId_, const TrackerTopology* tTopo)=0;
103 
104 
105  void fillTkMap(const uint32_t& detid, const float& value);
106 
108 
112 
113  bool Mod_On_;
119  std::vector<int> tkMapScaler;
120 
121  //bool ActiveDetIds_On_;
122 
125 
126  std::map<uint32_t, ModMEs> ModMEsMap_;
127  std::map<uint32_t, ModMEs> SummaryMEsMap_;
128  std::vector<uint32_t> activeDetIds;
129  std::vector<uint32_t> all_DetIds;
130 
131  unsigned long long cacheID_memory;
132  unsigned long long cacheID_current;
133 
134  std::unique_ptr<TkHistoMap> Tk_HM_;
135  std::unique_ptr<TkHistoMap> Tk_HM_H;
136  std::unique_ptr<TkHistoMap> Tk_HM_L;
138 
139  private:
140 
141  void bookProfileMEs(SiStripBaseCondObjDQM::ModMEs& CondObj_ME, const uint32_t& detId_, const TrackerTopology* tTopo);
142  void bookCumulMEs(SiStripBaseCondObjDQM::ModMEs& CondObj_ME, const uint32_t& detId_, const TrackerTopology* tTopo);
143  void bookSummaryProfileMEs(SiStripBaseCondObjDQM::ModMEs& CondObj_ME, const uint32_t& detId_, const TrackerTopology* tTopo);
144  void bookSummaryCumulMEs(SiStripBaseCondObjDQM::ModMEs& CondObj_ME, const uint32_t& detId_, const TrackerTopology* tTopo);
145  void bookSummaryMEs(SiStripBaseCondObjDQM::ModMEs& CondObj_ME, const uint32_t& detId_, const TrackerTopology* tTopo);
146 
147  void bookTkMap(const std::string& TkMapname);
148 
149  void saveTkMap(const std::string& TkMapname, double minValue, double maxValue);
150 
151  std::vector<uint32_t> ModulesToBeExcluded_;
152  std::vector<uint32_t> ModulesToBeIncluded_;
153  std::vector<std::string> SubDetectorsToBeExcluded_;
154 
156 
158 
163 
164 };
165 
166 
167 #endif
std::map< uint32_t, ModMEs > ModMEsMap_
std::unique_ptr< TkHistoMap > Tk_HM_L
std::vector< uint32_t > ModulesToBeExcluded_
void bookSummaryMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
void selectModules(std::vector< uint32_t > &detIds_, const TrackerTopology *tTopo)
void bookTkMap(const std::string &TkMapname)
std::unique_ptr< TkHistoMap > Tk_HM_H
edm::ESHandle< SiStripDetCabling > detCablingHandle_
SiStripFolderOrganizer folder_organizer
std::vector< int > tkMapScaler
void saveTkMap(const std::string &TkMapname, double minValue, double maxValue)
void getSummaryMEs(ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
#define nullptr
virtual void fillMEsForLayer(uint32_t selDetId_, const TrackerTopology *tTopo)=0
void fillTkMap(const uint32_t &detid, const float &value)
void bookSummaryProfileMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
std::map< uint32_t, ModMEs > SummaryMEsMap_
std::vector< uint32_t > getCabledModules()
SiStripDetInfoFileReader * reader
unsigned long long cacheID_memory
void analysisOnDemand(const edm::EventSetup &eSetup_, uint32_t detIdOnDemand)
SiStripBaseCondObjDQM(const edm::EventSetup &eSetup, edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet)
std::vector< uint32_t > GetSameLayerDetId(const std::vector< uint32_t > &activeDetIds, uint32_t selDetId, const TrackerTopology *tTopo)
std::pair< std::string, uint32_t > getStringNameAndId(const uint32_t &detId_, const TrackerTopology *tTopo)
Definition: value.py:1
virtual void getConditionObject(const edm::EventSetup &eSetup_)=0
virtual void getActiveDetIds(const edm::EventSetup &eSetup)=0
void analysis(const edm::EventSetup &eSetup_)
std::vector< uint32_t > ModulesToBeIncluded_
virtual void fillMEsForDet(const ModMEs &selModME_, uint32_t selDetId_, const TrackerTopology *tTopo)=0
virtual unsigned long long getCache(const edm::EventSetup &eSetup_)=0
void bookProfileMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
virtual void fillSummaryMEs(const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es)
void getModMEs(ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
std::vector< uint32_t > all_DetIds
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_, const TrackerTopology *tTopo)
std::vector< uint32_t > activeDetIds
unsigned int RunNumber_t
void bookSummaryCumulMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
unsigned long long cacheID_current
void bookCumulMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
std::vector< std::string > SubDetectorsToBeExcluded_
std::unique_ptr< TkHistoMap > Tk_HM_
const edm::EventSetup & eSetup_
virtual void fillModMEs(const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es)