7#include "CoralBase/Blob.h"
8#include "CoralBase/Attribute.h"
9#include "CoralBase/AttributeList.h"
10#include "CoralBase/AttributeListSpecification.h"
23 if (!attrList)
return;
30 msg << MSG::DEBUG <<
"Found data for " << attrList->
size() <<
" gains." <<
endmsg;
34 for(;gainIt!=gainIt_e;++gainIt) {
35 const unsigned gain=gainIt->first;
36 if (gain>=attrList->
size()) {
37 msg << MSG::ERROR <<
"Found unexpected COOL-channel (=gain) number:" << gain <<
endmsg;
40 const coral::AttributeList& attr=gainIt->second;
41 const coral::Blob& pedBlob = attr[
"Pedestal"].data<coral::Blob>();
42 const coral::Blob& rmsBlob = attr[
"PedestalRMS"].data<coral::Blob>();
43 if (blobSize==0) blobSize=pedBlob.size();
46 if (blobSize!=pedBlob.size() || blobSize!=rmsBlob.size()) {
47 msg << MSG::ERROR <<
"Unequal blob size (" << blobSize <<
"/"
48 << pedBlob.size() <<
"/" << rmsBlob.size() <<
")" <<
endmsg;
51 m_pPedestal[gain]=
static_cast<const float*
>(pedBlob.startingAddress());
52 m_pPedestalRMS[gain]=
static_cast<const float*
>(rmsBlob.startingAddress());
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
This class is a collection of AttributeLists where each one is associated with a channel number.
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_pPedestalRMS
std::vector< const float * > m_pPedestal
void readBlob(const CondAttrListCollection *attrList, MsgStream &msg)