File indexing completed on 2025-08-06 08:22:01
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef PROTOTYPE3_PROTOTYPE3DSTREADER_H
0014 #define PROTOTYPE3_PROTOTYPE3DSTREADER_H
0015
0016 #include "RawTower_Prototype3.h"
0017 #include "RawTower_Temperature.h"
0018
0019 #include <fun4all/SubsysReco.h>
0020
0021 #include <memory>
0022 #include <string>
0023 #include <vector>
0024
0025 class PHCompositeNode;
0026 class TClonesArray;
0027 class TTree;
0028
0029
0030
0031
0032
0033 class Prototype3DSTReader : public SubsysReco
0034 {
0035 public:
0036 Prototype3DSTReader(const std::string &filename);
0037 virtual ~Prototype3DSTReader();
0038
0039
0040 int Init(PHCompositeNode *);
0041
0042
0043 int process_event(PHCompositeNode *);
0044
0045
0046 int End(PHCompositeNode *);
0047
0048 void AddTower(const std::string &name) { _tower_postfix.push_back(name); }
0049
0050 void AddTowerTemperature(const std::string &name)
0051 {
0052 _towertemp_postfix.push_back(name);
0053 }
0054
0055 void AddRunInfo(const std::string &name) { _runinfo_list.push_back(name); }
0056 void AddEventInfo(const std::string &name)
0057 {
0058 _eventinfo_list.push_back(name);
0059 }
0060
0061
0062 double get_tower_zero_sup() { return _tower_zero_sup; }
0063
0064
0065 void set_tower_zero_sup(double b) { _tower_zero_sup = b; }
0066
0067 protected:
0068
0069 std::vector<std::string> _tower_postfix;
0070
0071 std::vector<std::string> _towertemp_postfix;
0072
0073
0074 std::vector<std::string> _runinfo_list;
0075 std::vector<std::string> _eventinfo_list;
0076
0077 int nblocks;
0078
0079
0080 typedef std::shared_ptr<TClonesArray> arr_ptr;
0081
0082 struct record
0083 {
0084 unsigned int _cnt;
0085 std::string _name;
0086 arr_ptr _arr;
0087 TClonesArray *_arr_ptr;
0088 double _dvalue;
0089
0090 enum enu_type
0091 {
0092 typ_hit,
0093 typ_part,
0094 typ_vertex,
0095 typ_tower,
0096 typ_jets,
0097 typ_runinfo,
0098 typ_eventinfo,
0099 typ_towertemp
0100 };
0101 enu_type _type;
0102 };
0103 typedef std::vector<record> records_t;
0104 records_t _records;
0105
0106 typedef RawTower_Prototype3 RawTower_type;
0107
0108 typedef RawTower_Temperature RawTowerT_type;
0109
0110 int _event;
0111
0112 std::string _out_file_name;
0113
0114
0115 TTree *_T;
0116
0117
0118 double _tower_zero_sup;
0119
0120 void build_tree();
0121 };
0122
0123 #endif