ATLAS Offline Software
Loading...
Searching...
No Matches
HLTResultWriter.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
11
12
13#include "HLTResultWriter.h"
29
30
37HLT_END_TYPE_REGISTRATION(DataModelTest)
38
39
40struct TypeInfo_EDM {
41 using map = TypeInfo_DataModelTest;
42};
43
44
46
47
48namespace DMTest {
49
50
56HLTResultWriter::HLTResultWriter (const std::string &name,
57 ISvcLocator *pSvcLocator)
58 : AthAlgorithm (name, pSvcLocator),
59 m_nav ("TestNav", this)
60{
61 declareProperty ("ResultKey", m_resultKey = "HLTResult_HLT");
62 declareProperty ("Nav", m_nav);
63}
64
65
69StatusCode HLTResultWriter::initialize ATLAS_NOT_THREAD_SAFE()
70{
71 ATH_CHECK( m_resultKey.initialize() );
72 ATH_CHECK( m_nav.retrieve() );
73 HLT::TypeMaps::registerFeatureContainer<DMTest::CVec,DMTest::CVec>();
74 HLT::TypeMaps::registerFeatureContainer<DMTest::CView,DMTest::CView>();
75 HLT::TypeMaps::registerFeatureContainer<DMTest::PVec,DMTest::PVec>();
76 HLT::TypeMaps::registerType<DMTest::CAuxContainer>();
77 HLT::TypeMaps::registerType<DMTest::PAuxContainer>();
78 HLT::TypeMaps::registerFeatureContainer<DMTest::HVec,DMTest::HVec>();
79 HLT::TypeMaps::registerFeatureContainer<DMTest::HView,DMTest::HView>();
80 HLT::TypeMaps::registerType<DMTest::HAuxContainer>();
81 return StatusCode::SUCCESS;
82}
83
84
89{
91 ATH_CHECK( result.record (std::make_unique<HLT::HLTResult>()) );
92
93 m_nav->prepare();
94 if (!m_nav->serialize (result->getNavigationResult(),
95 result->getNavigationResultCuts(),
96 result->getNavigationResultIDName()))
97 return StatusCode::FAILURE;
98 m_nav->reset();
99
100 return StatusCode::SUCCESS;
101}
102
103
108{
109 return StatusCode::SUCCESS;
110}
111
112
113} // namespace DMTest
114
#define ATH_CHECK
Evaluate an expression and check for errors.
Class used for testing xAOD data reading/writing.
Class used for testing xAOD data reading/writing.
Class used for testing ViewVector reading/writing.
Class used for testing xAOD data reading/writing.
Test for xAOD schema evolution.
Test for xAOD schema evolution.
#define HLT_REGISTER_TYPE(OBJECT, FEATURE, CONTAINER,...)
Register an HLT type with optional Aux container.
#define HLT_END_TYPE_REGISTRATION(name)
#define HLT_BEGIN_TYPE_REGISTRATION
Test for serializing an xAOD object into bytestream.
Class used for testing xAOD data reading/writing with packed containers.
Class used for testing xAOD data reading/writing with packed containers.
Class used for testing xAOD data reading/writing with packed containers.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
SG::WriteHandleKey< HLT::HLTResult > m_resultKey
Handle to write the HLTResult object.
ToolHandle< HLT::Navigation > m_nav
Navigation object use to fill the result.
HLTResultWriter(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
virtual StatusCode execute() override
Algorithm event processing.
virtual StatusCode finalize() override
Algorithm finalization; called at the end of the job.
This is an implementation class for all Holders It is templated with 2 arguments STORED which is type...
Definition Holder.h:329
Definition B.h:23
C_v1 C
Definition C.h:26
PVec_v1 PVec
Definition PVec.h:23
PAuxContainer_v1 PAuxContainer
StatusCode HLTResultReader::initialize ATLAS_NOT_THREAD_SAFE()
Algorithm initialization; called at the beginning of the job.
CVec_v1 CVec
Definition CVec.h:26
CView_v1 CView
Definition CView.h:26
CAuxContainer_v1 CAuxContainer
P_v1 P
Definition P.h:23
TypeInfo_DataModelTest map