#include <RawBeamSwicData.h>
Inheritance diagram for RawBeamSwicData:

Public Member Functions | |
| RawBeamSwicData () | |
| RawBeamSwicData (const RawBeamData &data) | |
| virtual | ~RawBeamSwicData () |
| bool | IsValid () const |
| Return true if the data is valid. | |
| RawBeamData & | GetData () |
| Access the underlying data. May not necessarily be valid. | |
| const RawBeamData & | GetData () const |
| bool | SetData (const RawBeamData &data) |
| int | VmeSeconds () const |
| VME timesamp, seconds. | |
| int | VmeNanoseconds () const |
| VME timesamp, nanoseconds. | |
| void | UnscaledWireData (std::vector< int > &wd) const |
| void | ScaledWireData (std::vector< double > &wd) const |
Private Attributes | |
| RawBeamData | fData |
This decorates RawBeamData object as if the data was taken from a SWIC scanner. Some sanity checks are done to try to assure the data really is from a SWIC scanner.
Definition at line 18 of file RawBeamSwicData.h.
| RawBeamSwicData::RawBeamSwicData | ( | ) |
| RawBeamSwicData::RawBeamSwicData | ( | const RawBeamData & | data | ) |
Definition at line 13 of file RawBeamSwicData.cxx.
References SetData().
00014 { 00015 this->SetData(data); 00016 }
| RawBeamSwicData::~RawBeamSwicData | ( | ) | [virtual] |
| const RawBeamData & RawBeamSwicData::GetData | ( | ) | const |
Definition at line 27 of file RawBeamSwicData.cxx.
References fData.
00028 { 00029 return fData; 00030 }
| RawBeamData & RawBeamSwicData::GetData | ( | ) |
Access the underlying data. May not necessarily be valid.
Definition at line 23 of file RawBeamSwicData.cxx.
References fData.
Referenced by BDSwicCalibrator::AddDevice(), BDSwicCalibrator::CalibrateOne(), BDProfMon::UpdateCache(), BDHadMuMon::UpdateCache(), and BDSwicDevice::UpdateType().
00024 { 00025 return fData; 00026 }
| bool RawBeamSwicData::IsValid | ( | ) | const |
Return true if the data is valid.
Definition at line 49 of file RawBeamSwicData.cxx.
References fData, and RawBeamData::GetData().
Referenced by BDSwicCalibrator::AddDevice(), BDSwicCalibrator::CalibrateOne(), and BdntImp::Fill().
| void RawBeamSwicData::ScaledWireData | ( | std::vector< double > & | wd | ) | const |
Fill passed in vetcor with the 96 channels of raw scaled (untouched) wire data.
| bool RawBeamSwicData::SetData | ( | const RawBeamData & | data | ) |
This (re)sets the underlying RawBeamData. A shallow copy is made. The data is checked for SWICness. It it fails it is invalidated and false is returned.
Reimplemented in BDHadMuMon, BDProfMon, and BDSwicDevice.
Definition at line 31 of file RawBeamSwicData.cxx.
References fData, RawBeamData::GetData(), RawBeamData::GetDataLength(), and RawBeamData::SetData().
Referenced by BDEarliest::CalculateEarliest(), BdntImp::Fill(), BDSwicPeds::IsPedSpill(), PedStudy::OneRecord(), RawBeamSwicData(), and BDSwicDevice::SetData().
00032 { 00033 fData = data; 00034 00035 if (!fData.GetData()) return false; 00036 00037 // Sanity checks 00038 const size_t swic_data_size = 216; 00039 const size_t siz = fData.GetDataLength(); 00040 if (siz != swic_data_size) { 00041 cerr << "Not right size: 216 != " << siz << endl; 00042 fData.SetData(0); 00043 return false; 00044 } 00045 00046 return true; 00047 }
| void RawBeamSwicData::UnscaledWireData | ( | std::vector< int > & | wd | ) | const |
Fill passed in vetcor with the 96 channels of raw unscaled wire data. vector not clear()ed.
Referenced by BDSwicDevice::BDSwicDevice(), dump_hadmu_monitor(), dump_profile_monitor(), PedStudy::OneRecord(), BDSwicDevice::SetData(), and BDSwicPeds::SetSpill().
| int RawBeamSwicData::VmeNanoseconds | ( | ) | const |
VME timesamp, nanoseconds.
Definition at line 162 of file RawBeamSwicData.cxx.
References fData, RawBeamData::GetData(), GPSTIMESTAMP_OFFSET, and ul2int().
Referenced by BDAnaModule::Ana(), BDEarliest::CalculateEarliest(), dump_hadmu_monitor(), BdntImp::Fill(), and BDSwicPeds::IsPedSpill().
00163 { 00164 const double* data = fData.GetData(); 00165 return ul2int(data[GPSTIMESTAMP_OFFSET+2], 00166 data[GPSTIMESTAMP_OFFSET+3]); 00167 }
| int RawBeamSwicData::VmeSeconds | ( | ) | const |
VME timesamp, seconds.
Definition at line 155 of file RawBeamSwicData.cxx.
References fData, RawBeamData::GetData(), GPSTIMESTAMP_OFFSET, and ul2int().
Referenced by BDAnaModule::Ana(), BDEarliest::CalculateEarliest(), dump_hadmu_monitor(), BdntImp::Fill(), and BDSwicPeds::IsPedSpill().
00156 { 00157 const double* data = fData.GetData(); 00158 return ul2int(data[GPSTIMESTAMP_OFFSET], 00159 data[GPSTIMESTAMP_OFFSET+1]); 00160 }
RawBeamData RawBeamSwicData::fData [private] |
Reimplemented in BDSwicDevice.
Definition at line 19 of file RawBeamSwicData.h.
Referenced by GetData(), IsValid(), SetData(), VmeNanoseconds(), VmeSeconds(), and ~RawBeamSwicData().
1.4.7