@@ -127,7 +127,7 @@ class CListModeDataPETSIRD : public CListModeDataBasedOnCoordinateMap
127127 Succeeded reopen_and_prime ()
128128 {
129129 // ensure PETSIRD state machine is satisfied
130- std::cout << " 1 nikos" << std::endl;
130+ std::cout << " 1 nikos" << std::endl;
131131 if (current_lm_data_ptr)
132132 {
133133 try
@@ -138,14 +138,14 @@ class CListModeDataPETSIRD : public CListModeDataBasedOnCoordinateMap
138138 {}
139139 }
140140 // current_lm_data_ptr.reset();
141- std::cout << " 2 nikos" << std::endl;
141+ std::cout << " 2 nikos" << std::endl;
142142 if (use_hdf5)
143143 current_lm_data_ptr.reset (new petsird::hdf5::PETSIRDReader (this ->listmode_filename ));
144144 else
145145 current_lm_data_ptr.reset (new petsird::binary::PETSIRDReader (this ->listmode_filename ));
146146
147- petsird::Header header;
148- current_lm_data_ptr->ReadHeader (header);
147+ petsird::Header header;
148+ current_lm_data_ptr->ReadHeader (header);
149149 // m_eof_reached = false;
150150 curr_event_in_event_block = 0 ;
151151 curr_is_prompt = true ;
@@ -154,18 +154,18 @@ class CListModeDataPETSIRD : public CListModeDataBasedOnCoordinateMap
154154 // read until first EventTimeBlock
155155 while (true )
156156 {
157- std::cout << " 4 nikos" << std::endl;
157+ std::cout << " 4 nikos" << std::endl;
158158 if (!current_lm_data_ptr->ReadTimeBlocks (this ->curr_time_block ))
159159 {
160- std::cout << " 5 nikos" << std::endl;
160+ std::cout << " 5 nikos" << std::endl;
161161 // m_eof_reached = true;
162162 current_lm_data_ptr->Close ();
163163 return Succeeded::no;
164164 }
165- std::cout << " 55 nikos" << std::endl;
165+ std::cout << " 55 nikos" << std::endl;
166166 if (std::holds_alternative<petsird::EventTimeBlock>(this ->curr_time_block ))
167167 {
168- std::cout << " 6 nikos" << std::endl;
168+ std::cout << " 6 nikos" << std::endl;
169169 this ->curr_event_block = std::get<petsird::EventTimeBlock>(this ->curr_time_block );
170170 return Succeeded::yes;
171171 }
@@ -200,29 +200,29 @@ class CListModeDataPETSIRD : public CListModeDataBasedOnCoordinateMap
200200 {
201201 if (pos >= m_saved_positions.size ())
202202 return Succeeded::no;
203- std::cout << " ---1 nikos" << std::endl;
203+ std::cout << " ---1 nikos" << std::endl;
204204 const auto & c = m_saved_positions[pos];
205205
206206 // If you cached the actual blocks, you STILL must ensure the reader state
207207 // will not be used incorrectly. Easiest: reopen+seek anyway (robust),
208208 // then overwrite curr_* with cached data.
209209 if (reopen_and_prime () == Succeeded::no)
210210 return Succeeded::no;
211- std::cout << " ---2 nikos" << std::endl;
211+ std::cout << " ---2 nikos" << std::endl;
212212 if (seek_to_event_block_index (c.time_block_index ) == Succeeded::no)
213213 return Succeeded::no;
214214
215215 // restore logical cursor
216216 curr_is_prompt = c.is_prompt ;
217217 curr_event_in_event_block = c.event_in_block ;
218218 m_time_block_index = c.time_block_index ;
219- std::cout << " ---3 nikos" << std::endl;
219+ std::cout << " ---3 nikos" << std::endl;
220220 if (c.has_cached_blocks )
221221 {
222222 this ->curr_time_block = c.time_block ;
223223 this ->curr_event_block = c.event_block ;
224224 }
225- std::cout << " ---4 nikos" << std::endl;
225+ std::cout << " ---4 nikos" << std::endl;
226226 return Succeeded::yes;
227227 }
228228
0 commit comments