#include <RawBeamPosData.h>
Public Member Functions | |
| RawBeamPosData () | |
| RawBeamPosData (const RawBeamData &data) | |
| virtual | ~RawBeamPosData () |
| bool | IsValid () |
| Return true if the data is valid. | |
| RawBeamData & | GetData () |
| Access the underlying data. May not necessarily be valid. | |
| bool | SetData (const RawBeamData &data) |
| int | VmeSeconds () |
| VME timesamp, seconds. | |
| int | VmeNanoseconds () |
| VME timesamp, nanoseconds. | |
Private Attributes | |
| RawBeamData | fData |
This decorates RawBeamData object as if the data was taken from a new style beam position monitor.
Definition at line 16 of file RawBeamPosData.h.
|
|
Definition at line 9 of file RawBeamPosData.cxx.
|
|
|
Definition at line 14 of file RawBeamPosData.cxx. References SetData(). 00015 {
00016 this->SetData(data);
00017 }
|
|
|
Definition at line 19 of file RawBeamPosData.cxx. References fData, and RawBeamData::SetData().
|
|
|
Access the underlying data. May not necessarily be valid.
Definition at line 24 of file RawBeamPosData.cxx. 00025 {
00026 return fData;
00027 }
|
|
|
Return true if the data is valid.
Definition at line 46 of file RawBeamPosData.cxx. References fData, and RawBeamData::GetData(). Referenced by BdntImp::Fill().
|
|
|
This (re)sets the underlying RawBeamData. A shallow copy is made. The data is sanity checked for being BPM data. If it fails it is invalidated and false is returned. Definition at line 28 of file RawBeamPosData.cxx. References fData, RawBeamData::GetData(), RawBeamData::GetDataLength(), and RawBeamData::SetData(). Referenced by BdntImp::Fill(), and RawBeamPosData(). 00029 {
00030 fData = data;
00031
00032 if (!fData.GetData()) return false;
00033
00034 // Sanity checks
00035 const size_t bpm_data_size = 216;
00036 const size_t siz = fData.GetDataLength();
00037 if (siz != bpm_data_size) {
00038 cerr << "Not right size: 216 != " << siz << endl;
00039 fData.SetData(0);
00040 return false;
00041 }
00042
00043 return true;
00044 }
|
|
|
VME timesamp, nanoseconds.
Definition at line 118 of file RawBeamPosData.cxx. References fData, RawBeamData::GetData(), and GPSTIMESTAMP_OFFSET. Referenced by BdntImp::Fill(). 00119 {
00120 const double* data = fData.GetData();
00121 float f = (float)data[GPSTIMESTAMP_OFFSET+1];
00122 int i;
00123 memcpy(&i,&f,sizeof(int));
00124 return i;
00125 }
|
|
|
VME timesamp, seconds.
Definition at line 109 of file RawBeamPosData.cxx. References fData, and RawBeamData::GetData(). Referenced by BdntImp::Fill(). 00110 {
00111 const double* data = fData.GetData();
00112 float f = (float)data[GPSTIMESTAMP_OFFSET];
00113 int i;
00114 memcpy(&i,&f,sizeof(int));
00115 return i;
00116 }
|
|
|
Definition at line 17 of file RawBeamPosData.h. Referenced by IsValid(), SetData(), VmeNanoseconds(), VmeSeconds(), and ~RawBeamPosData(). |
1.3.9.1