STIR 6.4.0
InputStreamFromROOTFile.inl
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015, 2016 University of Leeds
3 Copyright (C) 2016, 2021 UCL
4 This file is part of STIR.
5
6 SPDX-License-Identifier: Apache-2.0
7
8 See STIR/LICENSE.txt for details
9*/
19
21
22START_NAMESPACE_STIR
23
24unsigned long int
29
36
37InputStreamFromROOTFile::SavedPosition
44
46InputStreamFromROOTFile::set_get_position(const InputStreamFromROOTFile::SavedPosition& pos)
47{
48 assert(pos < saved_get_positions.size());
50 current_position = nentries; // go to eof
51 else
53
54 return Succeeded::yes;
55}
56
57std::vector<unsigned long int>
62
63void
64InputStreamFromROOTFile::set_saved_get_positions(const std::vector<unsigned long>& poss)
65{
67}
68
69float
74
75float
80
81std::string
82InputStreamFromROOTFile::get_ROOT_filename() const
83{
84 return this->filename;
85}
86
87void
92
93void
94InputStreamFromROOTFile::set_input_filename(const std::string& val)
95{
96 filename = val;
97}
98
99void
100InputStreamFromROOTFile::set_chain_name(const std::string& val)
101{
102 chain_name = val;
103}
104
105void
106InputStreamFromROOTFile::set_exclude_true_events(bool val)
107{
108 exclude_nonrandom = val;
109}
110
111void
112InputStreamFromROOTFile::set_exclude_scattered_events(bool val)
113{
114 exclude_scattered = val;
115}
116
117void
118InputStreamFromROOTFile::set_exclude_unscattered_events(bool val)
119{
120 exclude_unscattered = val;
121}
122
123void
124InputStreamFromROOTFile::set_exclude_random_events(bool val)
125{
126 exclude_randoms = val;
127}
128
129#ifdef STIR_ROOT_ROTATION_AS_V4
130void
131InputStreamFromROOTFile::set_detectors_offset(int val)
132{
133 offset_dets = val;
134}
135#endif
136
137void
138InputStreamFromROOTFile::set_low_energy_window(float val)
139{
140 low_energy_window = val;
141}
142
143void
144InputStreamFromROOTFile::set_upper_energy_window(float val)
145{
146 up_energy_window = val;
147}
148
149void
154
155int
157{
158 return this->crystal_repeater_z + this->num_virtual_axial_crystals_per_block;
159}
160
161int
163{
164 return this->crystal_repeater_y + this->num_virtual_transaxial_crystals_per_block;
165}
166
167int
169{
170 return this->num_virtual_axial_crystals_per_block;
171}
172int
173InputStreamFromROOTFile::get_num_virtual_transaxial_crystals_per_block() const
174{
175 return this->num_virtual_transaxial_crystals_per_block;
176}
177
178END_NAMESPACE_STIR
Declaration of class stir::InputStreamFromROOTFile.
int get_num_virtual_axial_crystals_per_block() const
Definition InputStreamFromROOTFile.inl:168
unsigned long int starting_stream_position
The starting position.
Definition InputStreamFromROOTFile.h:177
unsigned long int nentries
The total number of entries.
Definition InputStreamFromROOTFile.h:179
std::vector< unsigned long int > get_saved_get_positions() const
Get the vector with the saved positions.
Definition InputStreamFromROOTFile.inl:58
unsigned long int get_total_number_of_events() const
Returns the total number of events.
Definition InputStreamFromROOTFile.inl:25
void set_optional_ROOT_fields(bool)
Set the read_optional_root_fields flag.
Definition InputStreamFromROOTFile.inl:150
std::vector< unsigned long int > saved_get_positions
A vector with saved position indices.
Definition InputStreamFromROOTFile.h:183
float low_energy_window
Lower energy threshold. Default is 1000 (keV)
Definition InputStreamFromROOTFile.h:264
SavedPosition save_get_position()
Save current position in a vector.
Definition InputStreamFromROOTFile.inl:38
Succeeded reset()
Go to the first event.
Definition InputStreamFromROOTFile.inl:31
int get_num_axial_crystals_per_block_v() const
Get the axial number of crystals per module.
Definition InputStreamFromROOTFile.inl:156
void set_saved_get_positions(const std::vector< unsigned long int > &)
Set a vector with saved positions.
Definition InputStreamFromROOTFile.inl:64
float get_up_energy_thres() const
Upper energy threshold.
Definition InputStreamFromROOTFile.inl:76
int singles_readout_depth
For the singles_readout_depth from GATE's online documentation: (here )
Definition InputStreamFromROOTFile.h:274
unsigned long int current_position
Current get position.
Definition InputStreamFromROOTFile.h:181
void set_singles_readout_depth(int)
Set singles_readout_depth.
Definition InputStreamFromROOTFile.inl:88
Succeeded set_get_position(const SavedPosition &)
Set current position.
Definition InputStreamFromROOTFile.inl:46
int get_num_transaxial_crystals_per_block_v() const
Get the transaxial number of crystals per module.
Definition InputStreamFromROOTFile.inl:162
float get_low_energy_thres() const
Lower energy threshold.
Definition InputStreamFromROOTFile.inl:70
bool read_optional_root_fields
This variable can be used to setBranchAddress to ROOT fields that currently are not used by STIR....
Definition InputStreamFromROOTFile.h:191
float up_energy_window
Upper energy threshold. Default is 0 (keV)
Definition InputStreamFromROOTFile.h:266
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44