The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
AlgContext.cpp
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
14
20
21namespace {
22 // This dummy context is needed for the AlgContect constructor for single thread cases (initialize, finalize, etc.).
23 static const EventContext s_dummyDefaultCtx;
24} // namespace
25
27 : m_svc( svc ), m_alg( alg ), m_context( context ) {
28 if ( m_svc && m_alg ) { m_svc->setCurrentAlg( m_alg.get(), m_context ).ignore(); }
29}
30
32 : AlgContext( alg, svc, s_dummyDefaultCtx ) {}
33
35 if ( m_svc && m_alg ) { m_svc->unSetCurrentAlg( m_alg.get(), m_context ).ignore(); }
36}
This class represents an entry point to all the event specific data.
AlgContext(IAlgorithm *alg, IAlgContextSvc *svc, const EventContext &context)
constructor from the service and the algorithm Internally invokes IAlgContextSvc::setCurrentAlg
const EventContext & m_context
SmartIF< IAlgorithm > m_alg
~AlgContext()
destructor Internally invokes IAlgContextSvc::unSetCurrentAlg
SmartIF< IAlgContextSvc > m_svc
An abstract interface for Algorithm Context Service.
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition IAlgorithm.h:36