ATLAS Offline Software
Loading...
Searching...
No Matches
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"
9
10
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
21StatusCode TGCTriggerCondAlg::execute(const EventContext& ctx) const {
22
23 ATH_MSG_DEBUG( "start execute " << name() );
24
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
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
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
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.
size_type size() const
number of Chan/AttributeList pairs
bool range(EventIDRange &r)
const std::string & key() const
const DataObjID & fullKey() const
const std::string & key() const
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
const DataObjID & fullKey() const
virtual StatusCode execute(const EventContext &ctx) const override
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_bw
SG::WriteCondHandleKey< TGCTriggerLUTs > m_writeKey
virtual StatusCode initialize() override