3.4.3pre11
Rev | Line | |
---|
[d7d2da3] | 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 |
|
---|
[341014c] | 21 | class ExRootTreeWriter: public TNamed
|
---|
[d7d2da3] | 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 |
|
---|
[84b9ec6] | 30 | TTree* GetTree() { return fTree; }
|
---|
| 31 | void SetTree(TTree* t) { fTree = t; }
|
---|
| 32 |
|
---|
[d7d2da3] | 33 | ExRootTreeBranch *NewBranch(const char *name, TClass *cl);
|
---|
[dc883b4] | 34 | void AddInfo(const char *name, Double_t value);
|
---|
[d7d2da3] | 35 |
|
---|
| 36 | void Clear();
|
---|
| 37 | void Fill();
|
---|
| 38 | void Write();
|
---|
| 39 |
|
---|
| 40 | private:
|
---|
| 41 | TTree *NewTree();
|
---|
| 42 |
|
---|
| 43 | TFile *fFile; //!
|
---|
| 44 | TTree *fTree; //!
|
---|
| 45 |
|
---|
| 46 | TString fTreeName; //!
|
---|
| 47 |
|
---|
[341014c] | 48 | std::set<ExRootTreeBranch *> fBranches; //!
|
---|
[d7d2da3] | 49 |
|
---|
| 50 | ClassDef(ExRootTreeWriter, 1)
|
---|
| 51 | };
|
---|
| 52 |
|
---|
| 53 | #endif /* ExRootTreeWriter */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.