20#ifndef __stir_listmode_CListRecordROOT_H__
21#define __stir_listmode_CListRecordROOT_H__
28#include "boost/static_assert.hpp"
30#include <boost/cstdint.hpp>
35class CListEventROOT :
public CListEventScannerWithDiscreteDetectors<ProjDataInfoPETScannerWithDiscreteDetectors>
38 using base_type = CListEventScannerWithDiscreteDetectors<ProjDataInfoPETScannerWithDiscreteDetectors>;
42 CListEventROOT(
const shared_ptr<const ProjDataInfo>& proj_data_info);
45 void get_detection_position(DetectionPositionPair<>&)
const override;
48 void set_detection_position(
const DetectionPositionPair<>&)
override;
51 void init_from_data(
const int& _ring1,
const int& _ring2,
const int& crystal1,
const int& crystal2,
const double& _delta_time);
53 inline bool is_prompt()
const override {
return true; }
55 double get_delta_time()
const {
return delta_time; }
68#ifdef STIR_ROOT_ROTATION_AS_V4
71 int quarter_of_detectors;
81 void init_from_data(
double time1) { timeA = time1; }
88 inline Succeeded set_time_in_millisecs(
const unsigned long time_in_millisecs)
override
90 warning(
"set_time_in_millisecs: Not implemented for ROOT files. Aborting.");
106 bool inline is_time()
const override;
108 bool inline is_event()
const override;
110 CListEventROOT& event()
override {
return this->event_data; }
112 const CListEventROOT& event()
const override {
return this->event_data; }
116 const CListTimeROOT& time()
const override {
return this->time_data; }
120 return dynamic_cast<CListRecordROOT const*
>(&e2) != 0 && raw[0] ==
dynamic_cast<CListRecordROOT const&
>(e2).raw[0]
121 && raw[1] ==
dynamic_cast<CListRecordROOT const&
>(e2).raw[1];
124 CListRecordROOT(
const shared_ptr<const ProjDataInfo>& proj_data_info_sptr)
125 : event_data(proj_data_info_sptr)
133 const double& delta_time,
139 this->event_data.init_from_data(ring1, ring2, crystal1, crystal2, delta_time);
141 this->time_data.init_from_data(time1);
148 return Succeeded::yes;
152 CListEventROOT event_data;
154 boost::int32_t raw[2];
Declarations of class stir::CListEventScannerWithDiscreteDetectors.
Implementation of class stir::InputStreamFromROOTFile.
Declarations of classes stir::CListRecord, and stir::CListEvent which are used for list mode data.
Declaration of class stir::DetectionPositionPair.
Declaration of class stir::ProjDataInfoPETScannerWithDiscreteDetectors.
Declaration of class stir::Succeeded.
bool is_time() const override
Returns always true.
Definition CListRecordROOT.inl:23
virtual Succeeded init_from_data(const int &ring1, const int &ring2, const int &crystal1, const int &crystal2, const double &time1, const double &delta_time, const int &event1, const int &event2)
Definition CListRecordROOT.h:128
bool is_event() const override
Returns always true.
Definition CListRecordROOT.inl:29
Class for records in a PET list mode file.
Definition CListRecord.h:68
A class for storing and using a timing 'event' from a listmode file from the ECAT 8_32bit scanner.
Definition CListRecordROOT.h:79
unsigned long get_time_in_millisecs() const override
Returns the detection time of the first photon in milliseconds.
Definition CListRecordROOT.h:87
bool is_time() const
Returns always true.
Definition CListRecordROOT.h:84
A class for storing and using a timing record from a listmode file.
Definition ListTime.h:47
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44
void warning(const char *const s,...)
Print warning with format string a la printf.
Definition warning.cxx:41
Declaration of the stir::round functions.
Declaration of stir::warning().