ATLAS Offline Software
Loading...
Searching...
No Matches
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
6MergeViews::MergeViews(const std::string& name, ISvcLocator* pSvcLocator)
7 : AthReentrantAlgorithm( name, pSvcLocator ) {}
8
10 CHECK( m_viewsKey.initialize() );
11 return StatusCode::SUCCESS;
12}
13
14StatusCode 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}
#define CHECK(...)
Evaluate an expression and check for errors.
DataVector< SG::View > ViewContainer
View container for recording in StoreGate.
Definition View.h:290
An algorithm that can be simultaneously executed in multiple threads.
StatusCode initialize() override
Definition MergeViews.cxx:9
SG::ReadHandleKey< ViewContainer > m_viewsKey
Definition MergeViews.h:17
StatusCode execute(const EventContext &context) const override
ToolHandleArray< IViewsMergerTool > m_mergingTools
Definition MergeViews.h:18
MergeViews(const std::string &name, ISvcLocator *pSvcLocator)
Definition MergeViews.cxx:6
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())