-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEventInfoPrinter.h
66 lines (52 loc) · 1.56 KB
/
EventInfoPrinter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// $Id: EventInfoPrinter.h,v 1.7 2013/04/22 16:21:51 mschrode Exp $
#ifndef EVENT_INFO_PRINTER_H
#define EVENT_INFO_PRINTER_H
#include <list>
#include <map>
#include <set>
#include <vector>
#include "TString.h"
#include "Config.h"
#include "DataSet.h"
#include "Event.h"
class EventInfoPrinter {
public:
EventInfoPrinter(const Config &cfg);
~EventInfoPrinter() {};
private:
static TString runSortVar_;
static bool greaterByRun(const Event* evt1, const Event* evt2) {
return evt1->get(EventInfoPrinter::runSortVar_) < evt2->get(EventInfoPrinter::runSortVar_);
}
const Config &cfg_;
std::map< TString, unsigned int > selectionVariables_;
std::set<TString> printedSelections_;
std::map< TString, std::vector<const Event*> > printedEvts_;
TString outFileName_;
TString latexSlidesName_;
bool init(const TString &key);
void selectEvents();
void print() const;
std::list<TString> listOfPrintedVariables() const;
bool printAllEvents() const;
bool printSelection(const TString &uid) const;
// To sort evts according to one of their quantities
class EvtValPair {
public:
static bool valueGreaterThan(const EvtValPair *idx1, const EvtValPair *idx2);
EvtValPair(const Event *evt, double value)
: evt_(evt), val_(value) {}
const Event* event() const { return evt_; }
double value() const { return val_; }
private:
const Event* evt_;
const double val_;
};
TString varNameNJets;
TString varNameHT;
TString varNameMHT;
TString varNameRunNum;
TString varNameLumiBlockNum;
TString varNameEvtNum;
};
#endif