CMS 3D CMS Logo

APVGainHelpers.h
Go to the documentation of this file.
1 #ifndef CALIBTRACKER_SISTRIPCHANNELGAIN_APVGAINHELPERS_H
2 #define CALIBTRACKER_SISTRIPCHANNELGAIN_APVGAINHELPERS_H
3 
8 
9 #include <string>
10 #include <vector>
11 #include <utility>
12 #include <cstdint>
13 #include <unordered_map>
14 
15 namespace APVGain {
16 
18 
19  int subdetectorId(uint32_t);
20  int subdetectorId(const std::string&);
21  int subdetectorSide(uint32_t, const TrackerTopology*);
22  int subdetectorSide(const std::string&);
23  int subdetectorPlane(uint32_t, const TrackerTopology*);
24  int subdetectorPlane(const std::string&);
25 
26  std::vector<std::pair<std::string, std::string>> monHnames(std::vector<std::string>, bool, const char* tag);
27 
28  struct APVmon {
29  public:
30  APVmon(int v1, int v2, int v3, MonitorElement* v4)
32 
34 
36 
38 
40 
41  void printAll() {
42  LogDebug("APVGainHelpers") << "subDetectorID:" << m_subdetectorId << std::endl;
43  LogDebug("APVGainHelpers") << "subDetectorSide:" << m_subdetectorSide << std::endl;
44  LogDebug("APVGainHelpers") << "subDetectorPlane:" << m_subdetectorPlane << std::endl;
45  LogDebug("APVGainHelpers") << "histoName:" << m_monitor->getName() << std::endl;
46  return;
47  }
48 
49  private:
54  };
55 
57  public:
59  : EventStats(),
60  Charge_Vs_Index(7),
61  Charge_1(),
62  Charge_2(),
63  Charge_3(),
64  Charge_4(),
73  NStripAPVs(0),
74  NPixelDets(0),
76  APVsColl() {}
77 
79  std::vector<dqm::reco::MonitorElement*> Charge_Vs_Index;
80  std::array<std::vector<dqm::reco::MonitorElement*>, 7> Charge_1;
81  std::array<std::vector<dqm::reco::MonitorElement*>, 7> Charge_2;
82  std::array<std::vector<dqm::reco::MonitorElement*>, 7> Charge_3;
83  std::array<std::vector<dqm::reco::MonitorElement*>, 7>
86  std::vector<dqm::reco::MonitorElement*> Charge_Vs_PathlengthTIB;
87  std::vector<dqm::reco::MonitorElement*> Charge_Vs_PathlengthTOB;
88  std::vector<dqm::reco::MonitorElement*> Charge_Vs_PathlengthTIDP;
89  std::vector<dqm::reco::MonitorElement*> Charge_Vs_PathlengthTIDM;
90  std::vector<dqm::reco::MonitorElement*> Charge_Vs_PathlengthTECP1;
91  std::vector<dqm::reco::MonitorElement*> Charge_Vs_PathlengthTECP2;
92  std::vector<dqm::reco::MonitorElement*> Charge_Vs_PathlengthTECM1;
93  std::vector<dqm::reco::MonitorElement*> Charge_Vs_PathlengthTECM2;
94  mutable std::atomic<unsigned int> NStripAPVs;
95  mutable std::atomic<unsigned int> NPixelDets;
96  std::vector<std::shared_ptr<stAPVGain>> APVsCollOrdered;
97  std::unordered_map<unsigned int, std::shared_ptr<stAPVGain>> APVsColl;
98  };
99 
100  std::vector<MonitorElement*> FetchMonitor(std::vector<APVmon>, uint32_t, const TrackerTopology* topo = nullptr);
101  std::vector<unsigned int> FetchIndices(std::map<unsigned int, APVloc>,
102  uint32_t,
103  const TrackerTopology* topo = nullptr);
104 
105 }; // namespace APVGain
106 
107 #endif
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
MessageLogger.h
APVGain::APVGainHistograms::APVsColl
std::unordered_map< unsigned int, std::shared_ptr< stAPVGain > > APVsColl
Definition: APVGainHelpers.h:97
APVGain::APVGainHistograms::Charge_Vs_PathlengthTECM1
std::vector< dqm::reco::MonitorElement * > Charge_Vs_PathlengthTECM1
Definition: APVGainHelpers.h:92
APVGain::APVGainHistograms::APVGainHistograms
APVGainHistograms()
Definition: APVGainHelpers.h:58
APVGain::FetchIndices
std::vector< unsigned int > FetchIndices(std::map< unsigned int, APVloc >, uint32_t, const TrackerTopology *topo=nullptr)
Definition: APVGainHelpers.cc:141
APVGain::APVGainHistograms::Charge_3
std::array< std::vector< dqm::reco::MonitorElement * >, 7 > Charge_3
Definition: APVGainHelpers.h:82
TrackerTopology
Definition: TrackerTopology.h:16
APVGain::APVmon::m_monitor
MonitorElement * m_monitor
Definition: APVGainHelpers.h:53
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
APVGain::APVGainHistograms::Charge_4
std::array< std::vector< dqm::reco::MonitorElement * >, 7 > Charge_4
Definition: APVGainHelpers.h:84
APVGain::APVmon
Definition: APVGainHelpers.h:28
APVGain::APVmon::m_subdetectorId
int m_subdetectorId
Definition: APVGainHelpers.h:50
APVGain::subdetectorPlane
int subdetectorPlane(uint32_t, const TrackerTopology *)
Definition: APVGainHelpers.cc:76
APVGainStruct.h
APVGain::APVGainHistograms::Charge_Vs_PathlengthTIB
std::vector< dqm::reco::MonitorElement * > Charge_Vs_PathlengthTIB
Definition: APVGainHelpers.h:86
APVGain::APVGainHistograms::Charge_Vs_PathlengthTOB
std::vector< dqm::reco::MonitorElement * > Charge_Vs_PathlengthTOB
Definition: APVGainHelpers.h:87
APVGain::APVGainHistograms::Charge_Vs_PathlengthTIDM
std::vector< dqm::reco::MonitorElement * > Charge_Vs_PathlengthTIDM
Definition: APVGainHelpers.h:89
APVGain::APVGainHistograms::Charge_Vs_PathlengthTIDP
std::vector< dqm::reco::MonitorElement * > Charge_Vs_PathlengthTIDP
Definition: APVGainHelpers.h:88
APVGain::APVGainHistograms::NPixelDets
std::atomic< unsigned int > NPixelDets
Definition: APVGainHelpers.h:95
TrackerTopology.h
APVGain
Definition: APVGainHelpers.h:15
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
APVGain::APVmon::getSubdetectorPlane
int getSubdetectorPlane()
Definition: APVGainHelpers.h:37
APVGain::APVGainHistograms::Charge_Vs_Index
std::vector< dqm::reco::MonitorElement * > Charge_Vs_Index
Definition: APVGainHelpers.h:79
APVGain::APVGainHistograms::NStripAPVs
std::atomic< unsigned int > NStripAPVs
Definition: APVGainHelpers.h:94
APVGain::APVGainHistograms::EventStats
dqm::reco::MonitorElement * EventStats
Definition: APVGainHelpers.h:78
APVGain::APVmon::getMonitor
MonitorElement * getMonitor()
Definition: APVGainHelpers.h:39
APVGain::APVGainHistograms::Charge_1
std::array< std::vector< dqm::reco::MonitorElement * >, 7 > Charge_1
Definition: APVGainHelpers.h:80
APVGain::APVGainHistograms::Charge_2
std::array< std::vector< dqm::reco::MonitorElement * >, 7 > Charge_2
Definition: APVGainHelpers.h:81
APVGain::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: APVGainHelpers.h:17
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
APVGain::subdetectorSide
int subdetectorSide(uint32_t, const TrackerTopology *)
Definition: APVGainHelpers.cc:48
APVGain::APVmon::APVmon
APVmon(int v1, int v2, int v3, MonitorElement *v4)
Definition: APVGainHelpers.h:30
APVGain::FetchMonitor
std::vector< MonitorElement * > FetchMonitor(std::vector< APVmon >, uint32_t, const TrackerTopology *topo=nullptr)
Definition: APVGainHelpers.cc:108
APVGain::APVGainHistograms::Charge_Vs_PathlengthTECP2
std::vector< dqm::reco::MonitorElement * > Charge_Vs_PathlengthTECP2
Definition: APVGainHelpers.h:91
APVGain::APVGainHistograms::APVsCollOrdered
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
Definition: APVGainHelpers.h:96
APVGain::APVmon::m_subdetectorPlane
int m_subdetectorPlane
Definition: APVGainHelpers.h:52
APVGain::APVmon::getSubdetectorId
int getSubdetectorId()
Definition: APVGainHelpers.h:33
APVGain::APVmon::printAll
void printAll()
Definition: APVGainHelpers.h:41
APVGain::APVGainHistograms::Charge_Vs_PathlengthTECM2
std::vector< dqm::reco::MonitorElement * > Charge_Vs_PathlengthTECM2
Definition: APVGainHelpers.h:93
dqm::impl::MonitorElement::getName
const std::string & getName() const
get name of ME
Definition: MonitorElement.h:250
APVGain::monHnames
std::vector< std::pair< std::string, std::string > > monHnames(std::vector< std::string >, bool, const char *tag)
Definition: APVGainHelpers.cc:166
APVGain::APVmon::getSubdetectorSide
int getSubdetectorSide()
Definition: APVGainHelpers.h:35
APVGain::APVmon::m_subdetectorSide
int m_subdetectorSide
Definition: APVGainHelpers.h:51
APVGain::APVGainHistograms::Charge_Vs_PathlengthTECP1
std::vector< dqm::reco::MonitorElement * > Charge_Vs_PathlengthTECP1
Definition: APVGainHelpers.h:90
APVGain::APVGainHistograms
Definition: APVGainHelpers.h:56
APVGain::subdetectorId
int subdetectorId(uint32_t)
Definition: APVGainHelpers.cc:15