ATLAS Offline Software
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  */
14 #include "ConditionsCleanerSvc.h"
15 
16 
17 namespace 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 
55 ConditionsCleanerSvc::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 
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
Athena::ConditionsCleanerSvc::condObjAdded
virtual StatusCode condObjAdded(const EventContext &ctx, CondContBase &cc) override
Called after a conditions object has been added.
Definition: ConditionsCleanerSvc.cxx:70
Athena::ConditionsCleanerSvc::ConditionsCleanerSvc
ConditionsCleanerSvc(const std::string &name, ISvcLocator *svc)
Standard Gaudi constructor.
Definition: ConditionsCleanerSvc.cxx:25
Athena::ConditionsCleanerSvc::reset
virtual StatusCode reset() override
Clear the internal state of the service.
Definition: ConditionsCleanerSvc.cxx:98
Athena::ConditionsCleanerSvc::event
virtual StatusCode event(const EventContext &ctx, bool allowAsync) override
Called at the start of each event.
Definition: ConditionsCleanerSvc.cxx:55
Athena::ConditionsCleanerSvc::m_cleanerSvc
ServiceHandle< Athena::IConditionsCleanerSvc > m_cleanerSvc
Definition: ConditionsCleanerSvc.h:88
Athena
Some weak symbol referencing magic...
Definition: AthLegacySequence.h:21
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CondContBase
Base class for all conditions containers.
Definition: CondCont.h:140
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Athena::ConditionsCleanerSvc::printStats
virtual StatusCode printStats() const override
Print some statistics about the garbage collection.
Definition: ConditionsCleanerSvc.cxx:85
ConditionsCleanerSvc.h
Facade class for conditions garbage collection.
Athena::ConditionsCleanerSvc::initialize
virtual StatusCode initialize() override
Standard Gaudi initialize method.
Definition: ConditionsCleanerSvc.cxx:39
python.handimod.cc
int cc
Definition: handimod.py:523