00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #ifndef STAR_StGammaTreeMaker
00013 #define STAR_StGammaTreeMaker
00014
00015 #include <vector>
00016 #include "StMaker.h"
00017 #include "TString.h"
00018
00019 class TTree;
00020 class TFile;
00021 class StGammaEvent;
00022 class StGammaTreeMaker;
00023
00024 class StGammaTreeVersion: public TNamed
00025 {
00026
00027 public:
00028 StGammaTreeVersion(const char *name = "version", const char *title = "Versioning Info");
00029 ~StGammaTreeVersion();
00030
00031 void print();
00032
00033 private:
00034 protected:
00035
00036 std::vector<TString> mMakerTags;
00037 std::vector<TString> mStorageTags;
00038
00039 friend class StGammaTreeMaker;
00040
00041 ClassDef(StGammaTreeVersion, 2);
00042
00043 };
00044
00045 class StGammaTreeMaker: public StMaker
00046 {
00047
00048 public:
00049
00050 StGammaTreeMaker(const char *name = "mGammaTreeMaker" );
00051 ~StGammaTreeMaker();
00052
00053 virtual const char* GetCVS() const
00054 {static const char cvs[] = "Tag $Name: $ $Id: StGammaTreeMaker.h,v 1.5 2008/12/03 15:39:12 betan Exp $ built "__DATE__" "__TIME__; return cvs; }
00055
00056
00057 Int_t Init();
00058 Int_t Make();
00059 void Clear(Option_t *opts="");
00060 Int_t Finish();
00061
00062
00063 TFile *file() { return mGammaFile; }
00064 TTree *tree() { return mGammaTree; }
00065 StGammaEvent *event() { return mGammaEvent; }
00066
00067
00068
00070 void SetFile( TFile *file ) { mGammaFile = file; }
00072 void SetTree( TTree *tree ) { mGammaTree = tree; }
00074 void SetFilename( const Char_t *fname ) { mFilename = fname; }
00075
00076 void skipEmptyEvents() { mSkipEmpty = true; }
00077 void storeEmptyEvents() { mSkipEmpty = false; }
00078
00079 private:
00080
00081 bool mSkipEmpty;
00082
00083 TTree *mGammaTree;
00084 TFile *mGammaFile;
00085
00086 StGammaEvent *mGammaEvent;
00087 TString mFilename;
00088
00089 StGammaTreeVersion mVersion;
00090
00091 ClassDef(StGammaTreeMaker, 2);
00092
00093 };
00094
00095 #endif