17 {
23
24 if (!attrList) return;
25
28
32 msg << MSG::DEBUG <<
"Found data for " << attrList->
size() <<
" gains." <<
endmsg;
33
34 int blobSize=0;
35
36
37 for(;gainIt!=gainIt_e;++gainIt) {
38 const unsigned gain=gainIt->first;
39 if (gain>=attrList->
size() || gain>2) {
40 msg << MSG::ERROR <<
"Found unexpected COOL-channel (=gain) number:" <<
gain <<
endmsg;
41 return;
42 }
43 const coral::AttributeList& attr=gainIt->second;
44 const coral::Blob& shapeaBlob = attr["Shape"].data<coral::Blob>();
45 const coral::Blob& shapebBlob = attr["ShapeDer"].data<coral::Blob>();
46 const coral::Blob& toBlob = attr["TimeOffset"].data<coral::Blob>();
47 if (blobSize==0) blobSize=shapeaBlob.size();
49
50
51 if (blobSize!=shapeaBlob.size() || blobSize!=shapebBlob.size()) {
52 msg << MSG::ERROR <<
"Unequal blob size (" << blobSize <<
"/"
53 << shapeaBlob.size() <<
"/" << shapebBlob.size() <<
")" <<
endmsg;
54 return;
55 }
57 msg << MSG::ERROR <<
"Unequal number of samples (" <<
m_nSamples <<
"/"
58 << attr[
"nSamples"].data<
unsigned>() <<
")" <<
endmsg;
59 return;
60 }
61
62
63 m_pShape[
gain]=
static_cast<const float*
>(shapeaBlob.startingAddress());
64 m_pShapeDer[
gain]=
static_cast<const float*
>(shapebBlob.startingAddress());
66 }
67
69 msg << MSG::ERROR <<
"Number of samples is zero!" <<
endmsg;
70 return;
71 }
74}
char data[hepevt_bytes_allocation_ATLAS]
const_iterator end() const
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
size_type size() const
number of Chan/AttributeList pairs
ChanAttrListMap::const_iterator const_iterator
std::vector< const float * > m_pTimeOffset
std::vector< const float * > m_pShape
std::vector< const float * > m_pShapeDer