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 
9 
10 #include <string>
11 #include <vector>
12 #include <utility>
13 #include <cstdint>
14 #include <unordered_map>
15 
16 namespace APVGain {
17 
18  int subdetectorId(uint32_t);
19  int subdetectorId(const std::string&);
20  int subdetectorSide(uint32_t,const TrackerTopology*);
21  int subdetectorSide(const std::string&);
22  int subdetectorPlane(uint32_t,const TrackerTopology*);
23  int subdetectorPlane(const std::string&);
24 
25  std::vector<std::pair<std::string,std::string>> monHnames(std::vector<std::string>,bool,const char* tag);
26 
27  struct APVmon{
28 
29  public:
30 
31  APVmon(int v1, int v2, int v3,MonitorElement* v4) :
33 
35  return m_subdetectorId;
36  }
37 
39  return m_subdetectorSide;
40  }
41 
43  return m_subdetectorPlane;
44  }
45 
47  return m_monitor;
48  }
49 
50  void printAll(){
51  LogDebug("APVGainHelpers")<< "subDetectorID:" << m_subdetectorId << std::endl;
52  LogDebug("APVGainHelpers")<< "subDetectorSide:" << m_subdetectorSide << std::endl;
53  LogDebug("APVGainHelpers")<< "subDetectorPlane:" << m_subdetectorPlane << std::endl;
54  LogDebug("APVGainHelpers")<< "histoName:" << m_monitor->getName() << std::endl;
55  return;
56  }
57 
58  private:
59 
64 
65  };
66 
68  public:
70  Charge_Vs_Index(7),
71  Charge_1(),
72  Charge_2(),
73  Charge_3(),
74  Charge_4(),
75  Charge_Vs_PathlengthTIB(7),
76  Charge_Vs_PathlengthTOB(7),
77  Charge_Vs_PathlengthTIDP(7),
78  Charge_Vs_PathlengthTIDM(7),
79  Charge_Vs_PathlengthTECP1(7),
80  Charge_Vs_PathlengthTECP2(7),
81  Charge_Vs_PathlengthTECM1(7),
82  Charge_Vs_PathlengthTECM2(7),
83  NStripAPVs(0),
84  NPixelDets(0),
85  APVsCollOrdered(),
86  APVsColl()
87  {
88  }
89 
90  std::vector<ConcurrentMonitorElement> Charge_Vs_Index;
91  std::array< std::vector<ConcurrentMonitorElement>,7 > Charge_1;
92  std::array< std::vector<ConcurrentMonitorElement>,7 > Charge_2;
93  std::array< std::vector<ConcurrentMonitorElement>,7 > Charge_3;
94  std::array< std::vector<ConcurrentMonitorElement>,7 > Charge_4;
96  std::vector<ConcurrentMonitorElement> Charge_Vs_PathlengthTIB;
97  std::vector<ConcurrentMonitorElement> Charge_Vs_PathlengthTOB;
98  std::vector<ConcurrentMonitorElement> Charge_Vs_PathlengthTIDP;
99  std::vector<ConcurrentMonitorElement> Charge_Vs_PathlengthTIDM;
100  std::vector<ConcurrentMonitorElement> Charge_Vs_PathlengthTECP1;
101  std::vector<ConcurrentMonitorElement> Charge_Vs_PathlengthTECP2;
102  std::vector<ConcurrentMonitorElement> Charge_Vs_PathlengthTECM1;
103  std::vector<ConcurrentMonitorElement> Charge_Vs_PathlengthTECM2;
104  mutable std::atomic<unsigned int> NStripAPVs;
105  mutable std::atomic<unsigned int> NPixelDets;
106  std::vector<std::shared_ptr<stAPVGain> > APVsCollOrdered;
107  std::unordered_map<unsigned int, std::shared_ptr<stAPVGain> > APVsColl;
108 
109  };
110 
111  std::vector<MonitorElement*> FetchMonitor(std::vector<APVmon>, uint32_t, const TrackerTopology* topo=nullptr);
112  std::vector<unsigned int> FetchIndices(std::map<unsigned int,APVloc>, uint32_t, const TrackerTopology* topo=nullptr);
113 
114 };
115 
116 #endif
#define LogDebug(id)
std::array< std::vector< ConcurrentMonitorElement >, 7 > Charge_1
std::vector< ConcurrentMonitorElement > Charge_Vs_PathlengthTECM2
MonitorElement * m_monitor
int subdetectorPlane(uint32_t, const TrackerTopology *)
std::vector< ConcurrentMonitorElement > Charge_Vs_PathlengthTECP2
const std::string & getName() const
get name of ME
std::vector< ConcurrentMonitorElement > Charge_Vs_PathlengthTIDM
std::array< std::vector< ConcurrentMonitorElement >, 7 > Charge_2
APVmon(int v1, int v2, int v3, MonitorElement *v4)
std::array< std::vector< ConcurrentMonitorElement >, 7 > Charge_3
int getSubdetectorSide()
std::vector< MonitorElement * > FetchMonitor(std::vector< APVmon >, uint32_t, const TrackerTopology *topo=0)
std::vector< ConcurrentMonitorElement > Charge_Vs_Index
std::atomic< unsigned int > NPixelDets
std::atomic< unsigned int > NStripAPVs
std::vector< unsigned int > FetchIndices(std::map< unsigned int, APVloc >, uint32_t, const TrackerTopology *topo=0)
std::vector< ConcurrentMonitorElement > Charge_Vs_PathlengthTIB
std::vector< ConcurrentMonitorElement > Charge_Vs_PathlengthTECP1
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
std::vector< ConcurrentMonitorElement > Charge_Vs_PathlengthTOB
int subdetectorSide(uint32_t, const TrackerTopology *)
std::unordered_map< unsigned int, std::shared_ptr< stAPVGain > > APVsColl
std::vector< ConcurrentMonitorElement > Charge_Vs_PathlengthTECM1
int getSubdetectorPlane()
MonitorElement * getMonitor()
std::vector< std::pair< std::string, std::string > > monHnames(std::vector< std::string >, bool, const char *tag)
int subdetectorId(uint32_t)
std::array< std::vector< ConcurrentMonitorElement >, 7 > Charge_4
std::vector< ConcurrentMonitorElement > Charge_Vs_PathlengthTIDP