The Gaudi Framework
master (37c0b60a)
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
}
Service::initialize
StatusCode initialize() override
Definition:
Service.cpp:118
StatusCode
Definition:
StatusCode.h:65
ServiceA.h
StatusCode::ignore
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
Definition:
StatusCode.h:139
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition:
StatusCode.h:100
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition:
PluginServiceV1.h:46
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition:
StatusCode.h:101
ServiceA
Definition:
ServiceA.h:16
GaudiTestSuite
src
SvcInitLoop
ServiceA.cpp
Generated on Thu Dec 19 2024 15:35:07 for The Gaudi Framework by
1.8.18