ATLAS Offline Software
LArBadChanBlobUtils.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LArBadChanBlobUtils_H
6 #define LArBadChanBlobUtils_H
7 
8 #include "CoolKernel/types.h"
9 
13 
14 #include "GaudiKernel/MsgStream.h"
15 
16 #include <vector>
17 
19 
20  typedef std::pair<HWIdentifier, LArBadChannel> BadChanEntry;
21  typedef std::pair<HWIdentifier, LArBadFeb> BadFebEntry;
22  typedef std::vector<BadChanEntry> BadChanVec;
23  typedef std::vector<BadFebEntry> BadFebVec;
25 
27 
28  int machineEndianness();
29 
32  // but fill the blob with vector of pair<HWIdentifier32, LArBadChannel>
35  template <class T>
36  void fillBlob( const std::vector< std::pair<HWIdentifier,T> >& vec, coral::Blob& blob);
37 
38  void fillFebBlobV1( const std::vector<HWIdentifier>& vec, coral::Blob& blob);
39 
48  template <class T>
49  std::vector<std::pair<HWIdentifier,T> > decodeBlob( const coral::Blob* blobp,
50  std::size_t chanSize,
51  std::size_t stateSize,
52  int endian,
53  int version,
54  MsgStream& log);
55 
56  std::vector<HWIdentifier> decodeFebBlobV1( const coral::Blob* blobp,
57  std::size_t chanSize,
58  int endian,
59  int version,
60  MsgStream& log);
61 
62  bool checkBlob( const coral::Blob* blobp,
63  std::size_t chanSize,
64  std::size_t stateSizeInBlob,
65  int endian,
66  int /*version*/,
67  std::size_t step,
68  std::size_t currentStateSize,
69  MsgStream& log);
70 }
71 
73 
74 #endif
LArBadChanBlobUtils
Definition: LArBadChanBlobUtils.h:18
LArBadChanBlobUtils::Channel
Identifier32::value_type Channel
Definition: LArBadChanBlobUtils.h:24
LArBadChannel.h
LArBadChanBlobUtils::BadChanVec
std::vector< BadChanEntry > BadChanVec
Definition: LArBadChanBlobUtils.h:22
LArBadChanBlobUtils::BigEndian
@ BigEndian
Definition: LArBadChanBlobUtils.h:26
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
LArBadChanBlobUtils::checkBlob
bool checkBlob(const coral::Blob *blobp, std::size_t chanSize, std::size_t stateSizeInBlob, int endian, int, std::size_t step, std::size_t currentStateSize, MsgStream &log)
Definition: LArBadChanBlobUtils.cxx:30
LArBadChanBlobUtils::decodeFebBlobV1
std::vector< HWIdentifier > decodeFebBlobV1(const coral::Blob *blobp, std::size_t chanSize, int endian, int version, MsgStream &log)
Definition: LArBadChanBlobUtils.cxx:72
LArBadChanBlobUtils::fillBlob
void fillBlob(const std::vector< std::pair< HWIdentifier, T > > &vec, coral::Blob &blob)
Creates a BLOB of the right size and copies the content of the vector of pair<HWIdentifier,...
LArBadChanBlobUtils::BadFebVec
std::vector< BadFebEntry > BadFebVec
Definition: LArBadChanBlobUtils.h:23
LArBadChanBlobUtils::BadChanEntry
std::pair< HWIdentifier, LArBadChannel > BadChanEntry
Definition: LArBadChanBlobUtils.h:20
LArBadChanBlobUtils::machineEndianness
int machineEndianness()
Definition: LArBadChanBlobUtils.cxx:9
LArBadChanBlobUtils::BadFebEntry
std::pair< HWIdentifier, LArBadFeb > BadFebEntry
Definition: LArBadChanBlobUtils.h:21
LArBadChanBlobUtils::fillFebBlobV1
void fillFebBlobV1(const std::vector< HWIdentifier > &vec, coral::Blob &blob)
Definition: LArBadChanBlobUtils.cxx:17
LArBadFeb.h
LArBadChanBlobUtils::decodeBlob
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...
LArBadChanBlobUtils::Endianness
Endianness
Definition: LArBadChanBlobUtils.h:26
HWIdentifier.h
get_generator_info.version
version
Definition: get_generator_info.py:33
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LArBadChanBlobUtils::LittleEndian
@ LittleEndian
Definition: LArBadChanBlobUtils.h:26
LArCellBinning.step
step
Definition: LArCellBinning.py:158
LArBadChanBlobUtils.icc
CaloCondBlobAlgs_fillNoiseFromASCII.blob
blob
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:96
Identifier32::value_type
unsigned int value_type
Definition: Identifier32.h:28