STIR 6.4.0
ListModeData_dummy.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2022, MGH / HST A. Martinos Center for Biomedical Imaging
3 This file is part of STIR.
4
5 SPDX-License-Identifier: Apache-2.0
6
7 See STIR/LICENSE.txt for details
8*/
16
17#ifndef __stir_listmode_ListModeData_dummy_H__
18#define __stir_listmode_ListModeData_dummy_H__
19
20#include "stir/error.h"
22
23START_NAMESPACE_STIR
45class ListModeData_dummy : public ListModeData
46{
47public:
48 ListModeData_dummy(shared_ptr<const ExamInfo> exam_info_sptr, shared_ptr<const ProjDataInfo> proj_data_info_sptr)
49 : ListModeData(exam_info_sptr, proj_data_info_sptr)
50 {}
51
52 std::string get_name() const override { return std::string("ListModeData_dummy"); }
53
54 Succeeded reset() override
55 {
56 error("ListModeData_dummy does not have reset()");
57 return Succeeded::no;
58 }
59
61 {
62 error("ListModeData_dummy does not have save_get_position()");
63 return 0;
64 }
65
67 {
68 error("ListModeData_dummy does not have set_get_position()");
69 return Succeeded::no;
70 }
71
72 bool has_delayeds() const override
73 {
74 error("ListModeData_dummy does not have has_delayeds()");
75 return false;
76 }
77
78protected:
79 shared_ptr<ListRecord> get_empty_record_helper_sptr() const override
80 {
81 error("ListModeData_dummy does not have get_empty_record_helper_sptr()");
82 return nullptr;
83 }
84 Succeeded get_next(ListRecord& event) const override
85 {
86 error("ListModeData_dummy does not have get_next()");
87 return Succeeded::no;
88 }
89};
90
91END_NAMESPACE_STIR
92
93#endif
Declaration of class stir::ListModeData.
std::string get_name() const override
Returns the name of the list mode data.
Definition ListModeData_dummy.h:52
SavedPosition save_get_position() override
Save the current reading position.
Definition ListModeData_dummy.h:60
Succeeded set_get_position(const SavedPosition &) override
Set the position for reading to a previously saved point.
Definition ListModeData_dummy.h:66
Succeeded reset() override
Call this function if you want to re-start reading at the beginning.
Definition ListModeData_dummy.h:54
bool has_delayeds() const override
Return if the file stores delayed events as well (as opposed to prompts)
Definition ListModeData_dummy.h:72
unsigned int SavedPosition
Use this typedef for save/set_get_position.
Definition ListModeData.h:129
ListModeData()
Default constructor.
Definition ListModeData.cxx:27
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44
Declaration of stir::error()
void error(const char *const s,...)
Print error with format string a la printf and throw exception.
Definition error.cxx:42