ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArBadChannelTool
LArBadChannelTool
LArBadChannelDBTools.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef LArBadChannelDBTools_H
6
#define LArBadChannelDBTools_H
7
8
#include "CoolKernel/types.h"
9
#include "CoolKernel/Record.h"
10
#include "CoralBase/AttributeListSpecification.h"
11
#include "
AthenaPoolUtilities/AthenaAttributeList.h
"
12
#include "
AthenaPoolUtilities/CondAttrListCollection.h
"
13
14
#include "
Identifier/HWIdentifier.h
"
15
#include "
LArBadChannelTool/HWIdentifier32.h
"
16
#include "
LArRecConditions/LArBadChannel.h
"
17
#include "
LArRecConditions/LArBadFeb.h
"
18
#include "
LArRecConditions/LArBadFebBitPacking.h
"
19
#include "
LArBadChannelTool/LArBadChannelState.h
"
20
#include "
LArBadChannelTool/LArBadChanBlobUtils.h
"
21
22
#include "GaudiKernel/MsgStream.h"
23
24
#include <vector>
25
26
namespace
LArBadChannelDBTools
{
27
28
typedef
std::pair<HWIdentifier, LArBadChannel>
BadChanEntry
;
29
typedef
std::pair<HWIdentifier, LArBadFeb>
BadFebEntry
;
30
typedef
std::vector<BadChanEntry>
BadChanVec
;
31
typedef
std::vector<BadFebEntry>
BadFebVec
;
32
typedef
HWIdentifier32::value_type
Channel
;
33
35
MsgStream
getDefaultMsgStream
();
36
38
coral::AttributeListSpecification*
createCoolSpec
();
39
40
template
<
class
Entry>
41
AthenaAttributeList
*
createPayload
(
const
std::vector<Entry>& data,
42
const
coral::AttributeListSpecification& spec );
43
44
CondAttrListCollection
*
createCoolCollection
(
const
LArBadChannelState
& bcState);
45
46
AthenaAttributeList
*
createChanPayload
(
const
BadChanVec
& data,
47
const
coral::AttributeListSpecification& spec);
48
49
AthenaAttributeList
*
createFebPayload
(
const
BadFebVec
& data);
50
51
AthenaAttributeList
*
createFebPayloadV1
(
const
std::vector<HWIdentifier32>& data);
52
54
CondAttrListCollection
*
createEmptyCoolCollection
();
55
57
inline
unsigned
int
badChanVersion
() {
return
1;}
58
inline
unsigned
int
badFebVersion
() {
return
2;}
59
60
void
fillControlInfo
(
AthenaAttributeList
* attrList,
unsigned
int
wordSize,
unsigned
int
vers);
61
62
template
<
class
T>
63
AthenaAttributeList
*
createPayload
(
const
std::vector< std::pair<HWIdentifier,T> >& data,
64
const
coral::AttributeListSpecification& spec,
65
unsigned
int
vers)
66
{
67
AthenaAttributeList
* attrList =
new
AthenaAttributeList
(spec);
68
fillControlInfo
(attrList,
sizeof
(
typename
T::BitWord), vers);
69
coral::Blob& blob=(*attrList)[
"Blob"
].data<coral::Blob>();
70
LArBadChanBlobUtils::fillBlob
( data, blob);
71
return
attrList;
72
}
73
74
std::vector<BadChanEntry>
75
readBadChan
(
const
coral::AttributeList& attrList, MsgStream& log);
76
77
std::vector<BadFebEntry>
78
readBadFeb
(
const
coral::AttributeList& attrList, MsgStream& log);
79
}
80
81
#endif
AthenaAttributeList.h
CondAttrListCollection.h
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
HWIdentifier32.h
HWIdentifier.h
LArBadChanBlobUtils.h
LArBadChannelState.h
LArBadChannel.h
LArBadFebBitPacking.h
LArBadFeb.h
AthenaAttributeList
An AttributeList represents a logical row of attributes in a metadata table.
Definition
PersistentDataModel/PersistentDataModel/AthenaAttributeList.h:46
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number.
Definition
CondAttrListCollection.h:51
Identifier32::value_type
unsigned int value_type
Definition
Identifier32.h:31
LArBadChannelState
Definition
LArBadChannelState.h:15
LArBadChanBlobUtils::BadFebEntry
std::pair< HWIdentifier, LArBadFeb > BadFebEntry
Definition
LArBadChanBlobUtils.h:21
LArBadChanBlobUtils::BadChanVec
std::vector< BadChanEntry > BadChanVec
Definition
LArBadChanBlobUtils.h:22
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::Channel
Identifier32::value_type Channel
Definition
LArBadChanBlobUtils.h:24
LArBadChanBlobUtils::BadChanEntry
std::pair< HWIdentifier, LArBadChannel > BadChanEntry
Definition
LArBadChanBlobUtils.h:20
LArBadChanBlobUtils::BadFebVec
std::vector< BadFebEntry > BadFebVec
Definition
LArBadChanBlobUtils.h:23
LArBadChannelDBTools
Definition
LArBadChannelDBTools.h:26
LArBadChannelDBTools::createCoolSpec
coral::AttributeListSpecification * createCoolSpec()
creates the AttributeListSpecification for the LArBadChannel DB
Definition
LArBadChannelDBTools.cxx:35
LArBadChannelDBTools::badFebVersion
unsigned int badFebVersion()
Definition
LArBadChannelDBTools.h:58
LArBadChannelDBTools::createCoolCollection
CondAttrListCollection * createCoolCollection(const LArBadChannelState &bcState)
Definition
LArBadChannelDBTools.cxx:82
LArBadChannelDBTools::badChanVersion
unsigned int badChanVersion()
Version of the BLOB encoding, to be incremented each time the BLOB format changes.
Definition
LArBadChannelDBTools.h:57
LArBadChannelDBTools::createEmptyCoolCollection
CondAttrListCollection * createEmptyCoolCollection()
Create an empty collection with no bad channels, e.g. for MC.
Definition
LArBadChannelDBTools.cxx:102
LArBadChannelDBTools::readBadChan
std::vector< BadChanEntry > readBadChan(const coral::AttributeList &attrList, MsgStream &log)
Definition
LArBadChannelDBTools.cxx:119
LArBadChannelDBTools::createPayload
AthenaAttributeList * createPayload(const std::vector< Entry > &data, const coral::AttributeListSpecification &spec)
LArBadChannelDBTools::createFebPayloadV1
AthenaAttributeList * createFebPayloadV1(const std::vector< HWIdentifier32 > &data)
LArBadChannelDBTools::fillControlInfo
void fillControlInfo(AthenaAttributeList *attrList, unsigned int wordSize, unsigned int vers)
Definition
LArBadChannelDBTools.cxx:50
LArBadChannelDBTools::readBadFeb
std::vector< BadFebEntry > readBadFeb(const coral::AttributeList &attrList, MsgStream &log)
Definition
LArBadChannelDBTools.cxx:133
LArBadChannelDBTools::createFebPayload
AthenaAttributeList * createFebPayload(const BadFebVec &data)
Definition
LArBadChannelDBTools.cxx:65
LArBadChannelDBTools::getDefaultMsgStream
MsgStream getDefaultMsgStream()
used to get default msg stream
Definition
LArBadChannelDBTools.cxx:28
LArBadChannelDBTools::createChanPayload
AthenaAttributeList * createChanPayload(const BadChanVec &data, const coral::AttributeListSpecification &spec)
Definition
LArBadChannelDBTools.cxx:59
Generated on
for ATLAS Offline Software by
1.17.0