StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjTPCTrackListMaker.C
1 #include "StMaker.h"
2 
3 #include "StjTPCMuDst.h"
4 
5 #include "StjTrackListWriter.h"
6 
7 #include <TDirectory.h>
8 
9 class StjTPCTrackListMaker : public StMaker {
10 
11 public:
12 
13  StjTPCTrackListMaker(const Char_t *name, TDirectory* file, StMuDstMaker* uDstMaker)
14  : StMaker(name), _file(file), _uDstMaker(uDstMaker) { }
15  virtual ~StjTPCTrackListMaker() { }
16 
17  const char* GetCVS() const
18  {static const char cvs[]="Tag $Name: $ $Id: StjTPCTrackListMaker.C,v 1.3 2014/08/06 11:43:24 jeromel Exp $ built " __DATE__ " " __TIME__; return cvs;}
19 
20 private:
21 
22  TDirectory* _file;
23 
24  StMuDstMaker* _uDstMaker;
25 
26  StjTPC* _tpc;
27 
28  StjTrackListWriter* _writer;
29 
30 public:
31 
32  Int_t Init()
33  {
34  _tpc = new StjTPCMuDst(_uDstMaker);
35 
36  _writer = new StjTrackListWriter("tpcTracks", _file);
37 
38  return kStOk;
39  }
40 
41  Int_t Make()
42  {
43  StjTrackList trackList = _tpc->getTrackList();
44 
45  _writer->Fill(trackList);
46 
47  return kStOk;
48  }
49 
50  Int_t Finish()
51  {
52  _writer->Finish();
53 
54  return kStOk;
55  }
56 
57  ClassDef(StjTPCTrackListMaker, 0)
58 
59 };
StMaker(const char *name="", const char *dummy=0)
Constructor &amp; Destructor.
Definition: StMaker.cxx:188
Definition: StjTPC.h:12
Definition: Stypes.h:41