The Gaudi Framework
master (5c735ca6)
Toggle main menu visibility
Loading...
Searching...
No Matches
ServiceA.cpp
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2024 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
#include "
ServiceA.h
"
12
13
// Static Factory declaration
14
DECLARE_COMPONENT
(
ServiceA
)
15
16
StatusCode
ServiceA
::
initialize
() {
17
Service::initialize
().
ignore
();
18
auto
pService =
service<IService>
(
"ServiceB"
,
true
);
19
return
pService.isValid() ?
StatusCode::SUCCESS
:
StatusCode::FAILURE
;
20
}
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition
PluginServiceV1.h:45
ServiceA.h
Service::service
SmartIF< IFace > service(const std::string &name, bool createIf=true) const
Definition
Service.h:79
Service::initialize
StatusCode initialize() override
Definition
Service.cpp:118
StatusCode
This class is used for returning status codes from appropriate routines.
Definition
StatusCode.h:64
StatusCode::ignore
void ignore() const
Allow discarding a StatusCode without warning.
Definition
StatusCode.h:128
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition
StatusCode.h:99
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition
StatusCode.h:100
ServiceA
Definition
ServiceA.h:15
ServiceA::initialize
StatusCode initialize() override
Definition
ServiceA.cpp:16
GaudiTestSuite
src
SvcInitLoop
ServiceA.cpp
Generated on
for The Gaudi Framework by
1.17.0