ATLAS Offline Software
Loading...
Searching...
No Matches
AnaReentrantAlgorithm.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8
9//
10// includes
11//
12
14
16#include <stdexcept>
17
18#ifdef XAOD_STANDALONE
20#endif
21
22//
23// method implementations
24//
25
26namespace EL
27{
28 AnaReentrantAlgorithm ::
29 AnaReentrantAlgorithm (const std::string& name,
30 [[maybe_unused]] ISvcLocator *pSvcLocator)
31#ifdef XAOD_STANDALONE
32 : AsgComponent (name)
33#else
34 : AthReentrantAlgorithm (name, pSvcLocator)
35#endif
36 {
37 ANA_MSG_DEBUG ("AnaReentrantAlgorithm: " << name);
38 }
39
40
41
42 AnaReentrantAlgorithm ::
43 ~AnaReentrantAlgorithm () noexcept
44 {}
45
46
47
48#ifdef XAOD_STANDALONE
49 bool AnaReentrantAlgorithm ::
50 filterPassed() const
51 {
52 return filterWorker()->filterPassed();
53 }
54
55
56
57 void AnaReentrantAlgorithm ::
58 setFilterPassed (bool val_filterPassed)
59 {
60 filterWorker()->setFilterPassed (val_filterPassed);
61 }
62
63
64
65 IFilterWorker *AnaReentrantAlgorithm ::
66 filterWorker () const
67 {
68 if (!m_filterWorker)
69 throw std::logic_error ("no filter worker set on algorithm " + name());
70 return m_filterWorker;
71 }
72
73
74
75 IWorker *AnaReentrantAlgorithm ::
76 wk () const
77 {
78 if (!m_wk)
79 throw std::logic_error ("no worker set on algorithm " + name());
80 return m_wk;
81 }
82#endif
83
84
85
86 ::StatusCode AnaReentrantAlgorithm ::
87 initialize ()
88 {
89 return StatusCode::SUCCESS;
90 }
91
92
93
94 ::StatusCode AnaReentrantAlgorithm ::
95 execute (const EventContext& /*ctx*/) const
96 {
97 return StatusCode::SUCCESS;
98 }
99
100
101
102 ::StatusCode AnaReentrantAlgorithm ::
103 finalize ()
104 {
105 return StatusCode::SUCCESS;
106 }
107
108
109
110#ifdef XAOD_STANDALONE
111 ::StatusCode AnaReentrantAlgorithm ::
112 sysInitialize ()
113 {
114 return initialize ();
115 }
116
117
118
119 ::StatusCode AnaReentrantAlgorithm ::
120 sysExecute (const EventContext& ctx)
121 {
122 return execute (ctx);
123 }
124
125
126
127 ::StatusCode AnaReentrantAlgorithm ::
128 sysFinalize ()
129 {
130 return finalize ();
131 }
132
133
134
135 asg::SgEvent *AnaReentrantAlgorithm ::
136 evtStore () const
137 {
138 if (!m_evtStore)
139 throw std::logic_error ("no evtStore set on algorithm " + name());
140 return m_evtStore;
141 }
142
143
144
145 void AnaReentrantAlgorithm ::
146 setEvtStore (asg::SgEvent *val_evtStore)
147 {
148 if (m_evtStore)
149 throw std::logic_error ("set evtStore twice on algorithm " + name());
150 m_evtStore = val_evtStore;
151 }
152
153
154
155 void AnaReentrantAlgorithm ::
156 setFilterWorker (IFilterWorker *val_filterWorker)
157 {
158 if (m_filterWorker)
159 throw std::logic_error ("set filter worker twice on algorithm " + name());
160 m_filterWorker = val_filterWorker;
161 }
162
163
164
165 void AnaReentrantAlgorithm ::
166 setWk (IWorker *val_wk)
167 {
168 if (m_wk)
169 throw std::logic_error ("set wk twice on algorithm " + name());
170 m_wk = val_wk;
171 }
172#endif
173}
macros for messaging and checking status codes
#define ANA_MSG_DEBUG(xmsg)
Macro printing debug messages.
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:
An algorithm that can be simultaneously executed in multiple threads.
the interface to the filter functions in the algorithm sequence
Wrapper for Event to make it look like StoreGate.
Definition SgEvent.h:44
This module defines the arguments passed from the BATCH driver to the BATCH worker.
::StatusCode StatusCode
StatusCode definition for legacy code.
finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition PyTestsLib.py:50
void initialize()