DCMSummary.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////
2 /// \brief A DCMSummary contains summary information to calculate dcm timing delays
3 /// \author edniner@indiana.edu
4 /// \date Feb. 2013
5 ///////////////////////////////////////////////////////////////////////////
6 #ifndef DCMSummary_H
7 #define DCMSummary_H
8 
9 #include <vector>
10 #include <stdint.h>
11 
12 /// Calibration data products
13 namespace caldp
14 {
15  ///maximum number of dcms possible on a detector
16  static const int kDCMNumMax = 168;
17 
18 
19  class DCMSummary
20  {
21  public:
22  DCMSummary();
23 
24  virtual ~DCMSummary();
25 
26  /// return start time offset is valid for
27  uint32_t StartTime () const {return sTime; };
28  /// return end time offset is valid for
29  uint32_t EndTime () const {return eTime; };
30  std::vector<int> DCMUse(std::vector<int> in) const {return dcmUse;};
31  std::vector<std::vector<int> > DCMOffsetCount() const {return dcmOffsetCount;};
32  std::vector<std::vector<float> > DCMOffsetSum() const {return dcmOffsetSum;};
33  std::vector<std::vector<float> > DCMOffsetSumSquare() const {return dcmOffsetSumSquare;};
34 
35  int DCMOffsetCountIndx(int i, int j) const {return dcmOffsetCount[i][j];};
36  float DCMOffsetSumIndx(int i, int j)const {return dcmOffsetSum[i][j];};
37  float DCMOffsetSumSquareIndx(int i, int j) const {return dcmOffsetSumSquare[i][j];};
38  int DCMUseIndx(int i) const {return dcmUse[i];};
39 
40  void SetStartTime (uint32_t aStart) {sTime = aStart; };
41  /// Set end time offset is valid for
42  void SetEndTime (uint32_t aEnd) {eTime = aEnd; };
43  void SetDCMUse(std::vector<int> in) {dcmUse = in;};
44  void SetDCMOffsetCount(std::vector<std::vector<int> > in) {dcmOffsetCount = in;};
45  void SetDCMOffsetSum(std::vector<std::vector<float> > in) {dcmOffsetSum = in;};
46  void SetDCMOffsetSumSquare(std::vector<std::vector<float> > in) {dcmOffsetSumSquare = in;};
47  void SetDCMOffsetCountIndx(int i, int j, int val) {dcmOffsetCount[i][j] = val;};
48  void SetDCMOffsetSumIndx(int i, int j, float val) {dcmOffsetSum[i][j] = val;};
49  void SetDCMOffsetSumSquareIndx(int i, int j, float val) {dcmOffsetSumSquare[i][j] = val;};
50  void SetDCMUseIndx(int i, int val) {dcmUse[i] = val;};
51 
52 
53 
54 
55  protected:
56  uint32_t sTime; ///< start time offset is valid for
57  uint32_t eTime; ///< end time offset is valid for
58  ///vector of number of uses for a dcm pair
59  std::vector<std::vector<int> > dcmOffsetCount;
60  ///vector running sum of relative dcm offsets
61  std::vector<std::vector<float> > dcmOffsetSum;
62  ///vector running sum squared of dcm offsets
63  std::vector<std::vector<float> > dcmOffsetSumSquare;
64  ///vector of times a dcm is used
65  std::vector<int > dcmUse;
66 
67  };
68 
69 } // end namespace
70 
71 #endif // DCMSummary_H
void SetStartTime(uint32_t aStart)
Definition: DCMSummary.h:40
void SetDCMOffsetCount(std::vector< std::vector< int > > in)
Definition: DCMSummary.h:44
std::vector< std::vector< float > > DCMOffsetSum() const
Definition: DCMSummary.h:32
void SetDCMUseIndx(int i, int val)
Definition: DCMSummary.h:50
std::vector< int > dcmUse
vector of times a dcm is used
Definition: DCMSummary.h:65
void SetDCMOffsetSumIndx(int i, int j, float val)
Definition: DCMSummary.h:48
void SetDCMOffsetSumSquareIndx(int i, int j, float val)
Definition: DCMSummary.h:49
static const int kDCMNumMax
maximum number of dcms possible on a detector
Definition: DCMSummary.h:16
std::vector< int > DCMUse(std::vector< int > in) const
Definition: DCMSummary.h:30
virtual ~DCMSummary()
Definition: DCMSummary.cxx:21
std::vector< std::vector< float > > dcmOffsetSumSquare
vector running sum squared of dcm offsets
Definition: DCMSummary.h:63
uint32_t sTime
start time offset is valid for
Definition: DCMSummary.h:50
uint32_t eTime
Definition: DCMSummary.h:57
const double j
Definition: BetheBloch.cxx:29
void SetDCMUse(std::vector< int > in)
Definition: DCMSummary.h:43
void SetDCMOffsetSumSquare(std::vector< std::vector< float > > in)
Definition: DCMSummary.h:46
Histograms used by attenuation calibration.
float DCMOffsetSumSquareIndx(int i, int j) const
Definition: DCMSummary.h:37
ifstream in
Definition: comparison.C:7
std::vector< std::vector< int > > dcmOffsetCount
vector of number of uses for a dcm pair
Definition: DCMSummary.h:59
int DCMOffsetCountIndx(int i, int j) const
Definition: DCMSummary.h:35
std::vector< std::vector< int > > DCMOffsetCount() const
Definition: DCMSummary.h:31
void SetDCMOffsetCountIndx(int i, int j, int val)
Definition: DCMSummary.h:47
float DCMOffsetSumIndx(int i, int j) const
Definition: DCMSummary.h:36
void SetEndTime(uint32_t aEnd)
Set end time offset is valid for.
Definition: DCMSummary.h:42
std::vector< std::vector< float > > dcmOffsetSum
vector running sum of relative dcm offsets
Definition: DCMSummary.h:61
int DCMUseIndx(int i) const
Definition: DCMSummary.h:38
uint32_t StartTime() const
return start time offset is valid for
Definition: DCMSummary.h:27
void SetDCMOffsetSum(std::vector< std::vector< float > > in)
Definition: DCMSummary.h:45
uint32_t EndTime() const
return end time offset is valid for
Definition: DCMSummary.h:29
std::vector< std::vector< float > > DCMOffsetSumSquare() const
Definition: DCMSummary.h:33