CMS 3D CMS Logo

hcaltb::HcalTBSourcePositionDataUnpacker Class Reference

#include <RecoTBCalo/HcalTBObjectUnpacker/interface/HcalTBSourcePositionDataUnpacker.h>

List of all members.

Public Member Functions

 HcalTBSourcePositionDataUnpacker (void)
void unpack (const FEDRawData &raw, HcalSourcePositionData &hspd)


Detailed Description

Definition at line 9 of file HcalTBSourcePositionDataUnpacker.h.


Constructor & Destructor Documentation

hcaltb::HcalTBSourcePositionDataUnpacker::HcalTBSourcePositionDataUnpacker ( void   )  [inline]

Definition at line 11 of file HcalTBSourcePositionDataUnpacker.h.

00011 { }


Member Function Documentation

void hcaltb::HcalTBSourcePositionDataUnpacker::unpack ( const FEDRawData raw,
HcalSourcePositionData hspd 
)

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().

00035                                                                                  {
00036     
00037     const struct xdaqSourcePositionDataFormat* sp =
00038       (const struct xdaqSourcePositionDataFormat*)(raw.data());
00039     
00040     if (raw.size()<sizeof(xdaqSourcePositionDataFormat)) {
00041       throw cms::Exception("DataFormatError","Fragment too small");
00042     }
00043     
00044     
00045     hspd.set(sp->driverInfo[0].message_counter,//int message_counter,
00046              sp->driverInfo[0].timestamp1_sec,//int timestamp1_sec,
00047              sp->driverInfo[0].timestamp1_usec,//int timestamp1_usec,
00048              sp->driverInfo[0].timestamp2_sec,//int timestamp2_sec,
00049              sp->driverInfo[0].timestamp2_usec,//int timestamp2_usec,
00050              sp->driverInfo[0].status,//int status,
00051              sp->driverInfo[0].index_counter, //  int index_counter,
00052              sp->driverInfo[0].reel_counter,//int reel_counter,
00053              sp->driverInfo[0].motor_current,//int motor_current,
00054              sp->driverInfo[0].speed,//int speed,
00055              -1,//int tube_number,
00056              -1,// int driver_id 
00057              -1); //int source_id);
00058     
00059     return;
00060   }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:47:25 2009 for CMSSW by  doxygen 1.5.4