The Gaudi Framework  master (da3d77e1)
GAUDI-1185.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 <GaudiKernel/Algorithm.h>
12 
13 namespace GaudiTesting {
14  namespace JIRA {
15 
18  class GAUDI_1185 : public Algorithm {
19  public:
21 
22  StatusCode initialize() override {
24  if ( !sc ) return sc;
25 
26  auto level = msgLevel();
27  always() << "Initial msgLevel(): " << int( level ) << endmsg;
28  always() << "Current msgLevel(): " << int( msgLevel() ) << endmsg;
29 
30  return sc;
31  }
32  StatusCode execute() override { return StatusCode::SUCCESS; }
33  };
34 
35  DECLARE_COMPONENT( GAUDI_1185 )
36  } // namespace JIRA
37 } // namespace GaudiTesting
GaudiTesting
Definition: __init__.py:1
Gaudi::Algorithm::initialize
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
Definition: Algorithm.h:178
Algorithm
Alias for backward compatibility.
Definition: Algorithm.h:58
Algorithm.h
CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:148
StatusCode
Definition: StatusCode.h:65
GaudiTesting::JIRA::GAUDI_1185
Special service to expose GAUDI-1185.
Definition: GAUDI-1185.cpp:18
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
gaudirun.level
level
Definition: gaudirun.py:364
GaudiTesting::JIRA::GAUDI_1185::initialize
StatusCode initialize() override
Definition: GAUDI-1185.cpp:22
GaudiTesting::JIRA::GAUDI_1185::execute
StatusCode execute() override
Definition: GAUDI-1185.cpp:32
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginServiceV1.h:46
Gaudi::Algorithm::Algorithm
Algorithm(std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
Constructor.
Definition: Algorithm.h:101