00001
00002
00003
00004 #ifndef STJSPINWRITER_H
00005 #define STJSPINWRITER_H
00006
00007 #include <TObject.h>
00008
00009 #include <Rtypes.h>
00010
00011 #include <string>
00012
00013 class TDirectory;
00014 class TTree;
00015
00016 class StjSpin;
00017
00018 class StjSpinWriter : public TObject {
00019
00020 public:
00021 StjSpinWriter(const char *treeName, const char* treeTitle,
00022 TDirectory* file, StjSpin* spin)
00023 : _treeName(treeName), _treeTitle(treeName)
00024 , _file(file), _spin(spin)
00025 { }
00026 virtual ~StjSpinWriter() { }
00027
00028 void Init();
00029 void Make();
00030 void Finish();
00031
00032 private:
00033
00034 std::string _treeName;
00035 std::string _treeTitle;
00036
00037 TDirectory* _file;
00038 TTree* _tree;
00039
00040 StjSpin* _spin;
00041
00042 Int_t _runNumber;
00043 Int_t _eventId;
00044 Int_t _bx7;
00045 Int_t _bx48;
00046 Int_t _spin4;
00047 Int_t _bbcTimebin;
00048 Double_t _vertexZ;
00049
00050 ClassDef(StjSpinWriter, 1)
00051
00052 };
00053
00054 #endif // STJSPINWRITER_H