The Gaudi Framework
master (37c0b60a)
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
12
#include <
Gaudi/TestSuite/Conditions/CondSvc.h
>
13
14
namespace
Gaudi::TestSuite::Conditions
{
15
16
StatusCode
CondSvc::initialize
() {
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
30
return
StatusCode::SUCCESS
;
31
}
32
}
// namespace Gaudi::TestSuite::Conditions
std::set::find
T find(T... args)
CondSvc.h
Gaudi::TestSuite::Conditions::CondSvc::m_dataNames
Gaudi::Property< std::vector< std::string > > m_dataNames
Definition:
CondSvc.h:69
ManySmallAlgs.alg
alg
Definition:
ManySmallAlgs.py:81
Service::name
const std::string & name() const override
Retrieve name of the service
Definition:
Service.cpp:332
StatusCode
Definition:
StatusCode.h:65
Gaudi::TestSuite::Conditions::CondSvc::m_condAlgs
std::set< IAlgorithm * > m_condAlgs
Definition:
CondSvc.h:65
Gaudi::TestSuite::Conditions
Definition:
ConditionAccessorHolder.h:21
Gaudi::TestSuite::Conditions::CondSvc::m_condData
DataObjIDColl m_condData
Definition:
CondSvc.h:68
Gaudi::TestSuite::Conditions::CondSvc::m_algNames
Gaudi::Property< std::vector< std::string > > m_algNames
Definition:
CondSvc.h:66
DataObjID
Definition:
DataObjID.h:47
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition:
StatusCode.h:100
Gaudi::TestSuite::Conditions::CondSvc::m_algResourcePool
SmartIF< IAlgResourcePool > m_algResourcePool
Definition:
CondSvc.h:71
std::set::insert
T insert(T... args)
Gaudi::TestSuite::Conditions::CondSvc::initialize
StatusCode initialize() override
Definition:
CondSvc.cpp:16
std::set::end
T end(T... args)
std::set< std::string >
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator
Definition:
Service.cpp:335
GaudiTestSuite
src
ConditionAccessor
CondSvc.cpp
Generated on Thu Dec 19 2024 15:35:06 for The Gaudi Framework by
1.8.18