21 unsigned int l1 =
length & 0xFF;
22 unsigned int l2 = (
length >> 8) & 0xFF;
23 unsigned int l3 = (
length >> 16) & 0xFF;
24 unsigned int l4 = (
length >> 24) & 0xFF;
26 std::vector<float>::const_iterator it = persObj->
m_data.begin();
28 std::vector<float> amplitude;
30 amplitude.assign (it, it+l1);
33 amplitude.push_back( 0.0 );
36 std::vector<float> time;
38 time.assign (it, it+l2);
41 time.push_back( 0.0 );
44 std::vector<float> quality;
46 quality.assign (it, it+l3);
49 quality.push_back( 0.0 );
56 if (it != persObj->
m_data.end()) {
57 log << MSG::ERROR <<
"TileRawChannelCnv_p1::persToTrans wrong size of data vector: "
74 unsigned int l1 = transObj->
size();
if (l1>0xFF) l1=0xFF;
75 unsigned int l2 = transObj->
sizeTime();
if (l2>0xFF) l2=0xFF;
76 unsigned int l3 = transObj->
sizeQuality();
if (l3>0xFF) l3=0xFF;
79 if (l1==1 && transObj->
amplitude(0)==0.0) l1=0;
80 if (l2==1 && transObj->
time(0)==0.0) l2=0;
81 if (l3==1 && transObj->
quality(0)==0.0) l3=0;
82 if ( transObj->
pedestal()==0.0) l4=0;
84 persObj->
m_length = (l4<<24 | l3<<16 | l2<<8 | l1);
88 persObj->
m_data.reserve(l1+l2+l3+l4);
90 for (
unsigned int i=0; i<l1; ++i) {
94 for (
unsigned int i=0; i<l2; ++i) {
95 persObj->
m_data.push_back( transObj->
time(i) );
98 for (
unsigned int i=0; i<l3; ++i) {
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
virtual void transToPers(const TileRawChannel *transObj, TileRawChannel_p1 *persObj, MsgStream &log) const override
Method creating the persistent representation TileRawChannel_p1 from its transient representation Til...
virtual void persToTrans(const TileRawChannel_p1 *persObj, TileRawChannel *transObj, MsgStream &log) const override
Method creating the transient representation TileRawChannel from its persistent representation TileRa...
std::vector< float > m_data
float pedestal(void) const
float time(int ind=0) const
float quality(int ind=0) const
float amplitude(int ind=0) const
HWIdentifier adc_HWID(void) const