StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjVertexWriter.h
1 // -*- mode: c++;-*-
2 // $Id: StjVertexWriter.h,v 1.1 2008/08/13 19:37:30 tai Exp $
3 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
4 #ifndef STJVERTEXWRITER_H
5 #define STJVERTEXWRITER_H
6 
7 #include <TObject.h>
8 
9 #include <Rtypes.h>
10 
11 #include <string>
12 
13 class TDirectory;
14 class TTree;
15 
16 class StjVertex;
17 
18 class StjVertexWriter : public TObject {
19 
20 public:
21  StjVertexWriter(const char *treeName, const char* treeTitle,
22  TDirectory* file, StjVertex* vertex)
23  : _treeName(treeName), _treeTitle(treeName)
24  , _file(file), _vertex(vertex)
25  { }
26  virtual ~StjVertexWriter() { }
27 
28  void Init();
29  void Make();
30  void Finish();
31 
32 private:
33 
34  std::string _treeName;
35  std::string _treeTitle;
36 
37  TDirectory* _file;
38  TTree* _tree;
39 
40  StjVertex* _vertex;
41 
42  Int_t _runNumber;
43  Int_t _eventId;
44  Double_t _vertexZ;
45  Double_t _vertexY;
46  Double_t _vertexX;
47 
48  ClassDef(StjVertexWriter, 1)
49 
50 };
51 
52 #endif // STJVERTEXWRITER_H