CMS 3D CMS Logo

TrigTowerQuantity.h
Go to the documentation of this file.
1 #ifndef TrigTowerQuantity_h
2 #define TrigTowerQuantity_h
3 
10 
11 namespace hcaldqm {
12  namespace quantity {
14  fTTiphi = 0,
15  fTTieta = 1,
16  fTTdepth = 2,
17  fTTSubdet = 3,
21  };
22 
29  uint32_t getBin_TTiphi(HcalTrigTowerDetId const &);
30  uint32_t getBin_TTieta(HcalTrigTowerDetId const &);
31  uint32_t getBin_TTdepth(HcalTrigTowerDetId const &);
32  uint32_t getBin_TTSubdet(HcalTrigTowerDetId const &);
33  uint32_t getBin_TTSubdetPM(HcalTrigTowerDetId const &);
34  uint32_t getBin_TTieta2x3(HcalTrigTowerDetId const &);
41  std::vector<std::string> getLabels_TTiphi();
42  std::vector<std::string> getLabels_TTieta();
43  std::vector<std::string> getLabels_TTdepth();
44  std::vector<std::string> getLabels_TTSubdet();
45  std::vector<std::string> getLabels_TTSubdetPM();
46  std::vector<std::string> getLabels_TTieta2x3();
47 
49  typedef uint32_t (*getBinType_tid)(HcalTrigTowerDetId const &);
51  typedef std::vector<std::string> (*getLabels_tid)();
65  "TTiphi", "TTieta", "TTdepth", "TTSubdet", "TTSubdetPM", "TTieta"};
66  double const min_tid[nTrigTowerQuantityType] = {0.5, 0, -0.5, 0, 0, 0};
67  double const max_tid[nTrigTowerQuantityType] = {72.5, 82, 0.5, 2, 4, 8};
68  int const nbins_tid[nTrigTowerQuantityType] = {72, 82, 1, 2, 4, 8};
69 
70  class TrigTowerQuantity : public Quantity {
71  public:
75  ~TrigTowerQuantity() override {}
77 
78  int getValue(HcalTrigTowerDetId const &tid) override { return getValue_functions_tid[_type](tid); }
79  uint32_t getBin(HcalTrigTowerDetId const &tid) override { return getBin_functions_tid[_type](tid); }
80 
81  QuantityType type() override { return fTrigTowerQuantity; }
82  int nbins() override { return nbins_tid[_type]; }
83  double min() override { return min_tid[_type]; }
84  double max() override { return max_tid[_type]; }
85  bool isCoordinate() override { return true; }
86  std::vector<std::string> getLabels() override { return getLabels_functions_tid[_type](); }
87 
88  protected:
90  };
91  } // namespace quantity
92 } // namespace hcaldqm
93 
94 #endif
hcaldqm::quantity::getTid_TTdepth
HcalTrigTowerDetId getTid_TTdepth(int)
Definition: TrigTowerQuantity.cc:38
hcaldqm::quantity::fTTSubdet
Definition: TrigTowerQuantity.h:17
hcaldqm::quantity::getBin_TTSubdetPM
uint32_t getBin_TTSubdetPM(HcalTrigTowerDetId const &)
Definition: TrigTowerQuantity.cc:30
hcaldqm::quantity::getTid_tid
HcalTrigTowerDetId(* getTid_tid)(int)
Definition: TrigTowerQuantity.h:50
hcaldqm::quantity::getBin_functions_tid
const getBinType_tid getBin_functions_tid[nTrigTowerQuantityType]
Definition: TrigTowerQuantity.h:54
hcaldqm::quantity::getValueType_tid
int(* getValueType_tid)(HcalTrigTowerDetId const &)
Definition: TrigTowerQuantity.h:48
hcaldqm::quantity::TrigTowerQuantity::makeCopy
TrigTowerQuantity * makeCopy() override
Definition: TrigTowerQuantity.h:76
hcaldqm::quantity::getValue_TTieta
int getValue_TTieta(HcalTrigTowerDetId const &)
Definition: TrigTowerQuantity.cc:7
hcaldqm::quantity::TrigTowerQuantity::min
double min() override
Definition: TrigTowerQuantity.h:83
hcaldqm::quantity::getLabels_TTieta
std::vector< std::string > getLabels_TTieta()
Definition: TrigTowerQuantity.cc:54
hcaldqm::quantity::getLabels_TTieta2x3
std::vector< std::string > getLabels_TTieta2x3()
Definition: TrigTowerQuantity.cc:64
hcaldqm
Definition: Constants.h:8
hcaldqm::quantity::fTTiphi
Definition: TrigTowerQuantity.h:14
hcaldqm::quantity::getTid_TTieta
HcalTrigTowerDetId getTid_TTieta(int)
Definition: TrigTowerQuantity.cc:36
hcaldqm::quantity::getValue_functions_tid
const getValueType_tid getValue_functions_tid[nTrigTowerQuantityType]
Definition: TrigTowerQuantity.h:52
hcaldqm::quantity::TrigTowerQuantity::_type
TrigTowerQuantityType _type
Definition: TrigTowerQuantity.h:89
hcaldqm::quantity::getBin_TTieta2x3
uint32_t getBin_TTieta2x3(HcalTrigTowerDetId const &)
Definition: TrigTowerQuantity.cc:32
hcaldqm::quantity::name_tid
const std::string name_tid[nTrigTowerQuantityType]
Definition: TrigTowerQuantity.h:64
hcaldqm::quantity::TrigTowerQuantity::nbins
int nbins() override
Definition: TrigTowerQuantity.h:82
hcaldqm::quantity::getTid_TTiphi
HcalTrigTowerDetId getTid_TTiphi(int)
Definition: TrigTowerQuantity.cc:34
hcaldqm::quantity::fTTieta2x3
Definition: TrigTowerQuantity.h:19
hcaldqm::quantity::Quantity::isLog
virtual bool isLog()
Definition: Quantity.h:35
hcaldqm::quantity::TrigTowerQuantity::getLabels
std::vector< std::string > getLabels() override
Definition: TrigTowerQuantity.h:86
hcaldqm::quantity::getLabels_TTSubdet
std::vector< std::string > getLabels_TTSubdet()
Definition: TrigTowerQuantity.cc:76
hcaldqm::quantity::getLabels_functions_tid
const getLabels_tid getLabels_functions_tid[nTrigTowerQuantityType]
Definition: TrigTowerQuantity.h:58
hcaldqm::quantity::fTTieta
Definition: TrigTowerQuantity.h:15
hcaldqm::quantity::getBin_TTieta
uint32_t getBin_TTieta(HcalTrigTowerDetId const &)
Definition: TrigTowerQuantity.cc:24
hcaldqm::quantity::getBin_TTiphi
uint32_t getBin_TTiphi(HcalTrigTowerDetId const &)
Definition: TrigTowerQuantity.cc:22
hcaldqm::quantity::fTTdepth
Definition: TrigTowerQuantity.h:16
hcaldqm::quantity::TrigTowerQuantityType
TrigTowerQuantityType
Definition: TrigTowerQuantity.h:13
hcaldqm::quantity::getBin_TTdepth
uint32_t getBin_TTdepth(HcalTrigTowerDetId const &)
Definition: TrigTowerQuantity.cc:26
hcaldqm::quantity::getLabels_TTdepth
std::vector< std::string > getLabels_TTdepth()
Definition: TrigTowerQuantity.cc:74
hcaldqm::quantity::getTid_TTSubdetPM
HcalTrigTowerDetId getTid_TTSubdetPM(int)
Definition: TrigTowerQuantity.cc:42
hcaldqm::quantity::getLabels_TTiphi
std::vector< std::string > getLabels_TTiphi()
Definition: TrigTowerQuantity.cc:53
hcaldqm::quantity::TrigTowerQuantity::TrigTowerQuantity
TrigTowerQuantity()
Definition: TrigTowerQuantity.h:72
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
hcaldqm::quantity::TrigTowerQuantity::type
QuantityType type() override
Definition: TrigTowerQuantity.h:81
MjjMonitor_cfi.quantity
quantity
Definition: MjjMonitor_cfi.py:10
hcaldqm::quantity::TrigTowerQuantity::isCoordinate
bool isCoordinate() override
Definition: TrigTowerQuantity.h:85
hcaldqm::quantity::TrigTowerQuantity::max
double max() override
Definition: TrigTowerQuantity.h:84
hcaldqm::quantity::max_tid
const double max_tid[nTrigTowerQuantityType]
Definition: TrigTowerQuantity.h:67
hcaldqm::quantity::getValue_TTSubdet
int getValue_TTSubdet(HcalTrigTowerDetId const &)
Definition: TrigTowerQuantity.cc:11
hcaldqm::quantity::TrigTowerQuantity::TrigTowerQuantity
TrigTowerQuantity(TrigTowerQuantityType type, bool isLog=false)
Definition: TrigTowerQuantity.h:73
hcaldqm::quantity::fTTSubdetPM
Definition: TrigTowerQuantity.h:18
hcaldqm::quantity::QuantityType
QuantityType
Definition: Quantity.h:15
hcaldqm::quantity::min_tid
const double min_tid[nTrigTowerQuantityType]
Definition: TrigTowerQuantity.h:66
hcaldqm::quantity::getValue_TTSubdetPM
int getValue_TTSubdetPM(HcalTrigTowerDetId const &)
Definition: TrigTowerQuantity.cc:13
createfilelist.int
int
Definition: createfilelist.py:10
hcaldqm::quantity::getTid_TTSubdet
HcalTrigTowerDetId getTid_TTSubdet(int)
Definition: TrigTowerQuantity.cc:40
hcaldqm::quantity::getValue_TTiphi
int getValue_TTiphi(HcalTrigTowerDetId const &)
Definition: TrigTowerQuantity.cc:5
hcaldqm::quantity::getValue_TTieta2x3
int getValue_TTieta2x3(HcalTrigTowerDetId const &)
Definition: TrigTowerQuantity.cc:18
hcaldqm::quantity::Quantity
Definition: Quantity.h:27
hcaldqm::quantity::fTrigTowerQuantity
Definition: Quantity.h:18
hcaldqm::quantity::getBin_TTSubdet
uint32_t getBin_TTSubdet(HcalTrigTowerDetId const &)
Definition: TrigTowerQuantity.cc:28
hcaldqm::quantity::TrigTowerQuantity::~TrigTowerQuantity
~TrigTowerQuantity() override
Definition: TrigTowerQuantity.h:75
hcaldqm::quantity::getBinType_tid
uint32_t(* getBinType_tid)(HcalTrigTowerDetId const &)
Definition: TrigTowerQuantity.h:49
hcaldqm::quantity::Quantity::_isLog
bool _isLog
Definition: Quantity.h:72
Quantity.h
hcaldqm::quantity::getTid_functions_tid
const getTid_tid getTid_functions_tid[nTrigTowerQuantityType]
Definition: TrigTowerQuantity.h:56
hcaldqm::quantity::nTrigTowerQuantityType
Definition: TrigTowerQuantity.h:20
type
type
Definition: HCALResponse.h:21
hcaldqm::quantity::TrigTowerQuantity::getBin
uint32_t getBin(HcalTrigTowerDetId const &tid) override
Definition: TrigTowerQuantity.h:79
hcaldqm::quantity::TrigTowerQuantity
Definition: TrigTowerQuantity.h:70
hcaldqm::quantity::getLabels_TTSubdetPM
std::vector< std::string > getLabels_TTSubdetPM()
Definition: TrigTowerQuantity.cc:83
hcaldqm::quantity::getTid_TTieta2x3
HcalTrigTowerDetId getTid_TTieta2x3(int)
Definition: TrigTowerQuantity.cc:46
hcaldqm::quantity::nbins_tid
const int nbins_tid[nTrigTowerQuantityType]
Definition: TrigTowerQuantity.h:68
hcaldqm::quantity::getValue_TTdepth
int getValue_TTdepth(HcalTrigTowerDetId const &)
Definition: TrigTowerQuantity.cc:9
hcaldqm::quantity::getLabels_tid
std::vector< std::string >(* getLabels_tid)()
Definition: TrigTowerQuantity.h:51
hcaldqm::quantity::TrigTowerQuantity::getValue
int getValue(HcalTrigTowerDetId const &tid) override
Definition: TrigTowerQuantity.h:78
HcalTrigTowerDetId
Definition: HcalTrigTowerDetId.h:14