ATLAS Offline Software
Loading...
Searching...
No Matches
UnitTestAlg5.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5//
6// includes
7//
8
10
11//
12// method implementations
13//
14
15namespace EL
16{
17 UnitTestAlg5 ::
18 UnitTestAlg5 (const std::string& name, ISvcLocator* pSvcLocator)
19 : AnaAlgorithm (name, pSvcLocator)
20 {
21 declareProperty ("property", m_property, "test property");
22 declareProperty ("string_property", m_string_property, "test string property");
23 declareProperty ("toolHandle", m_toolHandle, "ToolHandle property");
24 }
25
26
27
28 ::StatusCode UnitTestAlg5 ::
29 initialize ()
30 {
32 {
33 ANA_MSG_FATAL ("initialized twice");
34 return StatusCode::FAILURE;
35 }
36
37 if (!m_toolHandle.empty())
38 ANA_CHECK (m_toolHandle.retrieve());
39
40 m_wasInitialized = true;
41 return ::StatusCode::SUCCESS;
42 }
43
44
45
46 ::StatusCode UnitTestAlg5 ::
47 execute ()
48 {
50 {
51 ANA_MSG_FATAL ("never initialized");
52 return StatusCode::FAILURE;
53 }
54 return ::StatusCode::SUCCESS;
55 }
56
57
58
59 ::StatusCode UnitTestAlg5 ::
60 finalize ()
61 {
63 {
64 ANA_MSG_FATAL ("never initialized");
65 return StatusCode::FAILURE;
66 }
67 return ::StatusCode::SUCCESS;
68 }
69}
#define ANA_CHECK(EXP)
check whether the given expression was successful
#define ANA_MSG_FATAL(xmsg)
Macro printing fatal messages.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
float m_property
the float property our owner sets
bool m_wasInitialized
whether initialize has been called
ToolHandle< IUnitTestTool > m_toolHandle
the tool handle property our owner sets
std::string m_string_property
the string property our owner sets
This module defines the arguments passed from the BATCH driver to the BATCH worker.
::StatusCode StatusCode
StatusCode definition for legacy code.