#include <HcalTBSourcePositionDataUnpacker.h>
Public Member Functions | |
HcalTBSourcePositionDataUnpacker (void) | |
void | unpack (const FEDRawData &raw, HcalSourcePositionData &hspd) const |
Definition at line 9 of file HcalTBSourcePositionDataUnpacker.h.
hcaltb::HcalTBSourcePositionDataUnpacker::HcalTBSourcePositionDataUnpacker | ( | void | ) | [inline] |
Definition at line 11 of file HcalTBSourcePositionDataUnpacker.h.
{ }
void hcaltb::HcalTBSourcePositionDataUnpacker::unpack | ( | const FEDRawData & | raw, |
HcalSourcePositionData & | hspd | ||
) | const |
Definition at line 34 of file HcalTBSourcePositionDataUnpacker.cc.
References FEDRawData::data(), xdaqSourcePositionDataFormat::driverInfo, Exception, xdaqSourcePositionDriverData::index_counter, xdaqSourcePositionDriverData::message_counter, xdaqSourcePositionDriverData::motor_current, xdaqSourcePositionDriverData::reel_counter, HcalSourcePositionData::set(), FEDRawData::size(), xdaqSourcePositionDriverData::speed, xdaqSourcePositionDriverData::status, xdaqSourcePositionDriverData::timestamp1_sec, xdaqSourcePositionDriverData::timestamp1_usec, xdaqSourcePositionDriverData::timestamp2_sec, and xdaqSourcePositionDriverData::timestamp2_usec.
Referenced by HcalTBObjectUnpacker::produce().
{ const struct xdaqSourcePositionDataFormat* sp = (const struct xdaqSourcePositionDataFormat*)(raw.data()); if (raw.size()<sizeof(xdaqSourcePositionDataFormat)) { throw cms::Exception("DataFormatError","Fragment too small"); } hspd.set(sp->driverInfo[0].message_counter,//int message_counter, sp->driverInfo[0].timestamp1_sec,//int timestamp1_sec, sp->driverInfo[0].timestamp1_usec,//int timestamp1_usec, sp->driverInfo[0].timestamp2_sec,//int timestamp2_sec, sp->driverInfo[0].timestamp2_usec,//int timestamp2_usec, sp->driverInfo[0].status,//int status, sp->driverInfo[0].index_counter, // int index_counter, sp->driverInfo[0].reel_counter,//int reel_counter, sp->driverInfo[0].motor_current,//int motor_current, sp->driverInfo[0].speed,//int speed, -1,//int tube_number, -1,// int driver_id -1); //int source_id); return; }