ATLAS Offline Software
Loading...
Searching...
No Matches
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
8
9
10SGCommitAuditor::SGCommitAuditor(const std::string& name,
11 ISvcLocator* pSvcLocator)
12 :Auditor(name,pSvcLocator),
13 p_sg("StoreGateSvc", name)
14{
15
16}
17
20
21
22StatusCode
24 ATH_CHECK( p_sg.retrieve() );
25
26 return StatusCode::SUCCESS;
27}
28
29
30void
31SGCommitAuditor::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
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual StatusCode initialize() override
virtual void after(const std::string &event, const std::string &name, const EventContext &, const StatusCode &) override
ServiceHandle< IHiveStoreMgr > p_sg
virtual ~SGCommitAuditor()
SGCommitAuditor(const std::string &name, ISvcLocator *pSvcLocator)