ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TGCTriggerCondSvc
src
TGCTriggerCondAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TGCTriggerCondAlg.h
"
6
#include "
AthenaPoolUtilities/CondAttrListCollection.h
"
7
#include "
StoreGate/ReadCondHandle.h
"
8
#include "
StoreGate/WriteCondHandle.h
"
9
10
11
StatusCode
TGCTriggerCondAlg::initialize
(){
12
13
ATH_MSG_INFO
(
"initialize "
<< name() );
14
15
ATH_CHECK
(
m_readKey_bw
.initialize());
16
ATH_CHECK
(
m_writeKey
.initialize());
17
18
return
StatusCode::SUCCESS;
19
}
20
21
StatusCode
TGCTriggerCondAlg::execute
(
const
EventContext& ctx)
const
{
22
23
ATH_MSG_DEBUG
(
"start execute "
<< name() );
24
25
SG::WriteCondHandle<TGCTriggerLUTs>
writeHandle{
m_writeKey
, ctx};
26
if
(writeHandle.
isValid
()) {
27
ATH_MSG_DEBUG
(
"CondHandle "
<< writeHandle.
fullKey
() <<
" is already valid."
28
<<
". In theory this should not be called, but may happen"
29
<<
" if multiple concurrent events are being processed out of order."
);
30
return
StatusCode::SUCCESS;
31
}
32
33
auto
writeCdo = std::make_unique<TGCTriggerLUTs>();
34
35
// Big wheel for Run3
36
SG::ReadCondHandle<CondAttrListCollection>
readHandle_bw(
m_readKey_bw
, ctx);
37
const
CondAttrListCollection
* readCdo_bw(*readHandle_bw);
38
39
40
if
(readCdo_bw == 0) {
41
ATH_MSG_ERROR
(
"Null pointer to the read conditions object"
);
42
return
StatusCode::FAILURE;
43
}
44
45
ATH_MSG_INFO
(
"Size of CondAttrListCollection "
<< readHandle_bw.
fullKey
() <<
" readCdo->size()= "
<< readCdo_bw->
size
());
46
47
EventIDRange rangeW_bw;
48
if
( !readHandle_bw.
range
(rangeW_bw) ) {
49
ATH_MSG_ERROR
(
"Failed to retrieve validity range for "
<< readHandle_bw.
key
());
50
return
StatusCode::FAILURE;
51
}
52
ATH_MSG_INFO
(
"Range of input is "
<< rangeW_bw);
53
54
//LUT loader will be implemented.
55
56
if
(writeHandle.
record
(rangeW_bw, std::move(writeCdo)).isFailure()) {
57
ATH_MSG_FATAL
(
"Could not record TGCTriggerLUTs "
<< writeHandle.
key
()
58
<<
" with EventRange "
<< rangeW_bw
59
<<
" into Conditions Store"
);
60
return
StatusCode::FAILURE;
61
}
62
63
return
StatusCode::SUCCESS;
64
}
65
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition
AthMsgStreamMacros.h:34
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
CondAttrListCollection.h
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
ReadCondHandle.h
TGCTriggerCondAlg.h
WriteCondHandle.h
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number.
Definition
CondAttrListCollection.h:51
CondAttrListCollection::size
size_type size() const
number of Chan/AttributeList pairs
Definition
CondAttrListCollection.h:321
SG::ReadCondHandle
Definition
ReadCondHandle.h:40
SG::ReadCondHandle::range
bool range(EventIDRange &r)
Definition
ReadCondHandle.h:223
SG::ReadCondHandle::key
const std::string & key() const
Definition
ReadCondHandle.h:59
SG::ReadCondHandle::fullKey
const DataObjID & fullKey() const
Definition
ReadCondHandle.h:60
SG::WriteCondHandle
Definition
WriteCondHandle.h:26
SG::WriteCondHandle::key
const std::string & key() const
Definition
WriteCondHandle.h:44
SG::WriteCondHandle::record
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
Definition
WriteCondHandle.h:161
SG::WriteCondHandle::isValid
bool isValid() const
Definition
WriteCondHandle.h:252
SG::WriteCondHandle::fullKey
const DataObjID & fullKey() const
Definition
WriteCondHandle.h:45
TGCTriggerCondAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
TGCTriggerCondAlg.cxx:21
TGCTriggerCondAlg::m_readKey_bw
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_bw
Definition
TGCTriggerCondAlg.h:25
TGCTriggerCondAlg::m_writeKey
SG::WriteCondHandleKey< TGCTriggerLUTs > m_writeKey
Definition
TGCTriggerCondAlg.h:26
TGCTriggerCondAlg::initialize
virtual StatusCode initialize() override
Definition
TGCTriggerCondAlg.cxx:11
Generated on
for ATLAS Offline Software by
1.17.0