#include <RawBeamData.h>
Public Member Functions | |
| RawBeamData () | |
| absolute DAE time stamp msecs | |
| RawBeamData (const int *block_chunk) | |
| virtual | ~RawBeamData () |
| const int * | GetBlock () const |
| size_t | GetBlockLength () const |
| const double * | GetData () const |
| Get the data converted to doubles. | |
| size_t | GetDataLength () const |
| Get data length (1/2 block length). | |
| void | SetData (const int *data_chunk=0, size_t ndata=0) |
| std::string | GetName () const |
| Get device name. | |
| int | GetSeconds () const |
| Get DAE timestamp seconds. | |
| int | GetMsecs () const |
| Get DAE timestamp msecs. | |
Private Attributes | |
| std::string | fName |
| size_t | fNdata |
| ACNET device name. | |
| const int * | fData |
| number of data | |
| int | fSeconds |
| data array as in | |
| int | fMsecs |
| absolute DAE time stamp seconds | |
Encapsulate one ACNET device worth of data.
The data has a name and a "payload" which is an array of doubles values (even if the ACNET device is really a scalar). It also has a second.millisecond timestamp.
This provides a base class for certain special data types (such as RawBeamSwicData).
Contact: bv@bnl.gov
Definition at line 30 of file RawBeamData.h.
|
|
absolute DAE time stamp msecs
Definition at line 5 of file RawBeamData.cxx.
|
|
|
Create object to hold data from one Acnet device. This is called internally by RawBeamMonitorBlock. Definition at line 23 of file RawBeamData.cxx. References fData, fMsecs, fName, fNdata, fSeconds, and unpad(). 00024 : fName(8u,' '), fNdata(0), fData(0) 00025 { 00026 if (!data_chunk) { 00027 fData=0; 00028 return; 00029 } 00030 00031 00032 // The data_chunk should look like: 00033 // ------------------ 00034 // 0: ACNET name part 1 00035 // 1: ACNET name part 2 00036 // 2: second timestamp 00037 // 3: msec timestamp 00038 // 4: N = number of ints in the rest of the block 00039 // 5: value 0 first 32 bits of double 00040 // 6: value 0 second 32 bits of double 00041 // 7: value 1 first 32 bits of double 00042 // 8: value 1 second 32 bits of double 00043 // ... 00044 // N+3: value N/2-1 first 32 bits of double 00045 // N+4: value N/2-1 second 32 bits of double 00046 // ------------------ 00047 00048 int w1 = data_chunk[0]; 00049 fName[0] = w1>>24; 00050 fName[1] = (w1>>16)&0xff; 00051 fName[2] = (w1>>8)&0xff; 00052 fName[3] = w1&0xff; 00053 int w2 = data_chunk[1]; 00054 fName[4] = w2>>24; 00055 fName[5] = (w2>>16)&0xff; 00056 fName[6] = (w2>>8)&0xff; 00057 fName[7] = w2&0xff; 00058 00059 fName = unpad(fName); 00060 00061 fSeconds = data_chunk[2]; 00062 fMsecs = data_chunk[3]; 00063 00064 fNdata = data_chunk[4]; 00065 fData = data_chunk+5; 00066 }
|
|
|
Definition at line 43 of file RawBeamData.h. 00043 {}
|
|
|
Get the raw, untouched block data for this device. Can return 0. Definition at line 47 of file RawBeamData.h. 00047 { return fData; }
|
|
|
Definition at line 49 of file RawBeamData.h. 00049 { return fNdata; }
|
|
|
Get the data converted to doubles.
Definition at line 52 of file RawBeamData.h. Referenced by BDTarget::BpmProjection(), BDSwicCalibrator::CalibrateOne(), BDCheckDB::CheckSpill(), dump_simple_data(), TempModule::Fill(), TargetModule::Fill(), NpotModule::Fill(), LossModule::Fill(), HornModule::Fill(), HadMuMonModule::Fill(), BmntImp::Fill(), BdntImp::Fill(), fill_bdtest(), BDataQualityModule::FillFile(), RawBeamMonBlock::FormatToOStream(), get_scalar(), BDScalar::GetScalar(), BDHornCurrent::GetScalar(), is_pm_there(), RawBeamSwicData::IsValid(), RawBeamPosData::IsValid(), RawBeamSwicData::ScaledWireData(), set_toroid(), RawBeamSwicData::SetData(), RawBeamPosData::SetData(), BDTarget::TargetIn(), total(), RawBeamSwicData::UnscaledWireData(), RawBeamSwicData::VmeNanoseconds(), RawBeamPosData::VmeNanoseconds(), RawBeamSwicData::VmeSeconds(), and RawBeamPosData::VmeSeconds(). 00052 { return (double*)fData; } // evil but correct!
|
|
|
Get data length (1/2 block length).
Definition at line 54 of file RawBeamData.h. Referenced by BDSwicCalibrator::CalibrateOne(), check_data(), BDCheckDB::CheckSpill(), TempModule::Fill(), NpotModule::Fill(), LossModule::Fill(), HornModule::Fill(), HadMuMonModule::Fill(), BmntImp::Fill(), BdntImp::Fill(), fill_bdtest(), BDataQualityModule::FillFile(), RawBeamMonBlock::FormatToOStream(), get_dev(), BDTarget::GetNbatches(), BDScalar::GetScalar(), BDHornCurrent::GetScalar(), is_pm_there(), set_toroid(), RawBeamSwicData::SetData(), RawBeamPosData::SetData(), and total(). 00054 { return fNdata/2; }
|
|
|
Get DAE timestamp msecs.
Definition at line 78 of file RawBeamData.cxx. Referenced by BDAnaModule::Ana(), BDEarliest::CalculateEarliest(), count_good(), dump(), dump_hadmu_monitor(), TempModule::Fill(), TargetModule::Fill(), NpotModule::Fill(), LossModule::Fill(), HornModule::Fill(), HadMuMonModule::Fill(), BmntImp::Fill(), BdntImp::Fill(), BDataQualityModule::FillFile(), find_earliest(), RawBeamMonBlock::FormatToOStream(), BDSwicPeds::IsPedSpill(), and RawBeamMonBlock::Unpacker(). 00079 {
00080 return fMsecs;
00081 }
|
|
|
Get device name.
Definition at line 68 of file RawBeamData.cxx. Referenced by BDSwicCalibrator::AddDevice(), BDSwicCalibrator::CalibrateOne(), HadMuMonModule::Fill(), BDSwicDevice::SetData(), RawBeamMonBlock::Unpacker(), BDProfMon::UpdateCache(), BDHadMuMon::UpdateCache(), and BDSwicDevice::UpdateType(). 00069 {
00070 return fName;
00071 }
|
|
|
Get DAE timestamp seconds.
Definition at line 73 of file RawBeamData.cxx. Referenced by BDAnaModule::Ana(), BDEarliest::CalculateEarliest(), count_good(), dump(), dump_hadmu_monitor(), TempModule::Fill(), TargetModule::Fill(), NpotModule::Fill(), LossModule::Fill(), HornModule::Fill(), HadMuMonModule::Fill(), BmntImp::Fill(), BdntImp::Fill(), BDataQualityModule::FillFile(), find_earliest(), RawBeamMonBlock::FormatToOStream(), get_dae_time(), BDSwicPeds::IsPedSpill(), and RawBeamMonBlock::Unpacker(). 00074 {
00075 return fSeconds;
00076 }
|
|
||||||||||||
|
Allow blind (re)setting the payload data after construction. You will not likely need this so only use it if you know what you are doing. Definition at line 59 of file RawBeamData.h. Referenced by RawBeamSwicData::SetData(), RawBeamPosData::SetData(), RawBeamPosData::~RawBeamPosData(), and RawBeamSwicData::~RawBeamSwicData().
|
|
|
number of data
Definition at line 33 of file RawBeamData.h. Referenced by RawBeamData(). |
|
|
absolute DAE time stamp seconds
Definition at line 35 of file RawBeamData.h. Referenced by RawBeamData(). |
|
|
Definition at line 31 of file RawBeamData.h. Referenced by RawBeamData(). |
|
|
ACNET device name.
Definition at line 32 of file RawBeamData.h. Referenced by RawBeamData(). |
|
|
data array as in
Definition at line 34 of file RawBeamData.h. Referenced by RawBeamData(). |
1.3.9.1