-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTreeFinalizer.h
More file actions
69 lines (46 loc) · 1.82 KB
/
TreeFinalizer.h
File metadata and controls
69 lines (46 loc) · 1.82 KB
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
67
68
69
// ------------------------------------------------------------
//
// TreeFinalizer - Base class for finalizing the analysis
// Used in the Ntp1 tree workflow, after a Ntp1Analyzer
// class has produced 2nd level trees
// (and merge_and_setWeights has done its job)
//
// It is an abstract class: the method 'finalize' has to be
// implemented.
//
// ------------------------------------------------------------
#include <vector>
#include "TChain.h"
#include "TH1F.h"
#include "TFile.h"
class TreeFinalizer {
public:
TreeFinalizer( const std::string& analyzerType, const std::string& dataset, const std::string& flags="" );
virtual ~TreeFinalizer();
void createOutputFile( const std::string& additionalFlags="" );
virtual void addInput(const std::string& dataset);
std::vector<TH1F*> getResponseHistos(const std::string& name, unsigned binArraySize, Double_t* ptBins);
void writeResponseHistos( TFile* file, std::vector<TH1F*> h1_response, std::string dirName );
TChain* get_tree() { return tree_; };
TFile* get_outFile() { return outFile_; };
bool get_DEBUG() { return DEBUG_; };
std::string getJetType() const;
void set_outFile( const std::string& fileName="", const std::string& suffix="" );
void set_inputAnalyzerType( const std::string& analyzerType ) { inputAnalyzerType_ = analyzerType; };
void set_inputFileDir( const std::string& inputDir ) { inputFileDir_ = inputDir; };
void set_flags( const std::string& flags ) { flags_ = flags; };
void set_DEBUG( bool DEBUG ) { DEBUG_ = DEBUG; };
virtual void finalize() = 0;
TChain* tree_;
float nCounter_;
float nCounterW_;
float nCounterPU_;
std::string analyzerType_;
std::string inputFileDir_;
std::string inputAnalyzerType_;
std::string dataset_;
std::string flags_;
TFile* outFile_;
bool DEBUG_;
private:
};