|
|
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 =
"") {
112 return max_vfat * (
ieta - 1) + vfat_phi;
121 return n_chambers * (
chamber - 1) + layer;
124 template <
typename T>
128 if (refs.front() ==
nullptr)
133 template <
typename AnyKey>
135 if constexpr (std::is_same_v<AnyKey, MEMapKey1>) {
136 return TString::Format(
"Region %d, Station %d.", std::get<0>(
key), std::get<1>(
key));
138 }
else if constexpr (std::is_same_v<AnyKey, MEMapKey2>) {
139 const char* superchamber_type = std::get<2>(
key) ?
"Odd" :
"Even";
140 return TString::Format(
141 "Region %d, Station %d, %s Superchamber", std::get<0>(
key), std::get<1>(
key), superchamber_type);
143 }
else if constexpr (std::is_same_v<AnyKey, MEMapKey3>) {
144 const char* superchamber_type = std::get<2>(
key) ?
"Odd" :
"Even";
145 return TString::Format(
"Region %d, Station %d, %s Superchamber, Roll %d",
152 return TString::Format(
"unknown key type: %s",
typeid(
key).
name());
156 template <
typename AnyKey>
158 if (me_map.find(
key) == me_map.end()) {
163 me_map[
key]->Fill(
x);
167 template <
typename AnyKey>
172 if (me_map.find(
key) == me_map.end()) {
177 me_map[
key]->Fill(
x,
y);
181 #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)
static Station station(uint16_t st)
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 *)
Log< level::Error, false > LogError
static const int maxVFatGE0_
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)