ATLAS Offline Software
HLTResultWriter.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
13 #include "HLTResultWriter.h"
28 
29 
36 HLT_END_TYPE_REGISTRATION(DataModelTest)
37 
38 
40 {
41  typedef TypeInfo_DataModelTest map;
42  static const std::string package_name;
43 };
44 
45 struct TypeInfo_EDM {
46  typedef HLT::TypeInformation::newlist
47  ::add<class_DataModelTest> ::go
48  ::done map;
49 };
50 
51 
53 
54 
55 namespace DMTest {
56 
57 
64  ISvcLocator *pSvcLocator)
65  : AthAlgorithm (name, pSvcLocator),
66  m_nav ("TestNav", this)
67 {
68  declareProperty ("ResultKey", m_resultKey = "HLTResult_HLT");
69  declareProperty ("Nav", m_nav);
70 }
71 
72 
77 {
78  ATH_CHECK( m_resultKey.initialize() );
79  ATH_CHECK( m_nav.retrieve() );
80  HLT::TypeMaps::registerFeatureContainer<DMTest::CVec,DMTest::CVec>();
81  HLT::TypeMaps::registerFeatureContainer<DMTest::CView,DMTest::CView>();
82  HLT::TypeMaps::registerFeatureContainer<DMTest::PVec,DMTest::PVec>();
83  HLT::TypeMaps::registerType<DMTest::CAuxContainer>();
84  HLT::TypeMaps::registerType<DMTest::PAuxContainer>();
85  HLT::TypeMaps::registerFeatureContainer<DMTest::HVec,DMTest::HVec>();
86  HLT::TypeMaps::registerFeatureContainer<DMTest::HView,DMTest::HView>();
87  HLT::TypeMaps::registerType<DMTest::HAuxContainer>();
88  return StatusCode::SUCCESS;
89 }
90 
91 
96 {
98  ATH_CHECK( result.record (std::make_unique<HLT::HLTResult>()) );
99 
100  m_nav->prepare();
101  if (!m_nav->serialize (result->getNavigationResult(),
102  result->getNavigationResultCuts(),
103  result->getNavigationResultIDName()))
104  return StatusCode::FAILURE;
105  m_nav->reset();
106 
107  return StatusCode::SUCCESS;
108 }
109 
110 
115 {
116  return StatusCode::SUCCESS;
117 }
118 
119 
120 } // namespace DMTest
121 
class_DataModelTest::package_name
static const std::string package_name
Definition: HLTResultReader.cxx:42
DMTest::CAuxContainer_v1
Definition: CAuxContainer_v1.h:27
DMTest::HLTResultWriter::execute
virtual StatusCode execute() override
Algorithm event processing.
Definition: HLTResultWriter.cxx:95
get_generator_info.result
result
Definition: get_generator_info.py:21
DMTest::P_v1
Class used for testing xAOD data reading/writing with packed containers.
Definition: P_v1.h:29
DMTest::HAuxContainer_v2
Definition: HAuxContainer_v2.h:28
PVec.h
Class used for testing xAOD data reading/writing with packed containers.
H.h
Test for xAOD schema evolution.
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
initialize
void initialize()
Definition: run_EoverP.cxx:894
TypeInfo_EDM::map
HLT::TypeInformation::newlist ::add< class_DataModelTest >::go ::done map
Definition: HLTResultWriter.cxx:48
Holder.icc
CAuxContainer.h
Class used for testing xAOD data reading/writing.
DMTest::ATLAS_NOT_THREAD_SAFE
void setPluginLibrary ATLAS_NOT_THREAD_SAFE(const std::string &name, const std::string &lib)
Definition: setConverterLibrary.cxx:23
DMTest::C_v1
Definition: C_v1.h:27
PAuxContainer.h
Class used for testing xAOD data reading/writing with packed containers.
HLTResult.h
P.h
Class used for testing xAOD data reading/writing with packed containers.
HLTResultWriter.h
Test for serializing an xAOD object into bytestream.
HVec.h
CVec.h
Class used for testing xAOD data reading/writing.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
C.h
Class used for testing xAOD data reading/writing.
ViewVector
Identify view containers to be made persistent.
Definition: ViewVector.h:67
class_DataModelTest::map
TypeInfo_DataModelTest map
Definition: HLTResultWriter.cxx:41
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Navigation.h
HLT_END_TYPE_REGISTRATION
#define HLT_END_TYPE_REGISTRATION(name)
Definition: EDM_TypeInformation.h:36
DMTest::PAuxContainer_v1
Class used for testing xAOD data reading/writing with packed containers.
Definition: PAuxContainer_v1.h:31
class_DataModelTest
Definition: HLTResultReader.cxx:40
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
AthAlgorithm
Definition: AthAlgorithm.h:47
CView.h
Class used for testing ViewVector reading/writing.
DMTest::HLTResultWriter::m_nav
ToolHandle< HLT::Navigation > m_nav
Navigation object use to fill the result.
Definition: HLTResultWriter.h:72
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
HView.h
HLTNavDetails::HolderImp
This is an implementation class for all Holders It is templated with 2 arguments STORED which is type...
Definition: Holder.h:281
DMTest::HLTResultWriter::finalize
virtual StatusCode finalize() override
Algorithm finalization; called at the end of the job.
Definition: HLTResultWriter.cxx:114
DMTest::HLTResultWriter::m_resultKey
SG::WriteHandleKey< HLT::HLTResult > m_resultKey
Handle to write the HLTResult object.
Definition: HLTResultWriter.h:69
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
HLT_REGISTER_TYPE
#define HLT_REGISTER_TYPE(...)
Definition: EDM_TypeInformation.h:34
TypeInfo_EDM
Definition: HLTResultReader.cxx:45
HLT_BEGIN_TYPE_REGISTRATION
#define HLT_BEGIN_TYPE_REGISTRATION
Definition: EDM_TypeInformation.h:13
DMTest::HLTResultWriter::HLTResultWriter
HLTResultWriter(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: HLTResultWriter.cxx:63
HAuxContainer.h
Test for xAOD schema evolution.
DMTest
Definition: B.h:23
DMTest::H_v2
Definition: H_v2.h:30