|
|
Go to the documentation of this file. 1 #ifndef DQMOffline_Muon_GEMOfflineDQMBase_h
2 #define DQMOffline_Muon_GEMOfflineDQMBase_h
18 typedef std::map<MEMapKey1, MonitorElement*>
MEMap1;
19 typedef std::map<MEMapKey2, MonitorElement*>
MEMap2;
20 typedef std::map<MEMapKey3, MonitorElement*>
MEMap3;
33 template <
typename AnyKey>
36 template <
typename AnyKey>
37 void fillME(std::map<AnyKey, MonitorElement*>&,
const AnyKey&,
const float);
39 template <
typename AnyKey>
40 void fillME(std::map<AnyKey, MonitorElement*>&,
const AnyKey&,
const float,
const float y);
43 inline bool checkRefs(
const std::vector<T*>&);
60 TString y_title =
"Entries") {
68 std::vector<double>& x_binning,
70 TString y_title =
"Entries") {
73 TH1F* h_obj =
new TH1F(
name,
title, x_binning.size() - 1, &x_binning[0]);
86 TString y_title =
"") {
110 return max_vfat * (
ieta - 1) + vfat_phi;
119 return n_chambers * (
chamber - 1) + layer;
122 template <
typename T>
126 if (refs.front() ==
nullptr)
131 template <
typename AnyKey>
133 if constexpr (std::is_same_v<AnyKey, MEMapKey1>) {
134 return TString::Format(
"Region %d, Station %d.", std::get<0>(
key), std::get<1>(
key));
136 }
else if constexpr (std::is_same_v<AnyKey, MEMapKey2>) {
137 const char* superchamber_type = std::get<2>(
key) ?
"Odd" :
"Even";
138 return TString::Format(
139 "Region %d, Station %d, %s Superchamber", std::get<0>(
key), std::get<1>(
key), superchamber_type);
141 }
else if constexpr (std::is_same_v<AnyKey, MEMapKey3>) {
142 const char* superchamber_type = std::get<2>(
key) ?
"Odd" :
"Even";
143 return TString::Format(
"Region %d, Station %d, %s Superchamber, Roll %d",
150 return TString::Format(
"unknown key type: %s",
typeid(
key).
name());
154 template <
typename AnyKey>
156 if (me_map.find(
key) == me_map.end()) {
161 me_map[
key]->Fill(
x);
165 template <
typename AnyKey>
170 if (me_map.find(
key) == me_map.end()) {
175 me_map[
key]->Fill(
x,
y);
179 #endif // DQMOffline_Muon_GEMOfflineDQMBase_h
MonitorElement * book2D(TString name, TString title, int nbinsx, double xlow, double xup, int nbinsy, double ylow, double yup, TString x_title="", TString y_title="")
std::tuple< int, int, bool, int > MEMapKey3
DQMStore::IBooker * ibooker_
std::map< MEMapKey3, MonitorElement * > MEMap3
int getVFATNumberByStrip(const int, const int, const int)
GEMOfflineDQMBase(const edm::ParameterSet &)
const TString title_suffix_
int getMaxVFAT(const int)
const TString name_suffix_
int getVFATNumber(const int, const int, const int)
static const int maxVFatGE21_
std::string log_category_
void setDetLabelsEta(MonitorElement *, const GEMStation *)
std::tuple< int, int, bool > MEMapKey2
int getNumEtaPartitions(const GEMStation *)
static const int maxVFatGE11_
std::map< MEMapKey2, MonitorElement * > MEMap2
void fillME(std::map< AnyKey, MonitorElement * > &, const AnyKey &, const float)
std::tuple< int, int > MEMapKey1
bool checkRefs(const std::vector< T * > &)
TString convertKeyToStr(const AnyKey &key)
std::map< MEMapKey1, MonitorElement * > MEMap1
void setDetLabelsVFAT(MonitorElement *, const GEMStation *)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * book1D(TString name, TString title, int nbinsx, double xlow, double xup, TString x_title="", TString y_title="Entries")
static const int maxChan_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * book1D(TString name, TString title, std::vector< double > &x_binning, TString x_title="", TString y_title="Entries")
BookingHelper(DQMStore::IBooker &ibooker, const TString &name_suffix, const TString &title_suffix)
int getDetOccXBin(const int, const int, const int)