ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
DataModelTest
DataModelTestDataCommon
src
MetaWriterAlg.cxx
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
3
*/
4
// $Id$
11
12
13
#include "
MetaWriterAlg.h
"
14
#include "
DataModelTestDataCommon/S1.h
"
15
#include "
DataModelTestDataCommon/C.h
"
16
#include "
DataModelTestDataCommon/CInfoAuxContainer.h
"
17
18
19
namespace
DMTest
{
20
21
27
MetaWriterAlg::MetaWriterAlg
(
const
std::string &name, ISvcLocator *pSvcLocator)
28
:
AthAlgorithm
(name, pSvcLocator),
29
m_metaStore
(
"StoreGateSvc/MetaDataStore"
, name)
30
{
31
declareProperty
(
"MetaDataStore"
,
m_metaStore
);
32
}
33
34
38
StatusCode
MetaWriterAlg::initialize
()
39
{
40
ATH_CHECK
(
m_metaStore
.retrieve() );
41
ATH_CHECK
(
m_metaStore
->record (std::make_unique<DMTest::S1>(24),
"MetaS1"
) );
42
43
auto
c = std::make_unique<DMTest::C>();
44
auto
cstore = std::make_unique<DMTest::CInfoAuxContainer>();
45
c->setStore (cstore.get());
46
c->setAFloat (2.5);
47
c->setAnInt (3);
48
ATH_CHECK
(
m_metaStore
->record (std::move(cstore),
"MetaCAux."
) );
49
ATH_CHECK
(
m_metaStore
->record (std::move(c),
"MetaC"
) );
50
51
return
StatusCode::SUCCESS;
52
}
53
54
58
StatusCode
MetaWriterAlg::execute
(
const
EventContext&
/*ctx*/
)
59
{
60
return
StatusCode::SUCCESS;
61
}
62
63
64
}
// namespace DMTest
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
CInfoAuxContainer.h
Class used for testing xAOD data reading/writing.
C.h
Class used for testing xAOD data reading/writing.
MetaWriterAlg.h
S1.h
For symlink tests.
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
AthCommonAlgorithm< Gaudi::Algorithm >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
DMTest::MetaWriterAlg::execute
virtual StatusCode execute(const EventContext &ctx) override
Algorithm execute method.
Definition
MetaWriterAlg.cxx:58
DMTest::MetaWriterAlg::m_metaStore
ServiceHandle< StoreGateSvc > m_metaStore
Definition
MetaWriterAlg.h:50
DMTest::MetaWriterAlg::initialize
virtual StatusCode initialize() override
Algorithm initialization; called at the beginning of the job.
Definition
MetaWriterAlg.cxx:38
DMTest::MetaWriterAlg::MetaWriterAlg
MetaWriterAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
MetaWriterAlg.cxx:27
DMTest
Definition
B.h:23
Generated on
for ATLAS Offline Software by
1.17.0