22 #ifndef __stir_IO_InputStreamFromROOTFile_H__ 23 #define __stir_IO_InputStreamFromROOTFile_H__ 70 typedef std::vector<long long int>::size_type SavedPosition;
75 #if 0 // disabled as not used 78 std::string chain_name,
79 bool exclude_scattered,
bool exclude_randoms,
80 float low_energy_window,
float up_energy_window,
93 virtual Succeeded set_up(
const std::string& header_path);
95 inline SavedPosition save_get_position();
97 inline Succeeded set_get_position(
const SavedPosition&);
99 inline std::vector<unsigned long int> get_saved_get_positions()
const;
101 inline void set_saved_get_positions(
const std::vector<unsigned long int>&);
103 inline unsigned long int get_total_number_of_events()
const;
105 inline std::string get_ROOT_filename()
const;
108 virtual int get_num_rings()
const = 0;
110 virtual int get_num_dets_per_ring()
const = 0;
112 virtual int get_num_axial_blocks_per_bucket_v()
const = 0;
114 virtual int get_num_transaxial_blocks_per_bucket_v()
const = 0;
116 inline int get_num_axial_crystals_per_block_v()
const;
118 inline int get_num_transaxial_crystals_per_block_v()
const;
120 virtual int get_num_axial_crystals_per_singles_unit()
const = 0;
122 virtual int get_num_trans_crystals_per_singles_unit()
const = 0;
129 inline int get_num_virtual_axial_crystals_per_block()
const;
130 inline int get_num_virtual_transaxial_crystals_per_block()
const;
131 void set_num_virtual_axial_crystals_per_block(
int);
132 void set_num_virtual_transaxial_crystals_per_block(
int);
136 inline float get_low_energy_thres()
const;
138 inline float get_up_energy_thres()
const;
141 inline void set_singles_readout_depth(
int);
143 inline void set_input_filename(
const std::string&);
145 inline void set_chain_name(
const std::string&);
147 inline void set_exclude_true_events(
bool);
149 inline void set_exclude_scattered_events(
bool);
151 inline void set_exclude_unscattered_events(
bool);
153 inline void set_exclude_random_events(
bool);
155 #ifdef STIR_ROOT_ROTATION_AS_V4 156 inline void set_detectors_offset(
int);
159 inline void set_low_energy_window(
float);
161 inline void set_upper_energy_window(
float);
163 inline void set_optional_ROOT_fields(
bool);
165 void set_crystal_repeater_x(
int);
166 void set_crystal_repeater_y(
int);
167 void set_crystal_repeater_z(
int);
170 void set_defaults()
override;
171 void initialise_keymap()
override;
172 bool post_processing()
override;
195 int crystal_repeater_x;
196 int crystal_repeater_y;
197 int crystal_repeater_z;
208 std::int32_t eventID1, eventID2, runID, sourceID1, sourceID2;
210 float energy1, energy2, rotation_angle, sinogramS, sinogramTheta, axialPos;
211 int32_t comptonphantom1, comptonphantom2;
212 float globalPosX1, globalPosX2, globalPosY1, globalPosY2, globalPosZ1, globalPosZ2;
213 float sourcePosX1, sourcePosX2, sourcePosY1, sourcePosY2, sourcePosZ1, sourcePosZ2;
218 TBranch* br_time1 =
nullptr;
219 TBranch* br_time2 =
nullptr;
220 TBranch* br_eventID1 =
nullptr;
221 TBranch* br_eventID2 =
nullptr;
222 TBranch* br_energy1 =
nullptr;
223 TBranch* br_energy2 =
nullptr;
224 TBranch* br_comptonPhantom1 =
nullptr;
225 TBranch* br_comptonPhantom2 =
nullptr;
227 TBranch* br_axialPos =
nullptr;
228 TBranch* br_globalPosX1 =
nullptr;
229 TBranch* br_globalPosX2 =
nullptr;
230 TBranch* br_globalPosY1 =
nullptr;
231 TBranch* br_globalPosY2 =
nullptr;
232 TBranch* br_globalPosZ1 =
nullptr;
233 TBranch* br_globalPosZ2 =
nullptr;
234 TBranch* br_rotation_angle =
nullptr;
235 TBranch* br_runID =
nullptr;
236 TBranch* br_sinogramS =
nullptr;
237 TBranch* br_sinogramTheta =
nullptr;
238 TBranch* br_sourceID1 =
nullptr;
239 TBranch* br_sourceID2 =
nullptr;
240 TBranch* br_sourcePosX1 =
nullptr;
241 TBranch* br_sourcePosX2 =
nullptr;
242 TBranch* br_sourcePosY1 =
nullptr;
243 TBranch* br_sourcePosY2 =
nullptr;
244 TBranch* br_sourcePosZ1 =
nullptr;
245 TBranch* br_sourcePosZ2 =
nullptr;
250 int num_virtual_axial_crystals_per_block;
251 int num_virtual_transaxial_crystals_per_block;
253 bool exclude_nonrandom;
267 #ifdef STIR_ROOT_ROTATION_AS_V4 271 int singles_readout_depth;
278 double least_significant_clock_bit;
283 return energy1 * 1e3;
285 float get_energy2_in_keV()
const 287 return energy2 * 1e3;
291 bool check_brentry_randoms_scatter_energy_conditions(
long long int brentry);
298 error(ret == 0 ?
"Entry is null." :
"ROOT I/O error.");
Declaration of class stir::Succeeded.
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
Declaration of stir::error()
Classes for listmode events for GATE simulated ROOT data.
A class for a general element of a listmode file for a Siemens scanner using the ROOT files...
Definition: CListRecordROOT.h:97
Declaration of class stiir::RegisteredObject.
Helper class to provide registry mechanisms to a Base classSuppose you have a hierarchy of classes wi...
Definition: RegisteredObject.h:95
void error(const char *const s,...)
Print error with format string a la printf and throw exception.
Definition: error.cxx:42
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43