star-travex
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StiTreeMaker.h
Go to the documentation of this file.
1 #ifndef StiTreeMaker_h
2 #define StiTreeMaker_h
3 
4 #include <string>
5 
6 #include "TFile.h"
7 #include "TTree.h"
8 
9 #include "StChain/StMaker.h"
10 #include "StiRootIO/TStiEvent.h"
11 
12 
13 class StiTreeMaker : public StMaker
14 {
15 public:
16 
17  StiTreeMaker(const std::string &name="StiTreeMaker", const std::string &suffix="stitree");
18  virtual ~StiTreeMaker();
19  virtual Int_t Init();
20  virtual Int_t Make() = 0;
21  virtual void Clear(Option_t *opt = "");
22  virtual Int_t Finish();
23 
24 protected:
25 
26  virtual void SetEventTree() = 0;
27 
28  TFile *fFile;
29  std::string fSuffix;
30  TTree *fTree;
32 
33  ClassDef(StiTreeMaker, 0)
34 };
35 
36 #endif
TFile * fFile
Definition: StiTreeMaker.h:28
virtual ~StiTreeMaker()
virtual void SetEventTree()=0
TTree * fTree
Definition: StiTreeMaker.h:30
virtual void Clear(Option_t *opt="")
Clear the container for the next event.
virtual Int_t Init()
Creates an output ROOT file and a ROOT tree with a user defined structure.
virtual Int_t Finish()
StiTreeMaker(const std::string &name="StiTreeMaker", const std::string &suffix="stitree")
TStiEvent * fEvent
Definition: StiTreeMaker.h:31
std::string fSuffix
A string to append to the output file name.
Definition: StiTreeMaker.h:29
virtual Int_t Make()=0