Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Prototype4DSTReader.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Prototype4DSTReader.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 // $Id: Prototype4DSTReader.h,v 1.7 2015/02/27 23:42:23 jinhuang Exp $
4 
13 #ifndef PROTOTYPE4_PROTOTYPE4DSTREADER_H
14 #define PROTOTYPE4_PROTOTYPE4DSTREADER_H
15 
16 #include "RawTower_Prototype4.h"
17 #include "RawTower_Temperature.h"
18 
19 #include <fun4all/SubsysReco.h>
20 
21 #include <memory>
22 #include <string>
23 #include <vector>
24 
25 class PHCompositeNode;
26 class TClonesArray;
27 class TTree;
28 
33 class Prototype4DSTReader : public SubsysReco
34 {
35  public:
37  virtual ~Prototype4DSTReader();
38 
40  int Init(PHCompositeNode *);
41 
44 
46  int End(PHCompositeNode *);
47 
48  void AddTower(const std::string &name) { _tower_postfix.push_back(name); }
49 
51  {
52  _towertemp_postfix.push_back(name);
53  }
54 
55  void AddRunInfo(const std::string &name) { _runinfo_list.push_back(name); }
57  {
58  _eventinfo_list.push_back(name);
59  }
60 
62  double get_tower_zero_sup() { return _tower_zero_sup; }
63 
65  void set_tower_zero_sup(double b) { _tower_zero_sup = b; }
66 
67  protected:
68  // std::vector<std::string> _node_postfix;
69  std::vector<std::string> _tower_postfix;
71  std::vector<std::string> _towertemp_postfix;
72  // std::vector<std::string> _jet_postfix;
73  // std::vector<std::string> _node_name;
74  std::vector<std::string> _runinfo_list;
75  std::vector<std::string> _eventinfo_list;
76 
77  int nblocks;
78 
79  typedef std::shared_ptr<TClonesArray> arr_ptr;
80 
81  struct record
82  {
83  unsigned int _cnt;
85  arr_ptr _arr;
86  TClonesArray *_arr_ptr;
87  double _dvalue;
88 
89  enum enu_type
90  {
91  typ_hit,
92  typ_part,
93  typ_vertex,
94  typ_tower,
95  typ_jets,
99  };
100  enu_type _type;
101  };
102  typedef std::vector<record> records_t;
104 
106 
108 
109  int _event;
110 
112 
113  // TFile * _file;
114  TTree *_T;
115 
117  double _tower_zero_sup;
118 
119  void build_tree();
120 };
121 
122 #endif