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 
13 
16 
18 
20 
23 
25 
26 #include <map>
27 #include <sstream>
28 #include <string>
29 #include <vector>
30 
31 class TrackerTopology;
33 public:
36 
38  edm::ParameterSet const &hPSet,
39  edm::ParameterSet const &fPSet,
40  const TrackerTopology *tTopo);
41 
43 
44  virtual void getActiveDetIds(const edm::EventSetup &eSetup) = 0;
45 
46  void analysis(const edm::EventSetup &eSetup_);
47  void analysisOnDemand(const edm::EventSetup &eSetup_, uint32_t detIdOnDemand);
48  void analysisOnDemand(const edm::EventSetup &eSetup_, const std::vector<uint32_t> &detIdsOnDemand);
49  void analysisOnDemand(const edm::EventSetup &eSetup_,
50  std::string requestedSubDetector,
51  uint32_t requestedSide,
52  uint32_t requestedLayer);
53 
54  void selectModules(std::vector<uint32_t> &detIds_);
55 
56  // virtual void fillTopSummaryMEs()=0;
57 
58  virtual void getConditionObject(const edm::EventSetup &eSetup_) = 0;
59  virtual bool checkChanged(const edm::EventSetup &eSetup) = 0;
60 
61  virtual void end();
62 
63 protected:
64  struct ModMEs {
66  : ProfileDistr(nullptr),
67  CumulDistr(nullptr),
68  SummaryOfProfileDistr(nullptr),
69  SummaryOfCumulDistr(nullptr),
70  SummaryDistr(nullptr) {
71  ;
72  }
78  };
79 
80  void getModMEs(ModMEs &CondObj_ME, const uint32_t &detId_);
81  void getSummaryMEs(ModMEs &CondObj_ME, const uint32_t &detId_);
82  std::pair<std::string, uint32_t> getLayerNameAndId(const uint32_t &detId_);
83  std::pair<std::string, uint32_t> getStringNameAndId(const uint32_t &detId_);
84  std::vector<uint32_t> GetSameLayerDetId(const std::vector<uint32_t> &activeDetIds, uint32_t selDetId);
85 
86  virtual void fillModMEs(const std::vector<uint32_t> &selectedDetIds);
87  virtual void fillSummaryMEs(const std::vector<uint32_t> &selectedDetIds);
88  virtual void fillMEsForDet(const ModMEs &selModME_, uint32_t selDetId_) = 0;
89  virtual void fillMEsForLayer(
90  /*std::map<uint32_t, ModMEs> selModMEsMap_, */ uint32_t selDetId_) = 0;
91 
92  void fillTkMap(const uint32_t &detid, const float &value);
93 
95 
98 
99  bool Mod_On_;
105  std::vector<int> tkMapScaler;
106 
107  // bool ActiveDetIds_On_;
108 
111 
112  std::map<uint32_t, ModMEs> ModMEsMap_;
113  std::map<uint32_t, ModMEs> SummaryMEsMap_;
114  std::vector<uint32_t> activeDetIds;
115  std::vector<uint32_t> all_DetIds;
116 
117  std::unique_ptr<TkHistoMap> Tk_HM_;
118  std::unique_ptr<TkHistoMap> Tk_HM_H;
119  std::unique_ptr<TkHistoMap> Tk_HM_L;
121 
123 
124 private:
125  void bookProfileMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_);
126  void bookCumulMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_);
127  void bookSummaryProfileMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_);
128  void bookSummaryCumulMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_);
129  void bookSummaryMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_);
130 
131  void bookTkMap(const std::string &TkMapname);
132 
133  void saveTkMap(const std::string &TkMapname, double minValue, double maxValue);
134 
135  std::vector<uint32_t> ModulesToBeExcluded_;
136  std::vector<uint32_t> ModulesToBeIncluded_;
137  std::vector<std::string> SubDetectorsToBeExcluded_;
138 
140 
145 };
146 
147 template <typename CondObj, typename Record>
149 public:
152  edm::RunNumber_t iRun,
153  edm::ParameterSet const &hPSet,
154  edm::ParameterSet const &fPSet,
155  const TrackerTopology *tTopo)
156  : SiStripBaseCondObjDQM{iRun, hPSet, fPSet, tTopo}, token_{token} {}
158 
159  void getConditionObject(const edm::EventSetup &eSetup) override { condObj_ = &eSetup.getData(token_); }
160  bool checkChanged(const edm::EventSetup &eSetup) override { return watcher_.check(eSetup); }
161 
162 protected:
163  const CondObj *condObj_;
164 
165 private:
168 };
169 
170 #endif
SiStripBaseCondObjDQM::Tk_HM_L
std::unique_ptr< TkHistoMap > Tk_HM_L
Definition: SiStripBaseCondObjDQM.h:119
SiStripBaseCondObjDQMGet::checkChanged
bool checkChanged(const edm::EventSetup &eSetup) override
Definition: SiStripBaseCondObjDQM.h:160
SiStripBaseCondObjDQMGet::watcher_
edm::ESWatcher< Record > watcher_
Definition: SiStripBaseCondObjDQM.h:167
SiStripBaseCondObjDQM::bookSummaryCumulMEs
void bookSummaryCumulMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_)
Definition: SiStripBaseCondObjDQM.cc:696
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
SiStripBaseCondObjDQM::hidmanager
SiStripHistoId hidmanager
Definition: SiStripBaseCondObjDQM.h:141
SiStripBaseCondObjDQM::folder_organizer
SiStripFolderOrganizer folder_organizer
Definition: SiStripBaseCondObjDQM.h:142
SiStripBaseCondObjDQM::saveTkMap
void saveTkMap(const std::string &TkMapname, double minValue, double maxValue)
Definition: SiStripBaseCondObjDQM.cc:1051
SiStripBaseCondObjDQM::getActiveDetIds
virtual void getActiveDetIds(const edm::EventSetup &eSetup)=0
MessageLogger.h
SiStripFolderOrganizer.h
SiStripHistoId.h
SiStripBaseCondObjDQM::fillMEsForLayer
virtual void fillMEsForLayer(uint32_t selDetId_)=0
SiStripBaseCondObjDQM::ModMEs::CumulDistr
MonitorElement * CumulDistr
Definition: SiStripBaseCondObjDQM.h:74
SiStripBaseCondObjDQM::ModMEs::ProfileDistr
MonitorElement * ProfileDistr
Definition: SiStripBaseCondObjDQM.h:73
edm::ESWatcher< Record >
SiStripBaseCondObjDQM::ModMEsMap_
std::map< uint32_t, ModMEs > ModMEsMap_
Definition: SiStripBaseCondObjDQM.h:112
SiStripBaseCondObjDQM::analysisOnDemand
void analysisOnDemand(const edm::EventSetup &eSetup_, uint32_t detIdOnDemand)
Definition: SiStripBaseCondObjDQM.cc:102
TrackerTopology
Definition: TrackerTopology.h:16
SiStripBaseCondObjDQM::activeDetIds
std::vector< uint32_t > activeDetIds
Definition: SiStripBaseCondObjDQM.h:114
SiStripBaseCondObjDQMGet::~SiStripBaseCondObjDQMGet
~SiStripBaseCondObjDQMGet() override
Definition: SiStripBaseCondObjDQM.h:157
SiStripBaseCondObjDQM::getConditionObject
virtual void getConditionObject(const edm::EventSetup &eSetup_)=0
SiStripBaseCondObjDQM::ModulesToBeIncluded_
std::vector< uint32_t > ModulesToBeIncluded_
Definition: SiStripBaseCondObjDQM.h:136
SiStripBaseCondObjDQM::bookProfileMEs
void bookProfileMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_)
Definition: SiStripBaseCondObjDQM.cc:399
SiStripBaseCondObjDQM::analysis
void analysis(const edm::EventSetup &eSetup_)
Definition: SiStripBaseCondObjDQM.cc:43
DQMStore.h
SiStripDetId.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
SiStripBaseCondObjDQM::ModMEs::SummaryOfProfileDistr
MonitorElement * SummaryOfProfileDistr
Definition: SiStripBaseCondObjDQM.h:75
SiStripBaseCondObjDQM::selectModules
void selectModules(std::vector< uint32_t > &detIds_)
Definition: SiStripBaseCondObjDQM.cc:122
DetIdSelector.h
SiStripBaseCondObjDQM::HistoMaps_On_
bool HistoMaps_On_
Definition: SiStripBaseCondObjDQM.h:100
SiStripBaseCondObjDQM::tkMapScaler
std::vector< int > tkMapScaler
Definition: SiStripBaseCondObjDQM.h:105
SiStripDetInfoFileReader
Definition: SiStripDetInfoFileReader.h:30
SiStripBaseCondObjDQM::SummaryOnLayerLevel_On_
bool SummaryOnLayerLevel_On_
Definition: SiStripBaseCondObjDQM.h:101
SiStripBaseCondObjDQM
Definition: SiStripBaseCondObjDQM.h:32
SiStripBaseCondObjDQM::tkMap
TrackerMap * tkMap
Definition: SiStripBaseCondObjDQM.h:120
SiStripBaseCondObjDQM::SummaryMEsMap_
std::map< uint32_t, ModMEs > SummaryMEsMap_
Definition: SiStripBaseCondObjDQM.h:113
SiStripBaseCondObjDQM::ModulesToBeExcluded_
std::vector< uint32_t > ModulesToBeExcluded_
Definition: SiStripBaseCondObjDQM.h:135
SiStripBaseCondObjDQM::bookTkMap
void bookTkMap(const std::string &TkMapname)
Definition: SiStripBaseCondObjDQM.cc:1047
SiStripBaseCondObjDQM::reader
SiStripDetInfoFileReader * reader
Definition: SiStripBaseCondObjDQM.h:94
SiStripBaseCondObjDQM::fillMEsForDet
virtual void fillMEsForDet(const ModMEs &selModME_, uint32_t selDetId_)=0
SiStripBaseCondObjDQM::Tk_HM_H
std::unique_ptr< TkHistoMap > Tk_HM_H
Definition: SiStripBaseCondObjDQM.h:118
SiStripBaseCondObjDQM::ModMEs::SummaryDistr
MonitorElement * SummaryDistr
Definition: SiStripBaseCondObjDQM.h:77
SiStripBaseCondObjDQM::fillTkMap
void fillTkMap(const uint32_t &detid, const float &value)
Definition: SiStripBaseCondObjDQM.cc:1049
TrackerTopology.h
SiStripBaseCondObjDQM::GrandSummary_On_
bool GrandSummary_On_
Definition: SiStripBaseCondObjDQM.h:103
SiStripBaseCondObjDQM::getStringNameAndId
std::pair< std::string, uint32_t > getStringNameAndId(const uint32_t &detId_)
Definition: SiStripBaseCondObjDQM.cc:907
dqm::legacy::DQMStore
Definition: DQMStore.h:727
SiStripBaseCondObjDQM::Mod_On_
bool Mod_On_
Definition: SiStripBaseCondObjDQM.h:99
Service.h
SiStripBaseCondObjDQM::all_DetIds
std::vector< uint32_t > all_DetIds
Definition: SiStripBaseCondObjDQM.h:115
SiStripBaseCondObjDQM::getLayerNameAndId
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_)
Definition: SiStripBaseCondObjDQM.cc:827
SiStripBaseCondObjDQM::SiStripBaseCondObjDQM
SiStripBaseCondObjDQM(edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet, const TrackerTopology *tTopo)
Definition: SiStripBaseCondObjDQM.cc:8
SiStripBaseCondObjDQM::Tk_HM_
std::unique_ptr< TkHistoMap > Tk_HM_
Definition: SiStripBaseCondObjDQM.h:117
SiStripBaseCondObjDQM::getModMEs
void getModMEs(ModMEs &CondObj_ME, const uint32_t &detId_)
Definition: SiStripBaseCondObjDQM.cc:300
SiStripBaseCondObjDQM::~SiStripBaseCondObjDQM
virtual ~SiStripBaseCondObjDQM()
Definition: SiStripBaseCondObjDQM.h:42
SiStripDetInfoFileReader.h
TrackerMap
Definition: TrackerMap.h:76
SiStripBaseCondObjDQM::fillSummaryMEs
virtual void fillSummaryMEs(const std::vector< uint32_t > &selectedDetIds)
Definition: SiStripBaseCondObjDQM.cc:1108
TkHistoMap.h
SiStripBaseCondObjDQMGet::token_
tokentype token_
Definition: SiStripBaseCondObjDQM.h:166
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripBaseCondObjDQM::fillModMEs
virtual void fillModMEs(const std::vector< uint32_t > &selectedDetIds)
Definition: SiStripBaseCondObjDQM.cc:1100
SiStripBaseCondObjDQMGet
Definition: SiStripBaseCondObjDQM.h:148
SiStripBaseCondObjDQM::CondObj_fillId_
std::string CondObj_fillId_
Definition: SiStripBaseCondObjDQM.h:109
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripBaseCondObjDQM::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: SiStripBaseCondObjDQM.h:35
value
Definition: value.py:1
SiStripBaseCondObjDQM::bookCumulMEs
void bookCumulMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_)
Definition: SiStripBaseCondObjDQM.cc:441
edm::EventSetup
Definition: EventSetup.h:58
SiStripBaseCondObjDQM::bookSummaryMEs
void bookSummaryMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_)
Definition: SiStripBaseCondObjDQM.cc:751
SiStripBaseCondObjDQM::checkChanged
virtual bool checkChanged(const edm::EventSetup &eSetup)=0
edm::ESGetToken< CondObj, Record >
SiStripBaseCondObjDQM::GetSameLayerDetId
std::vector< uint32_t > GetSameLayerDetId(const std::vector< uint32_t > &activeDetIds, uint32_t selDetId)
Definition: SiStripBaseCondObjDQM.cc:1022
TrackerMap.h
SiStripBaseCondObjDQM::ModMEs::ModMEs
ModMEs()
Definition: SiStripBaseCondObjDQM.h:65
SiStripBaseCondObjDQM::maxValue
double maxValue
Definition: SiStripBaseCondObjDQM.h:104
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
SiStripBaseCondObjDQM::end
virtual void end()
Definition: SiStripBaseCondObjDQM.cc:1096
SiStripBaseCondObjDQM::ModMEs
Definition: SiStripBaseCondObjDQM.h:64
SiStripHistoId
Definition: SiStripHistoId.h:25
SiStripBaseCondObjDQMGet< SiStripBackPlaneCorrection, SiStripBackPlaneCorrectionRcd >::tokentype
typename edm::ESGetToken< SiStripBackPlaneCorrection, SiStripBackPlaneCorrectionRcd > tokentype
Definition: SiStripBaseCondObjDQM.h:150
SiStripBaseCondObjDQM::tTopo_
const TrackerTopology * tTopo_
Definition: SiStripBaseCondObjDQM.h:122
SiStripBaseCondObjDQM::getSummaryMEs
void getSummaryMEs(ModMEs &CondObj_ME, const uint32_t &detId_)
Definition: SiStripBaseCondObjDQM.cc:333
DetId.h
ESWatcher.h
SiStripBaseCondObjDQM::CondObj_name_
std::string CondObj_name_
Definition: SiStripBaseCondObjDQM.h:110
SiStripBaseCondObjDQM::SummaryOnStringLevel_On_
bool SummaryOnStringLevel_On_
Definition: SiStripBaseCondObjDQM.h:102
SiStripFolderOrganizer
Definition: SiStripFolderOrganizer.h:27
SiStripBaseCondObjDQM::ModMEs::SummaryOfCumulDistr
MonitorElement * SummaryOfCumulDistr
Definition: SiStripBaseCondObjDQM.h:76
SiStripBaseCondObjDQM::fPSet_
edm::ParameterSet fPSet_
Definition: SiStripBaseCondObjDQM.h:97
EventSetup.h
SiStripBaseCondObjDQMGet::SiStripBaseCondObjDQMGet
SiStripBaseCondObjDQMGet(tokentype token, edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet, const TrackerTopology *tTopo)
Definition: SiStripBaseCondObjDQM.h:151
SiStripBaseCondObjDQM::hPSet_
edm::ParameterSet hPSet_
Definition: SiStripBaseCondObjDQM.h:96
SiStripBaseCondObjDQM::SubDetectorsToBeExcluded_
std::vector< std::string > SubDetectorsToBeExcluded_
Definition: SiStripBaseCondObjDQM.h:137
SiStripBaseCondObjDQM::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: SiStripBaseCondObjDQM.h:34
SiStripBaseCondObjDQM::minValue
double minValue
Definition: SiStripBaseCondObjDQM.h:104
SiStripBaseCondObjDQM::condDataMonitoringMode_
std::string condDataMonitoringMode_
Definition: SiStripBaseCondObjDQM.h:139
SiStripBaseCondObjDQM::runNumber_
edm::RunNumber_t runNumber_
Definition: SiStripBaseCondObjDQM.h:144
ParameterSet.h
SiStripBaseCondObjDQMGet::getConditionObject
void getConditionObject(const edm::EventSetup &eSetup) override
Definition: SiStripBaseCondObjDQM.h:159
SiStripBaseCondObjDQMGet::condObj_
const CondObj * condObj_
Definition: SiStripBaseCondObjDQM.h:163
SiStripBaseCondObjDQM::bookSummaryProfileMEs
void bookSummaryProfileMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_)
Definition: SiStripBaseCondObjDQM.cc:475
SiStripBaseCondObjDQM::dqmStore_
DQMStore * dqmStore_
Definition: SiStripBaseCondObjDQM.h:143
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316