ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4DSTReader.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4DSTReader.h
1 // $Id: PHG4DSTReader.h,v 1.7 2015/02/27 23:42:23 jinhuang Exp $
2 
10 #ifndef G4EVAL_PHG4DSTREADER_H
11 #define G4EVAL_PHG4DSTREADER_H
12 
13 #include <fun4all/SubsysReco.h>
14 
15 #include <boost/smart_ptr.hpp>
16 
17 #include <set>
18 #include <string>
19 #include <vector>
20 
21 class PHCompositeNode;
22 
23 class PHG4Particle;
24 
25 class TClonesArray;
26 class TTree;
27 
32 class PHG4DSTReader : public SubsysReco
33 {
34  public:
35  PHG4DSTReader(const std::string &filename);
36  ~PHG4DSTReader() override;
37 
39  int Init(PHCompositeNode *) override;
40 
42  int process_event(PHCompositeNode *) override;
43 
45  int End(PHCompositeNode *) override;
46 
47  void
48  AddNode(const std::string &name)
49  {
50  _node_postfix.push_back(name);
51  }
52 
53  void
54  AddHit(const std::string &name)
55  {
56  _node_postfix.push_back(name);
57  }
58 
59  void
60  AddTower(const std::string &name)
61  {
62  _tower_postfix.push_back(name);
63  }
64 
65  void
66  AddJet(const std::string &name)
67  {
68  _jet_postfix.push_back(name);
69  }
70 
73  void
75  {
77  }
78 
80  void
82  {
84  }
85 
87  void
89  {
90  _save_particle = b;
91  }
92 
94  void
96  {
97  _save_vertex = b;
98  }
99 
101  double
103  {
104  return _save_particle;
105  }
106 
108  void
110  {
111  _tower_zero_sup = b;
112  }
113 
114  protected:
115  std::vector<std::string> _node_postfix;
116  std::vector<std::string> _tower_postfix;
117  std::vector<std::string> _jet_postfix;
118  // std::vector<std::string> _node_name;
119  int nblocks;
120 
122 
123  struct record
124  {
125  unsigned int _cnt;
126  std::string _name;
128  TClonesArray *_arr_ptr;
129 
130  enum enu_type
131  {
137  };
139  };
140  typedef std::vector<record> records_t;
142 
143  int _event;
144 
145  std::string _out_file_name;
146 
147  // TFile * _file;
148  TTree *_T;
149 
152 
155 
158 
159  typedef std::set<int> PartSet_t;
162 
165 
168 
170  void
172 
173  void
174  build_tree();
175 };
176 
177 #endif /* G4EVAL_PHG4DSTREADER_H */