CASToR  2.0
Tomographic Reconstruction (PET/SPECT/CT)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
iEventNorm.cc
Go to the documentation of this file.
1 /*
2 This file is part of CASToR.
3 
4  CASToR is free software: you can redistribute it and/or modify it under the
5  terms of the GNU General Public License as published by the Free Software
6  Foundation, either version 3 of the License, or (at your option) any later
7  version.
8 
9  CASToR is distributed in the hope that it will be useful, but WITHOUT ANY
10  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12  details.
13 
14  You should have received a copy of the GNU General Public License along with
15  CASToR (in file GNU_GPL.TXT). If not, see <http://www.gnu.org/licenses/>.
16 
17 Copyright 2017-2018 all CASToR contributors listed below:
18 
19  --> current contributors: Thibaut MERLIN, Simon STUTE, Didier BENOIT, Claude COMTAT, Marina FILIPOVIC, Mael MILLARDET
20  --> past contributors: Valentin VIELZEUF
21 
22 This is CASToR version 2.0.
23 */
24 
32 #include "iEventNorm.hh"
33 #include "vDataFile.hh"
34 #include "sOutputManager.hh"
35 
36 // =====================================================================
37 // ---------------------------------------------------------------------
38 // ---------------------------------------------------------------------
39 // =====================================================================
40 
42 {
46 }
47 
48 // =====================================================================
49 // ---------------------------------------------------------------------
50 // ---------------------------------------------------------------------
51 // =====================================================================
52 
54 
55 // =====================================================================
56 // ---------------------------------------------------------------------
57 // ---------------------------------------------------------------------
58 // =====================================================================
59 
61 {
63  Cout("iEventNorm::Describe() -> Display contents" << endl);
64  Cout("Number of lines: " << m_nbLines << endl);
65  for (uint16_t l=0; l<m_nbLines; l++) Cout(" --> ID1: " << mp_ID1[l] << " | ID2: " << mp_ID2[l] << endl);
66  Cout("Attenuation correction factor: " << m_attenuationCorrectionFactor << endl);
67  Cout("Normalization factor: " << m_normalizationFactor << endl);
68  Cout(flush);
69 }
70 
71 // =====================================================================
72 // ---------------------------------------------------------------------
73 // ---------------------------------------------------------------------
74 // =====================================================================
75 
77 {
79  // This function is an implementation of inheritance, but has no sense in this context
80  Cerr("***** iEventNorm::GetEventValue() -> This function should not be used ! Alternatives are:" << endl);
81  Cerr(" GetNormalizationFactor() and GetAttenuationCorrectionFactor" << endl);
82  Exit(EXIT_FAILURE);
83  return -1.;
84 }
85 
86 // =====================================================================
87 // ---------------------------------------------------------------------
88 // ---------------------------------------------------------------------
89 // =====================================================================
90 
92 {
94  // This function is an implementation of inheritance, but has no sense in this context
95  Cerr("***** iEventNorm::GetAdditiveCorrections() -> This function should not be used ! Alternatives are:" << endl);
96  Cerr(" GetNormalizationFactor() and GetAttenuationCorrectionFactor" << endl);
97  Exit(EXIT_FAILURE);
98  return -1.;
99 }
100 
101 // =====================================================================
102 // ---------------------------------------------------------------------
103 // ---------------------------------------------------------------------
104 // =====================================================================
105 
106 void iEventNorm::SetEventValue(int a_bin, FLTNBDATA a_value)
107 {
109  // This function is an implementation of inheritance, but has no sense in this context
110  Cerr("***** iEventNorm::GetAdditiveCorrections() -> This function should not be used ! Alternatives are:" << endl);
111  Cerr(" GetNormalizationFactor() and GetAttenuationCorrectionFactor" << endl);
112  Exit(EXIT_FAILURE);
113 }
114 
115 // =====================================================================
116 // ---------------------------------------------------------------------
117 // ---------------------------------------------------------------------
118 // =====================================================================
119 
121 {
123  // This function is an implementation of inheritance, but has no sense in this context
124  Cerr("***** iEventNorm::GetNbValueBins() -> This function should not be used ! Alternatives are:" << endl);
125  Cerr(" GetNormalizationFactor() and GetAttenuationCorrectionFactor" << endl);
126  Exit(EXIT_FAILURE);
127  return -1;
128 }
129 
130 // =====================================================================
131 // ---------------------------------------------------------------------
132 // ---------------------------------------------------------------------
133 // =====================================================================
134 
136 {
138  // This function is an implementation of inheritance, but has no sense in this context
139  Cerr("***** iEventNorm::MultiplyAdditiveCorrections() -> This function should not be used !" << endl);
140  Exit(EXIT_FAILURE);
141 }
142 
143 // =====================================================================
144 // ---------------------------------------------------------------------
145 // ---------------------------------------------------------------------
146 // =====================================================================
INTNB GetNbValueBins()
Not used, so throw an error and Exit.
Definition: iEventNorm.cc:120
#define FLTNB
Definition: gVariables.hh:81
#define MODE_NORMALIZATION
Definition: vDataFile.hh:61
int m_verbose
Definition: vEvent.hh:233
uint32_t * mp_ID2
Definition: vEvent.hh:228
FLTNB GetEventValue(int a_bin)
Not used, so throw an error and Exit.
Definition: iEventNorm.cc:76
iEventNorm()
iEventNorm constructor. Initialize the member variables to their default values.
Definition: iEventNorm.cc:41
void Describe()
This function can be used to get a description of the event printed out.
Definition: iEventNorm.cc:60
void Exit(int code)
void SetEventValue(int a_bin, FLTNBDATA a_value)
Not used, so throw an error and Exit.
Definition: iEventNorm.cc:106
FLTNB m_attenuationCorrectionFactor
Definition: iEventNorm.hh:155
#define FLTNBDATA
Definition: gVariables.hh:87
#define Cerr(MESSAGE)
#define VERBOSE_DEBUG_LIGHT
uint32_t * mp_ID1
Definition: vEvent.hh:227
FLTNB GetAdditiveCorrections(int a_bin)
Not used, so throw an error and Exit.
Definition: iEventNorm.cc:91
FLTNB m_normalizationFactor
Definition: iEventNorm.hh:154
Declaration of class vDataFile.
#define INTNB
Definition: gVariables.hh:92
int m_dataMode
Definition: vEvent.hh:231
Declaration of class sOutputManager.
Mother class for the Event objects.
Definition: vEvent.hh:43
void MultiplyAdditiveCorrections(FLTNB a_factor)
Not used, so throw an error and Exit.
Definition: iEventNorm.cc:135
#define DEBUG_VERBOSE(IGNORED1, IGNORED2)
Declaration of class iEventNorm.
~iEventNorm()
iEventNorm destructor
Definition: iEventNorm.cc:53
#define Cout(MESSAGE)
uint16_t m_nbLines
Definition: vEvent.hh:226