ATLAS Offline Software
Loading...
Searching...
No Matches
ConditionsCleanerSvc.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4/*
5 */
12
13
15
16
17namespace Athena {
18
19
26 ISvcLocator* svc)
27 : base_class (name, svc),
28 m_cleanerSvc ("", name)
29{
30 declareProperty ("CleanerSvc", m_cleanerSvc,
31 "Service implementing conditions garbage collection. "
32 "If blank, no garbage collection will be done.");
33}
34
35
40{
41 if (!m_cleanerSvc.empty()) {
42 ATH_CHECK( m_cleanerSvc.retrieve() );
43 }
44 return StatusCode::SUCCESS;
45}
46
47
54StatusCode
55ConditionsCleanerSvc::event (const EventContext& ctx,
56 bool allowAsync)
57{
58 if (!m_cleanerSvc.empty()) {
59 return m_cleanerSvc->event (ctx, allowAsync);
60 }
61 return StatusCode::SUCCESS;
62}
63
64
70StatusCode ConditionsCleanerSvc::condObjAdded (const EventContext& ctx,
71 CondContBase& cc)
72{
73 if (!m_cleanerSvc.empty()) {
74 return m_cleanerSvc->condObjAdded (ctx, cc);
75 }
76 return StatusCode::SUCCESS;
77}
78
79
86{
87 if (!m_cleanerSvc.empty()) {
88 return m_cleanerSvc->printStats();
89 }
90 return StatusCode::SUCCESS;
91}
92
93
99{
100 if (!m_cleanerSvc.empty()) {
101 return m_cleanerSvc->reset();
102 }
103 return StatusCode::SUCCESS;
104}
105
106
107} // namespace Athena
#define ATH_CHECK
Evaluate an expression and check for errors.
Facade class for conditions garbage collection.
virtual StatusCode condObjAdded(const EventContext &ctx, CondContBase &cc) override
Called after a conditions object has been added.
virtual StatusCode event(const EventContext &ctx, bool allowAsync) override
Called at the start of each event.
virtual StatusCode printStats() const override
Print some statistics about the garbage collection.
ServiceHandle< Athena::IConditionsCleanerSvc > m_cleanerSvc
virtual StatusCode initialize() override
Standard Gaudi initialize method.
virtual StatusCode reset() override
Clear the internal state of the service.
ConditionsCleanerSvc(const std::string &name, ISvcLocator *svc)
Standard Gaudi constructor.
Base class for all conditions containers.
Definition CondCont.h:140
Some weak symbol referencing magic... These are declared in AthenaKernel/getMessageSvc....