ATLAS Offline Software
MergeViews.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 #include "MergeViews.h"
5 
6 MergeViews::MergeViews(const std::string& name, ISvcLocator* pSvcLocator)
7  : AthReentrantAlgorithm( name, pSvcLocator ) {}
8 
11  return StatusCode::SUCCESS;
12 }
13 
14 StatusCode MergeViews::execute( const EventContext& context ) const {
15  auto viewsHandle = SG::makeHandle( m_viewsKey, context );
16  const ViewContainer& viewsRef = *viewsHandle;
17 
18  for ( auto & tool : m_mergingTools ) {
19  CHECK( tool->merge( context, viewsRef ) );
20  }
21 
22  return StatusCode::SUCCESS;
23 }
MergeViews::m_mergingTools
ToolHandleArray< IViewsMergerTool > m_mergingTools
Definition: MergeViews.h:18
MergeViews::MergeViews
MergeViews(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MergeViews.cxx:6
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MergeViews::execute
StatusCode execute(const EventContext &context) const override
Definition: MergeViews.cxx:14
MergeViews.h
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
MergeViews::initialize
StatusCode initialize() override
Definition: MergeViews.cxx:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
MergeViews::m_viewsKey
SG::ReadHandleKey< ViewContainer > m_viewsKey
Definition: MergeViews.h:17
ViewContainer
Definition: View.h:158