#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.
|
|
Definition at line 8 of file RawBeamSwicData.cxx.
|
|
|
Definition at line 13 of file RawBeamSwicData.cxx. References SetData(). 00014 {
00015 this->SetData(data);
00016 }
|
|
|
Definition at line 18 of file RawBeamSwicData.cxx. References fData, and RawBeamData::SetData().
|
|
|
Definition at line 27 of file RawBeamSwicData.cxx. 00028 {
00029 return fData;
00030 }
|
|
|
Access the underlying data. May not necessarily be valid.
Definition at line 23 of file RawBeamSwicData.cxx. Referenced by BDSwicCalibrator::AddDevice(), BDSwicCalibrator::CalibrateOne(), BDProfMon::UpdateCache(), BDHadMuMon::UpdateCache(), and BDSwicDevice::UpdateType(). 00024 {
00025 return fData;
00026 }
|
|
|
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(), BdntImp::Fill(), BDSwicDevice::SetData(), BDProfMon::UpdateCache(), BDHadMuMon::UpdateCache(), and BDSwicDevice::UpdateType().
|
|
|
Fill passed in vetcor with the 96 channels of raw scaled (untouched) wire data. Definition at line 176 of file RawBeamSwicData.cxx. References fData, RawBeamData::GetData(), and RAW_OFFSET. 00177 {
00178 const double* data = fData.GetData();
00179 for (int ind=0; ind < RAW_LENGTH; ++ind) {
00180 wd.push_back(data[RAW_OFFSET+ind]);
00181 }
00182 }
|
|
|
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(), BDataQualityModule::FillFile(), 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 }
|
|
|
Fill passed in vetcor with the 96 channels of raw unscaled wire data. vector not clear()ed. Definition at line 169 of file RawBeamSwicData.cxx. References fData, RawBeamData::GetData(), RAW_OFFSET, and unscale(). Referenced by BDSwicDevice::BDSwicDevice(), dump_hadmu_monitor(), dump_profile_monitor(), PedStudy::OneRecord(), BDSwicDevice::SetData(), and BDSwicPeds::SetSpill(). 00170 {
00171 const double* data = fData.GetData();
00172 for (int ind=0; ind < RAW_LENGTH; ++ind) {
00173 wd.push_back(unscale(data[RAW_OFFSET+ind]));
00174 }
00175 }
|
|
|
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(), BDataQualityModule::FillFile(), and BDSwicPeds::IsPedSpill(). 00163 {
00164 const double* data = fData.GetData();
00165 return ul2int(data[GPSTIMESTAMP_OFFSET+2],
00166 data[GPSTIMESTAMP_OFFSET+3]);
00167 }
|
|
|
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(), BDataQualityModule::FillFile(), and BDSwicPeds::IsPedSpill(). 00156 {
00157 const double* data = fData.GetData();
00158 return ul2int(data[GPSTIMESTAMP_OFFSET],
00159 data[GPSTIMESTAMP_OFFSET+1]);
00160 }
|
|
|
Reimplemented in BDSwicDevice. Definition at line 19 of file RawBeamSwicData.h. Referenced by IsValid(), ScaledWireData(), SetData(), UnscaledWireData(), VmeNanoseconds(), VmeSeconds(), and ~RawBeamSwicData(). |
1.3.9.1