ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
SGComps
src
SGCommitAuditor.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 "
SGCommitAuditor.h
"
6
7
#include "
AthenaBaseComps/AthCheckMacros.h
"
8
9
10
SGCommitAuditor::SGCommitAuditor
(
const
std::string& name,
11
ISvcLocator* pSvcLocator)
12
:Auditor(name,pSvcLocator),
13
p_sg
(
"StoreGateSvc"
, name)
14
{
15
16
}
17
18
SGCommitAuditor::~SGCommitAuditor
() {
19
}
20
21
22
StatusCode
23
SGCommitAuditor::initialize
() {
24
ATH_CHECK
(
p_sg
.retrieve() );
25
26
return
StatusCode::SUCCESS;
27
}
28
29
30
void
31
SGCommitAuditor::after
(
const
std::string& event,
const
std::string&
/*name*/
,
32
const
EventContext&,
const
StatusCode&) {
33
if
(event != Gaudi::IAuditor::Execute) {
34
return
;
35
}
36
p_sg
->commitNewDataObjects();
37
}
38
AthCheckMacros.h
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
SGCommitAuditor.h
SGCommitAuditor::initialize
virtual StatusCode initialize() override
Definition
SGCommitAuditor.cxx:23
SGCommitAuditor::after
virtual void after(const std::string &event, const std::string &name, const EventContext &, const StatusCode &) override
Definition
SGCommitAuditor.cxx:31
SGCommitAuditor::p_sg
ServiceHandle< IHiveStoreMgr > p_sg
Definition
SGCommitAuditor.h:38
SGCommitAuditor::~SGCommitAuditor
virtual ~SGCommitAuditor()
Definition
SGCommitAuditor.cxx:18
SGCommitAuditor::SGCommitAuditor
SGCommitAuditor(const std::string &name, ISvcLocator *pSvcLocator)
Definition
SGCommitAuditor.cxx:10
Generated on
for ATLAS Offline Software by
1.17.0