ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
GETFrameInfo.cxx
Go to the documentation of this file.
1 #include "GETFrameInfo.h"
2 
3 #include <Rtypes.h>
4 
5 #include <iostream>
6 
7 using std::cout;
8 using std::endl;
9 
11 
13 {
14  Clear();
15 }
16 
17 void GETFrameInfo::SetDataID(UInt_t value)
18 {
19  fDataID = value;
20 }
21 void GETFrameInfo::SetEventID(UInt_t value)
22 {
23  fEventID = value;
24 }
25 void GETFrameInfo::SetEventTime(ULong64_t value)
26 {
27  fEventTime = value;
28 }
29 void GETFrameInfo::SetDeltaT(UInt_t value)
30 {
31  fDeltaT = value;
32 }
33 void GETFrameInfo::SetStartByte(ULong64_t value)
34 {
35  fStartByte = value;
36 }
37 void GETFrameInfo::SetEndByte(ULong64_t value)
38 {
39  fEndByte = value;
40 }
42 {
43  if (fNextInfo != nullptr)
44  fNextInfo->SetNextInfo(pointer);
45  else
46  fNextInfo = pointer;
47 }
48 
50 {
51  return fDataID;
52 }
54 {
55  return fEventID;
56 }
58 {
59  return fEventTime;
60 }
62 {
63  return fDeltaT;
64 }
66 {
67  return fStartByte;
68 }
70 {
71  return fEndByte;
72 }
74 {
75  return fNextInfo;
76 }
78 {
79  Int_t numFrames = 0;
80  if (!IsFill())
81  return numFrames;
82  else {
83  numFrames++;
84  GETFrameInfo *frameInfo = this;
85  while ((frameInfo = frameInfo->GetNextInfo())) {
86  if (frameInfo != nullptr)
87  numFrames++;
88  else
89  break;
90  }
91  return numFrames;
92  }
93 }
94 
96 {
97  return (fStartByte != fEndByte);
98 }
99 
100 void GETFrameInfo::Clear(Option_t *)
101 {
102  fDataID = 0;
103  fEventID = 0;
104  fEventTime = 0;
105  fDeltaT = 0;
106  fStartByte = 0;
107  fEndByte = 0;
108  fNextInfo = nullptr;
109 }
110 
112 {
113  cout << "== GETFrameInfo =================" << endl;
114  cout << " fDataID: " << fDataID << endl;
115  cout << " fEventID: " << fEventID << endl;
116  cout << "fEventTime: " << fEventTime << endl;
117  cout << " fDeltaT: " << fDeltaT << endl;
118  cout << "fStartByte: " << fStartByte << endl;
119  cout << " fEndByte: " << fEndByte << endl;
120  cout << " fNextInfo: " << fNextInfo << endl;
121  cout << "=================================" << endl;
122 }
123 
125 {
126  fDataID = frameInfo->GetDataID();
127  fEventID = frameInfo->GetEventID();
128  fEventTime = frameInfo->GetEventTime();
129  fDeltaT = frameInfo->GetDeltaT();
130  fStartByte = frameInfo->GetStartByte();
131  fEndByte = frameInfo->GetEndByte();
132  fNextInfo = frameInfo->GetNextInfo();
133 }
GETFrameInfo::GetNextInfo
GETFrameInfo * GetNextInfo()
Definition: GETFrameInfo.cxx:73
GETFrameInfo::SetEventTime
void SetEventTime(ULong64_t value)
Definition: GETFrameInfo.cxx:25
GETFrameInfo::GetDataID
UInt_t GetDataID()
Definition: GETFrameInfo.cxx:49
GETFrameInfo::GetEventTime
ULong64_t GetEventTime()
Definition: GETFrameInfo.cxx:57
GETFrameInfo::IsFill
Bool_t IsFill()
Definition: GETFrameInfo.cxx:95
GETFrameInfo::GetStartByte
ULong64_t GetStartByte()
Definition: GETFrameInfo.cxx:65
GETFrameInfo::Clear
void Clear(Option_t *="")
Definition: GETFrameInfo.cxx:100
ClassImp
ClassImp(GETFrameInfo) GETFrameInfo
Definition: GETFrameInfo.cxx:10
GETFrameInfo::SetEventID
void SetEventID(UInt_t value)
Definition: GETFrameInfo.cxx:21
GETFrameInfo::SetDeltaT
void SetDeltaT(UInt_t value)
Definition: GETFrameInfo.cxx:29
GETFrameInfo.h
GETFrameInfo::SetDataID
void SetDataID(UInt_t value)
Definition: GETFrameInfo.cxx:17
GETFrameInfo::GetEndByte
ULong64_t GetEndByte()
Definition: GETFrameInfo.cxx:69
GETFrameInfo::Print
void Print()
Definition: GETFrameInfo.cxx:111
GETFrameInfo
Definition: GETFrameInfo.h:11
GETFrameInfo::Copy
void Copy(GETFrameInfo *frameInfo)
Definition: GETFrameInfo.cxx:124
GETFrameInfo::GetNumFrames
UInt_t GetNumFrames()
Definition: GETFrameInfo.cxx:77
GETFrameInfo::GETFrameInfo
GETFrameInfo()
GETFrameInfo::GetDeltaT
UInt_t GetDeltaT()
Definition: GETFrameInfo.cxx:61
GETFrameInfo::SetNextInfo
void SetNextInfo(GETFrameInfo *pointer)
Definition: GETFrameInfo.cxx:41
GETFrameInfo::SetEndByte
void SetEndByte(ULong64_t value)
Definition: GETFrameInfo.cxx:37
GETFrameInfo::GetEventID
UInt_t GetEventID()
Definition: GETFrameInfo.cxx:53
GETFrameInfo::SetStartByte
void SetStartByte(ULong64_t value)
Definition: GETFrameInfo.cxx:33