clas12root
Loading...
Searching...
No Matches
calextras.h
Go to the documentation of this file.
1
2/*
3 * File: calextras.h
4 * Author: dglazier
5 *
6 * Created on Feb 16, 2023
7 */
8
9#ifndef CLAS12_CALEXTRAS_H
10#define CLAS12_CALEXTRAS_H
11
12#include <hipo4/bank.h>
13#include <memory>
14
15
16namespace clas12 {
17
18 class calorimeter;
19
20 class calextras : public hipo::bank {
21
22
23 public:
24
25
26 calextras()=default;
27
28 calextras(hipo::schema __schema);
29
30 ~calextras() override=default;
31
32
33 int getDbstU() const noexcept{
34 if(_index>-1)return getShort(_dbstU_order,_index);
35 return 0;
36 }
37 int getDbstV() const noexcept{
38 if(_index>-1)return getShort(_dbstV_order,_index);
39 return 0;
40 }
41 int getDbstW() const noexcept{
42 if(_index>-1)return getShort(_dbstW_order,_index);
43 return 0;
44 }
45
46 double getRawEU() const noexcept{
47 if(_index>-1)return getFloat(_rawEU_order,_index);
48 return 0.;
49 }
50 double getRawEV() const noexcept{
51 if(_index>-1)return getFloat(_rawEV_order,_index);
52 return 0.;
53 }
54 double getRawEW() const noexcept{
55 if(_index>-1)return getFloat(_rawEW_order,_index);
56 return 0.;
57 }
58 double getRecEU() const noexcept{
59 if(_index>-1)return getFloat(_recEU_order,_index);
60 return 0.;
61 }
62 double getRecEV() const noexcept{
63 if(_index>-1)return getFloat(_recEV_order,_index);
64 return 0.;
65 }
66 double getRecEW() const noexcept{
67 if(_index>-1)return getFloat(_recEW_order,_index);
68 return 0.;
69 }
70 double getRecDTU() const noexcept{
71 if(_index>-1)return getFloat(_recDTU_order,_index);
72 return 0.;
73 }
74 double getRecDTV() const noexcept{
75 if(_index>-1)return getFloat(_recDTV_order,_index);
76 return 0.;
77 }
78 double getRecDTW() const noexcept{
79 if(_index>-1)return getFloat(_recDTW_order,_index);
80 return 0.;
81 }
82 double getRecFTU() const noexcept{
83 if(_index>-1)return getFloat(_recFTU_order,_index);
84 return 0.;
85 }
86 double getRecFTV() const noexcept{
87 if(_index>-1)return getFloat(_recFTV_order,_index);
88 return 0.;
89 }
90 double getRecFTW() const noexcept{
91 if(_index>-1)return getFloat(_recFTW_order,_index);
92 return 0.;
93 }
94
95 int getDbstU(int index) const noexcept{
96 if(index>-1)return getShort(_dbstU_order,index);
97 return 0;
98 }
99 int getDbstV(int index) const noexcept{
100 if(index>-1)return getShort(_dbstV_order,index);
101 return 0;
102 }
103 int getDbstW(int index) const noexcept{
104 if(index>-1)return getShort(_dbstW_order,index);
105 return 0;
106 }
107
108 double getRawEU(int index) const noexcept{
109 if(index>-1)return getFloat(_rawEU_order, index);
110 return 0.;
111 }
112 double getRawEV(int index) const noexcept{
113 if(index>-1)return getFloat(_rawEV_order,index);
114 return 0.;
115 }
116 double getRawEW(int index) const noexcept{
117 if(index>-1)return getFloat(_rawEW_order,index);
118 return 0.;
119 }
120 double getRecEU(int index) const noexcept{
121 if(index>-1)return getFloat(_recEU_order,index);
122 return 0.;
123 }
124 double getRecEV(int index) const noexcept{
125 if(index>-1)return getFloat(_recEV_order,index);
126 return 0.;
127 }
128 double getRecEW(int index) const noexcept{
129 if(index>-1)return getFloat(_recEW_order,index);
130 return 0.;
131 }
132 double getRecDTU(int index) const noexcept{
133 if(index>-1)return getFloat(_recDTU_order,index);
134 return 0.;
135 }
136 double getRecDTV(int index) const noexcept{
137 if(index>-1)return getFloat(_recDTV_order,index);
138 return 0.;
139 }
140 double getRecDTW(int index) const noexcept{
141 if(index>-1)return getFloat(_recDTW_order,index);
142 return 0.;
143 }
144 double getRecFTU(int index) const noexcept{
145 if(index>-1)return getFloat(_recFTU_order,index);
146 return 0.;
147 }
148 double getRecFTV(int index) const noexcept{
149 if(index>-1)return getFloat(_recFTV_order,index);
150 return 0.;
151 }
152 double getRecFTW(int index) const noexcept{
153 if(index>-1)return getFloat(_recFTW_order,index);
154 return 0.;
155 }
156
157
158
159 void setBankEntry(short i){ _index=i;} //faster for BankHist
160
161 private:
162 friend calorimeter;
163
164 void setIndex(short i){ _index=i;}
165
166
167 int _dbstU_order=-1;
168 int _dbstV_order=-1;
169 int _dbstW_order=-1;
170 int _rawEU_order=-1;
171 int _rawEV_order=-1;
172 int _rawEW_order=-1;
173 int _recEU_order=-1;
174 int _recEV_order=-1;
175 int _recEW_order=-1;
176 int _recDTU_order=-1;
177 int _recDTV_order=-1;
178 int _recDTW_order=-1;
179 int _recFTU_order=-1;
180 int _recFTV_order=-1;
181 int _recFTW_order=-1;
182
183 int _index=-1;
184
185 }; //class calextras
186
188 using calextra_uptr=std::unique_ptr<clas12::calextras>;
189
190}//namespace clas12
191
192#endif /* UTILS_H */
Definition calextras.h:20
calextras()=default
int getDbstU() const noexcept
Definition calextras.h:33
double getRecEV() const noexcept
Definition calextras.h:62
int getDbstW() const noexcept
Definition calextras.h:41
double getRawEW(int index) const noexcept
Definition calextras.h:116
double getRawEW() const noexcept
Definition calextras.h:54
double getRecEW(int index) const noexcept
Definition calextras.h:128
double getRecDTU() const noexcept
Definition calextras.h:70
double getRecFTW(int index) const noexcept
Definition calextras.h:152
double getRecFTU(int index) const noexcept
Definition calextras.h:144
double getRecDTU(int index) const noexcept
Definition calextras.h:132
double getRawEV() const noexcept
Definition calextras.h:50
double getRecFTU() const noexcept
Definition calextras.h:82
int getDbstU(int index) const noexcept
Definition calextras.h:95
double getRawEU() const noexcept
Definition calextras.h:46
double getRecDTV(int index) const noexcept
Definition calextras.h:136
double getRawEV(int index) const noexcept
Definition calextras.h:112
double getRecEU() const noexcept
Definition calextras.h:58
~calextras() override=default
double getRecDTV() const noexcept
Definition calextras.h:74
int getDbstV(int index) const noexcept
Definition calextras.h:99
int getDbstV() const noexcept
Definition calextras.h:37
double getRecEU(int index) const noexcept
Definition calextras.h:120
double getRecFTW() const noexcept
Definition calextras.h:90
double getRecDTW(int index) const noexcept
Definition calextras.h:140
double getRecEV(int index) const noexcept
Definition calextras.h:124
int getDbstW(int index) const noexcept
Definition calextras.h:103
void setBankEntry(short i)
Definition calextras.h:159
double getRecDTW() const noexcept
Definition calextras.h:78
double getRecFTV(int index) const noexcept
Definition calextras.h:148
double getRecFTV() const noexcept
Definition calextras.h:86
double getRecEW() const noexcept
Definition calextras.h:66
double getRawEU(int index) const noexcept
Definition calextras.h:108
Definition calorimeter.h:24
Definition calextras.cpp:10
std::unique_ptr< clas12::calextras > calextra_uptr
Definition calextras.h:188
clas12::calextras * calextra_ptr
Definition calextras.h:187