CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EgHLTEleHLTFilterMon.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_TRIGGER_EGHLTELEHLTFILTERMON
2 #define DQMOFFLINE_TRIGGER_EGHLTELEHLTFILTERMON
3 
4 //class: EleHLTFilterMon
5 //
6 //author: Sam Harper (June 2008)
7 //
8 //WARNING: interface is NOT final, please dont use this class for now without clearing it with me
9 // as I will change it and possibly break all your code
10 //
11 //aim: this object will manage all histograms associated with a particular HLT filter
12 // ie histograms for computing efficiency of each filter step, id efficiency of gsf electrons passing trigger etc
13 //
14 //implimentation:
15 //
16 //
17 
21 
29 
30 #include <string>
31 
32 namespace trigger{
33  class TriggerObject;
34 }
35 
36 namespace egHLT {
37  class BinData;
38  class CutMasks;
40 
41  public:
42 
43 
44  //comparision functor for EleHLTFilterMon
45  //short for: pointer compared with string
46  struct ptrCompStr : public std::binary_function<const EleHLTFilterMon*,const std::string&,bool> {
47  bool operator()(const EleHLTFilterMon* lhs,const std::string& rhs){return lhs->filterName()<rhs;}
48  bool operator()(const std::string& lhs,const EleHLTFilterMon* rhs){return lhs<rhs->filterName();}
49  };
50  //yes I am aware that such a function undoubtably exists but it was quicker to write it than look it up
51  template<class T> struct ptrLess : public std::binary_function<const T*,const T*,bool> {
52  bool operator()(const T* lhs,const T* rhs){return *lhs<*rhs;}
53  };
54 
55  private:
56  std::string filterName_;
58 
59  //we own the pointers in the vectors
60  //std::vector<MonElemManagerBase<OffEle>*> eleMonElems_;
61  std::vector<MonElemManagerBase<trigger::TriggerObject>*> trigMonElems_;
62  // std::vector<MonElemManagerBase<OffEle>*> eleFailMonElems_;
63  // std::vector<MonElemWithCutBase<OffEle>*> eleEffHists_;
64  std::vector<MonElemContainer<OffEle>*> eleEffHists_;
65  std::vector<MonElemContainer<OffEle>*> eleMonElems_;
66  std::vector<MonElemContainer<OffEle>*> eleFailMonElems_;
67 
68  //we also own these pointers
73 
74  //disabling copying
76  EleHLTFilterMon& operator=(const EleHLTFilterMon&){return *this;}
77  public:
78  EleHLTFilterMon(const std::string& filterName,TrigCodes::TrigBitSet filterBit,const BinData& bins,const CutMasks& masks);
80 
81 
82  void fill(const OffEvt& evt,float weight);
83 
84  //sort by filter name
85  bool operator<(const EleHLTFilterMon& rhs)const{return filterName_<rhs.filterName_;}
86  //bool operator<(const std::string& rhs)const{return filterName_<rhs;}
87  const std::string& filterName()const{return filterName_;}
88 
89  };
90 }
91 
92 
93 
94 #endif
const TrigCodes::TrigBitSet filterBit_
std::vector< MonElemContainer< OffEle > * > eleMonElems_
MonElemManagerBase< ParticlePair< OffEle > > * diEleMassOnlyOneHighME_
const std::string & filterName() const
void fill(const OffEvt &evt, float weight)
MonElemManagerBase< ParticlePair< OffEle > > * diEleMassBothHighME_
std::vector< MonElemContainer< OffEle > * > eleEffHists_
std::vector< MonElemManagerBase< trigger::TriggerObject > * > trigMonElems_
EleHLTFilterMon & operator=(const EleHLTFilterMon &)
std::vector< MonElemContainer< OffEle > * > eleFailMonElems_
bool operator<(const EleHLTFilterMon &rhs) const
MonElemManagerBase< ParticlePair< OffEle > > * diEleMassBothME_
EleHLTFilterMon(const EleHLTFilterMon &)
bool operator()(const EleHLTFilterMon *lhs, const std::string &rhs)
bool operator()(const std::string &lhs, const EleHLTFilterMon *rhs)
MonElemManagerBase< ParticlePair< OffEle > > * diEleMassOnlyOneME_
long double T
bool operator()(const T *lhs, const T *rhs)
std::bitset< maxNrBits_ > TrigBitSet
static const uint32_t masks[]
Definition: CaloRecHit.cc:12