ATLAS Offline Software
HLTResultWriter.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
13 #include "HLTResultWriter.h"
25 
26 
32 HLT_END_TYPE_REGISTRATION(DataModelTest)
33 
34 
36 {
37  typedef TypeInfo_DataModelTest map;
38  static const std::string package_name;
39 };
40 
41 struct TypeInfo_EDM {
42  typedef HLT::TypeInformation::newlist
43  ::add<class_DataModelTest> ::go
44  ::done map;
45 };
46 
47 
49 
50 
51 namespace DMTest {
52 
53 
60  ISvcLocator *pSvcLocator)
61  : AthAlgorithm (name, pSvcLocator),
62  m_nav ("TestNav", this)
63 {
64  declareProperty ("ResultKey", m_resultKey = "HLTResult_HLT");
65  declareProperty ("Nav", m_nav);
66 }
67 
68 
73 {
74  ATH_CHECK( m_resultKey.initialize() );
75  ATH_CHECK( m_nav.retrieve() );
76  HLT::TypeMaps::registerFeatureContainer<DMTest::CVec,DMTest::CVec>();
77  HLT::TypeMaps::registerFeatureContainer<DMTest::CView,DMTest::CView>();
78  HLT::TypeMaps::registerType<DMTest::CAuxContainer>();
79  HLT::TypeMaps::registerFeatureContainer<DMTest::HVec,DMTest::HVec>();
80  HLT::TypeMaps::registerFeatureContainer<DMTest::HView,DMTest::HView>();
81  HLT::TypeMaps::registerType<DMTest::HAuxContainer>();
82  return StatusCode::SUCCESS;
83 }
84 
85 
90 {
92  ATH_CHECK( result.record (std::make_unique<HLT::HLTResult>()) );
93 
94  m_nav->prepare();
95  if (!m_nav->serialize (result->getNavigationResult(),
96  result->getNavigationResultCuts(),
97  result->getNavigationResultIDName()))
98  return StatusCode::FAILURE;
99  m_nav->reset();
100 
101  return StatusCode::SUCCESS;
102 }
103 
104 
109 {
110  return StatusCode::SUCCESS;
111 }
112 
113 
114 } // namespace DMTest
115 
class_DataModelTest::package_name
static const std::string package_name
Definition: HLTResultReader.cxx:39
DMTest::CAuxContainer_v1
Definition: CAuxContainer_v1.h:28
DMTest::HLTResultWriter::execute
virtual StatusCode execute() override
Algorithm event processing.
Definition: HLTResultWriter.cxx:89
get_generator_info.result
result
Definition: get_generator_info.py:21
DMTest::HAuxContainer_v2
Definition: HAuxContainer_v2.h:28
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:44
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:29
HLTResult.h
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:37
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
class_DataModelTest
Definition: HLTResultReader.cxx:37
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
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:195
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:108
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:42
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:59
HAuxContainer.h
Test for xAOD schema evolution.
DMTest
Definition: B.h:23
DMTest::H_v2
Definition: H_v2.h:30