ATLAS Offline Software
Loading...
Searching...
No Matches
VHKASupport.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8namespace VHKASupport {
9 namespace {
10 void insert ( const std::vector<SG::VarHandleKeyArray*>& src, std::vector<Gaudi::DataHandle*>& dest, Gaudi::DataHandle::Mode requiredMode ) {
11 for ( const SG::VarHandleKeyArray* vhka : src ) {
12 if ( not vhka->renounced() ) {
13 for ( SG::VarHandleKey* key: vhka->keys() ) {
14 if ( not ( key->mode() & requiredMode ) ) break;
15 dest.push_back( key );
16
17 }
18 }
19 }
20 }
21 }
22
23 void insertInput ( const std::vector<SG::VarHandleKeyArray*>& src, std::vector<Gaudi::DataHandle*>& dest ) {
24 insert( src, dest, Gaudi::DataHandle::Reader );
25 }
26
27 void insertOutput ( const std::vector<SG::VarHandleKeyArray*>& src, std::vector<Gaudi::DataHandle*>& dest ) {
28 insert( src, dest, Gaudi::DataHandle::Writer );
29 }
30}
functions in this namespace are to reduce a boiler plate code from the Ath* base classes
Definition VHKASupport.h:13
void insertInput(const std::vector< SG::VarHandleKeyArray * > &src, std::vector< Gaudi::DataHandle * > &dest)
Copies all VHKAs which are readers from the src to dest.
void insertOutput(const std::vector< SG::VarHandleKeyArray * > &src, std::vector< Gaudi::DataHandle * > &dest)