18 |
|
|
19 |
|
class CutFlow |
20 |
|
{ |
21 |
+ |
typedef void (CutFlow::*boolType) () const; |
22 |
+ |
|
23 |
|
public: |
24 |
|
CutFlow () {}; |
25 |
< |
CutFlow (map<string, TH1D *> &, const edm::Service<TFileService> &, const string &prefix = ""); |
25 |
> |
CutFlow (const edm::Service<TFileService> &, const string &prefix = ""); |
26 |
|
~CutFlow (); |
27 |
|
bool &operator[] (const string &); |
28 |
|
bool &at (const string &cutName) { return (*this)[cutName]; }; |
29 |
+ |
bool pass () const; |
30 |
+ |
operator boolType () const { return pass () ? &CutFlow::thisTypeDoesNotSupportComparisons : 0; }; |
31 |
|
|
32 |
< |
void fillCutFlow (); |
32 |
> |
void fillCutFlow (double); |
33 |
> |
void fillCutFlow () { fillCutFlow (1.0); }; |
34 |
|
void outputTime (); |
35 |
|
void outputCutFlow (); |
36 |
|
|
37 |
|
private: |
38 |
|
TH1D *cutFlow_; |
39 |
|
TH1D *selection_; |
40 |
< |
TH1D *complementarySelection_; |
40 |
> |
TH1D *rejection_; |
41 |
|
|
42 |
|
TStopwatch sw_; |
43 |
|
string prefix_; |
44 |
|
vector<string> cutNames_; |
45 |
|
map<string, bool> cuts_; |
46 |
+ |
|
47 |
+ |
void thisTypeDoesNotSupportComparisons () const {}; |
48 |
|
}; |
49 |
|
|
50 |
|
#endif |