ImprovedOutputFile
Last change
on this file since 1388e73 was 341014c, checked in by Pavel Demin <pavel-demin@…>, 6 years ago |
apply .clang-format to all .h, .cc and .cpp files
|
-
Property mode
set to
100644
|
File size:
854 bytes
|
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 |
|
---|
| 30 | ExRootTreeBranch *NewBranch(const char *name, TClass *cl);
|
---|
| 31 |
|
---|
| 32 | void Clear();
|
---|
| 33 | void Fill();
|
---|
| 34 | void Write();
|
---|
| 35 |
|
---|
| 36 | private:
|
---|
| 37 | TTree *NewTree();
|
---|
| 38 |
|
---|
| 39 | TFile *fFile; //!
|
---|
| 40 | TTree *fTree; //!
|
---|
| 41 |
|
---|
| 42 | TString fTreeName; //!
|
---|
| 43 |
|
---|
[341014c] | 44 | std::set<ExRootTreeBranch *> fBranches; //!
|
---|
[d7d2da3] | 45 |
|
---|
| 46 | ClassDef(ExRootTreeWriter, 1)
|
---|
| 47 | };
|
---|
| 48 |
|
---|
| 49 | #endif /* ExRootTreeWriter */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.