8#include "CoolKernel/types.h"
9#include "CoolKernel/Record.h"
10#include "CoralBase/AttributeListSpecification.h"
18#include "GaudiKernel/MsgStream.h"
26 using namespace LArBadChanBlobUtils;
37 coral::AttributeListSpecification* spec =
new coral::AttributeListSpecification();
38 if (spec ==
nullptr) {
41 spec->extend(
"ChannelSize",
"unsigned int");
42 spec->extend(
"StatusWordSize",
"unsigned int");
43 spec->extend(
"Endianness",
"unsigned int");
44 spec->extend(
"Version",
"unsigned int");
45 spec->extend(
"Blob",
"blob");
52 (*attrList)[
"ChannelSize"].setValue( (
unsigned int)
sizeof(
Channel));
53 (*attrList)[
"StatusWordSize"].setValue( wordSize);
55 (*attrList)[
"Version"].setValue( vers);
60 const coral::AttributeListSpecification& spec)
77 coral::Blob& blob=(*attrList)[
"Blob"].data<coral::Blob>();
95 attrListColl->
add(chanNum, *ilist);
107 for (
int i=0; i<2; i++) {
113 attrListColl->
add(chanNum, *ilist);
118 std::vector<BadChanEntry>
119 readBadChan(
const coral::AttributeList& attrList, MsgStream& log)
121 const coral::Blob& blob = attrList[
"Blob"].data<coral::Blob>();
122 unsigned int chanSize = attrList[
"ChannelSize"].data<
unsigned int>();
123 unsigned int stateSize = attrList[
"StatusWordSize"].data<
unsigned int>();
124 unsigned int endian = attrList[
"Endianness"].data<
unsigned int>();
125 unsigned int version = attrList[
"Version"].data<
unsigned int>();
132 std::vector<BadFebEntry>
133 readBadFeb(
const coral::AttributeList& attrList, MsgStream& log)
135 const coral::Blob& blob = attrList[
"Blob"].data<coral::Blob>();
136 unsigned int chanSize = attrList[
"ChannelSize"].data<
unsigned int>();
137 unsigned int stateSize = attrList[
"StatusWordSize"].data<
unsigned int>();
138 unsigned int endian = attrList[
"Endianness"].data<
unsigned int>();
139 unsigned int version = attrList[
"Version"].data<
unsigned int>();
144 std::vector<HWIdentifier> idvec =
146 std::vector<BadFebEntry>
result;
147 result.resize(idvec.size());
151 for (
unsigned int i=0; i<idvec.size(); ++i) {
158 endian, version, log);
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
char data[hepevt_bytes_allocation_ATLAS]
An AttributeList represents a logical row of attributes in a metadata table.
This class is a collection of AttributeLists where each one is associated with a channel number.
bool add(ChanNum chanNum, const AttributeList &attributeList)
Adding in chan/attrList pairs.
const BadChanVec & stateVector() const
const CoolChannelData & coolChannel(CoolChannelEnum chan) const
void setBit(ProblemType pb, BitWord &word, bool value=true) const
singleton-like access to IMessageSvc via open function and helper
IMessageSvc * getMessageSvc(bool quiet=false)
std::pair< HWIdentifier, LArBadFeb > BadFebEntry
std::vector< std::pair< HWIdentifier, T > > decodeBlob(const coral::Blob *blobp, std::size_t chanSize, std::size_t stateSize, int endian, int version, MsgStream &log)
Checks BLOB for differences in endian-ness and size of data types with respect to the architecture on...
std::vector< BadChanEntry > BadChanVec
Identifier32::value_type Channel
std::vector< HWIdentifier > decodeFebBlobV1(const coral::Blob *blobp, std::size_t chanSize, int endian, int version, MsgStream &log)
std::vector< BadFebEntry > BadFebVec
void fillFebBlobV1(const std::vector< HWIdentifier > &vec, coral::Blob &blob)