Line | |
---|
1 | #ifndef ExRootTreeWriter_h
|
---|
2 | #define ExRootTreeWriter_h
|
---|
3 |
|
---|
4 | /** \class ExRootTreeWriter
|
---|
5 | *
|
---|
6 | * Class handling output ROOT tree
|
---|
7 | *
|
---|
8 | * \author P. Demin - UCL, Louvain-la-Neuve
|
---|
9 | *
|
---|
10 | */
|
---|
11 |
|
---|
12 | #include "TNamed.h"
|
---|
13 |
|
---|
14 | #include <set>
|
---|
15 |
|
---|
16 | class TFile;
|
---|
17 | class TTree;
|
---|
18 | class TClass;
|
---|
19 | class ExRootTreeBranch;
|
---|
20 |
|
---|
21 | class ExRootTreeWriter: public TNamed
|
---|
22 | {
|
---|
23 | public:
|
---|
24 | ExRootTreeWriter(TFile *file = 0, const char *treeName = "Analysis");
|
---|
25 | ~ExRootTreeWriter();
|
---|
26 |
|
---|
27 | void SetTreeFile(TFile *file) { fFile = file; }
|
---|
28 | void SetTreeName(const char *name) { fTreeName = name; }
|
---|
29 |
|
---|
30 | ExRootTreeBranch *NewBranch(const char *name, TClass *cl);
|
---|
31 | void AddInfo(const char *name, Double_t value);
|
---|
32 |
|
---|
33 | void Clear();
|
---|
34 | void Fill();
|
---|
35 | void Write();
|
---|
36 |
|
---|
37 | private:
|
---|
38 | TTree *NewTree();
|
---|
39 |
|
---|
40 | TFile *fFile; //!
|
---|
41 | TTree *fTree; //!
|
---|
42 |
|
---|
43 | TString fTreeName; //!
|
---|
44 |
|
---|
45 | std::set<ExRootTreeBranch *> fBranches; //!
|
---|
46 |
|
---|
47 | ClassDef(ExRootTreeWriter, 1)
|
---|
48 | };
|
---|
49 |
|
---|
50 | #endif /* ExRootTreeWriter */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.