The Gaudi Framework  master (37c0b60a)
ServiceB.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 "ServiceB.h"
12 
13 // Static Factory declaration
15 
16 StatusCode ServiceB::initialize() {
18  auto pService = service<IService>( "ServiceA", true );
19  return pService.isValid() ? StatusCode::SUCCESS : StatusCode::FAILURE;
20 }
Service::initialize
StatusCode initialize() override
Definition: Service.cpp:118
StatusCode
Definition: StatusCode.h:65
StatusCode::ignore
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
Definition: StatusCode.h:139
ServiceB
Definition: ServiceB.h:16
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginServiceV1.h:46
ServiceB.h
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101