test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripBaseCondObjDQM.h
Go to the documentation of this file.
1 #ifndef SiStripMonitorSummary_SiStripBaseCondObjDQM_h
2 #define SiStripMonitorSummary_SiStripBaseCondObjDQM_h
3 
9 
10 
11 
15 
18 
21 
24 
26 
29 
32 
34 
35 #include <vector>
36 #include <map>
37 #include <string>
38 #include <sstream>
39 
40 class TrackerTopology;
42 
43 
44 
45  public:
46 
47 
48 
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);
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_);
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{
80  CumulDistr(0),
83  SummaryDistr(0){;}
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 
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 
162 
163 };
164 
165 
166 #endif
std::map< uint32_t, ModMEs > ModMEsMap_
std::vector< uint32_t > ModulesToBeExcluded_
void selectModules(std::vector< uint32_t > &detIds_)
void bookSummaryMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
SiStripBaseCondObjDQM(const edm::EventSetup &eSetup, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet)
void bookTkMap(const std::string &TkMapname)
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)
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)
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)
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
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_
const edm::EventSetup & eSetup_
virtual void fillModMEs(const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es)