The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
CondSvc.cpp
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2020 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\***********************************************************************************/
11
13
15
17
18 // Convert alg names vector to a set for easier search
19 std::set<std::string> algNameSet( m_algNames.begin(), m_algNames.end() );
20
21 // Get conditions alg pointers
22 m_algResourcePool = serviceLocator()->service( "AlgResourcePool" );
23 for ( auto& alg : m_algResourcePool->getFlatAlgList() ) {
24 if ( algNameSet.find( alg->name() ) != algNameSet.end() ) { m_condAlgs.insert( alg ); }
25 }
26
27 // Get conditions data ids
28 for ( auto& name : m_dataNames ) { m_condData.insert( DataObjID( name ) ); }
29
31 }
32} // namespace Gaudi::TestSuite::Conditions
StatusCode initialize() override
Definition CondSvc.cpp:16
SmartIF< IAlgResourcePool > m_algResourcePool
Definition CondSvc.h:71
std::set< IAlgorithm * > m_condAlgs
Definition CondSvc.h:65
Gaudi::Property< std::vector< std::string > > m_algNames
Definition CondSvc.h:66
Gaudi::Property< std::vector< std::string > > m_dataNames
Definition CondSvc.h:69
virtual SmartIF< IService > & service(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0
Returns a smart pointer to a service.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition Service.cpp:336
const std::string & name() const override
Retrieve name of the service.
Definition Service.cpp:333
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
constexpr static const auto SUCCESS
Definition StatusCode.h:99