Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v36r16 (ea80daf8)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
TestToolAlgFailure.cpp
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 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 files
12 
13 // from Gaudi
14 #include "GaudiKernel/MsgStream.h"
15 
16 // local
17 #include "TestToolAlgFailure.h"
18 
19 //-----------------------------------------------------------------------------
20 // Implementation file for class : RichToolTest
21 //
22 // 2004-03-08 : Chris Jones
23 //-----------------------------------------------------------------------------
24 
25 // Declaration of the Algorithm Factory
27 
28 //=============================================================================
29 // Initialisation. Check parameters
30 //=============================================================================
32 
33  debug() << "Initialize" << endmsg;
34 
36 
37  // setup tool registry
38  // IAlgTool * mytool;
39  for ( const auto& i : m_tools ) {
40  info() << "Loading tool " << i << endmsg;
41  try {
42  /* mytool = */ tool<IAlgTool>( i );
43  info() << "Tool loaded successfully" << endmsg;
44  } catch ( GaudiException& e ) {
45  if ( m_ignoreFailure ) {
46  warning() << "Got exception '" << e.what() << "'" << endmsg;
47  } else {
48  error() << "Got exception '" << e.what() << "'" << endmsg;
49  if ( m_throwException ) { throw; }
50  return StatusCode::FAILURE;
51  }
52  }
53  }
54 
55  return StatusCode::SUCCESS;
56 }
57 
58 //=============================================================================
59 // Main execution
60 //=============================================================================
62 
63  info() << "Execute" << endmsg;
64 
65  return StatusCode::SUCCESS;
66 }
67 
68 //=============================================================================
69 // Finalize
70 //=============================================================================
72 
73  info() << "Finalize" << endmsg;
74 
75  return GaudiAlgorithm::finalize();
76 }
77 
78 //=============================================================================
TestToolAlgFailure::finalize
StatusCode finalize() override
Definition: TestToolAlgFailure.cpp:71
GaudiAlgorithm::finalize
StatusCode finalize() override
standard finalization method
Definition: GaudiAlgorithm.cpp:65
GaudiException
Definition: GaudiException.h:31
StatusCode
Definition: StatusCode.h:65
TestToolAlgFailure
Definition: TestToolAlgFailure.h:28
GaudiAlgorithm::initialize
StatusCode initialize() override
standard initialization method
Definition: GaudiAlgorithm.cpp:52
TestToolAlgFailure::execute
StatusCode execute() override
standard execution method
Definition: TestToolAlgFailure.cpp:61
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:203
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginServiceV1.h:46
TestToolAlgFailure.h
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
GaudiException::what
const char * what() const override
method from std::exception
Definition: GaudiException.h:110
MsgStream.h