ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDTools
EventLoopTest
EventLoopTest
UnitTestAlg2.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
#ifndef EVENT_LOOP_UNIT_TEST_ALG2_H
8
#define EVENT_LOOP_UNIT_TEST_ALG2_H
9
11
12
13
14
#include <
EventLoopTest/Global.h
>
15
16
#include <
AnaAlgorithm/AnaAlgorithm.h
>
17
#include <
AsgTools/IAsgTool.h
>
18
#include <
EventLoopTest/IUnitTestTool.h
>
19
20
class
TBranch;
21
class
TH1;
22
class
TTree;
23
24
namespace
EL
25
{
26
class
UnitTestAlg2
final :
public
AnaAlgorithm
27
{
28
//
29
// public interface
30
//
31
34
public
:
35
void
testInvariant
()
const
;
36
37
42
public
:
43
UnitTestAlg2
(
const
std::string& name,
44
ISvcLocator* pSvcLocator);
45
46
48
public
:
49
bool
makeOutput
;
50
51
53
public
:
54
enum
CallBack
55
{
56
CB_INITIALIZE
,
57
CB_EXECUTE
,
58
CB_FINALIZE
59
};
60
61
62
63
//
64
// interface inherited from Algorithm
65
//
66
67
private
:
68
virtual ::StatusCode
initialize
()
override
;
69
70
private
:
71
virtual ::StatusCode
execute
()
override
;
72
73
private
:
74
virtual ::StatusCode
finalize
()
override
;
75
76
77
78
//
79
// private interface
80
//
81
83
public
:
84
float
m_property
= 0;
85
87
public
:
88
std::string
m_string_property
;
89
91
public
:
92
ToolHandle<IUnitTestTool>
m_toolHandle
;
93
95
private
:
96
std::string
m_name
;
97
99
private
:
100
TBranch *
m_branch
=
nullptr
;
101
103
private
:
104
Int_t
m_value
;
105
107
private
:
108
// TH1 *m_hist;
109
111
private
:
112
TTree *
m_tree
;
113
115
private
:
116
std::string
m_fileName
;
117
119
private
:
120
bool
m_hasInitialize
;
121
122
private
:
123
unsigned
m_calls
= 0;
124
125
private
:
126
TH1 *
m_callbacks
=
nullptr
;
127
128
private
:
129
TH1 *
getCallbacks
();
130
};
131
}
132
133
#endif
AnaAlgorithm.h
Global.h
IAsgTool.h
IUnitTestTool.h
EL::AnaAlgorithm::AnaAlgorithm
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Definition
AnaAlgorithm.cxx:40
EL::UnitTestAlg2::m_calls
unsigned m_calls
Definition
UnitTestAlg2.h:123
EL::UnitTestAlg2::m_toolHandle
ToolHandle< IUnitTestTool > m_toolHandle
the tool handle property our owner sets
Definition
UnitTestAlg2.h:92
EL::UnitTestAlg2::m_branch
TBranch * m_branch
description: the branch we are using
Definition
UnitTestAlg2.h:100
EL::UnitTestAlg2::finalize
virtual::StatusCode finalize() override
EL::UnitTestAlg2::testInvariant
void testInvariant() const
effects: test the invariant of this object guarantee: no-fail
EL::UnitTestAlg2::m_property
float m_property
the float property our owner sets
Definition
UnitTestAlg2.h:84
EL::UnitTestAlg2::m_name
std::string m_name
description: the name of the variable we are using
Definition
UnitTestAlg2.h:96
EL::UnitTestAlg2::m_string_property
std::string m_string_property
the string property our owner sets
Definition
UnitTestAlg2.h:88
EL::UnitTestAlg2::m_value
Int_t m_value
description: the value we are reading from the branch
Definition
UnitTestAlg2.h:104
EL::UnitTestAlg2::getCallbacks
TH1 * getCallbacks()
EL::UnitTestAlg2::CallBack
CallBack
the various callbacks we use
Definition
UnitTestAlg2.h:55
EL::UnitTestAlg2::CB_INITIALIZE
@ CB_INITIALIZE
Definition
UnitTestAlg2.h:56
EL::UnitTestAlg2::CB_EXECUTE
@ CB_EXECUTE
Definition
UnitTestAlg2.h:57
EL::UnitTestAlg2::CB_FINALIZE
@ CB_FINALIZE
Definition
UnitTestAlg2.h:58
EL::UnitTestAlg2::initialize
virtual::StatusCode initialize() override
EL::UnitTestAlg2::UnitTestAlg2
UnitTestAlg2(const std::string &name, ISvcLocator *pSvcLocator)
effects: standard constructor.
EL::UnitTestAlg2::m_tree
TTree * m_tree
description: the histogram we are creating
Definition
UnitTestAlg2.h:112
EL::UnitTestAlg2::execute
virtual::StatusCode execute() override
EL::UnitTestAlg2::m_callbacks
TH1 * m_callbacks
Definition
UnitTestAlg2.h:126
EL::UnitTestAlg2::m_fileName
std::string m_fileName
the name of the file (for testing changeInput)
Definition
UnitTestAlg2.h:116
EL::UnitTestAlg2::makeOutput
bool makeOutput
description: whether I create an output n-tuple
Definition
UnitTestAlg2.h:49
EL::UnitTestAlg2::m_hasInitialize
bool m_hasInitialize
whether initialize has been called
Definition
UnitTestAlg2.h:120
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition
AsgComponentFactories.h:16
Generated on
for ATLAS Offline Software by
1.17.0