ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDTools
EventLoopTest
EventLoopTest
UnitTestAlg1.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_ALG1_H
8
#define EVENT_LOOP_UNIT_TEST_ALG1_H
9
11
12
13
14
#include <
EventLoopTest/Global.h
>
15
16
#include <
EventLoop/Algorithm.h
>
17
18
class
TBranch;
19
class
TH1;
20
class
TTree;
21
22
namespace
EL
23
{
24
class
UnitTestAlg1
:
public
Algorithm
25
{
26
//
27
// public interface
28
//
29
32
public
:
33
void
testInvariant
()
const
;
34
35
40
public
:
41
UnitTestAlg1
(
const
std::string& branchName =
"el_n"
);
42
43
45
public
:
46
bool
makeOutput
;
47
48
50
public
:
51
enum
CallBack
52
{
53
CB_CHANGE_INPUT_FIRST
,
54
CB_CHANGE_INPUT_OTHER
,
55
CB_INITIALIZE
,
56
CB_HIST_INITIALIZE
,
57
CB_EXECUTE
,
58
CB_FILE_EXECUTE
,
59
CB_FINALIZE
,
60
CB_HIST_FINALIZE
61
};
62
63
64
65
//
66
// interface inherited from Algorithm
67
//
68
77
private
:
78
virtual
StatusCode
setupJob
(
Job
& job)
override
;
79
80
86
private
:
87
virtual
StatusCode
changeInput
(
bool
firstFile)
override
;
88
89
100
private
:
101
virtual
StatusCode
initialize
()
override
;
102
103
private
:
104
virtual
StatusCode
histInitialize
()
override
;
105
106
111
private
:
112
virtual
StatusCode
execute
()
override
;
113
114
121
private
:
122
virtual
StatusCode
fileExecute
()
override
;
123
124
132
private
:
133
virtual
StatusCode
finalize
()
override
;
134
135
142
private
:
143
virtual
StatusCode
histFinalize
()
override
;
144
145
146
147
//
148
// private interface
149
//
150
152
private
:
153
std::string
m_name
;
154
156
private
:
157
TBranch *
m_branch
;
158
160
private
:
161
Int_t
m_value
;
162
164
private
:
165
// TH1 *m_hist; //!
166
168
private
:
169
TTree *
m_tree
;
170
172
private
:
173
std::string
m_fileName
;
174
176
private
:
177
bool
m_hasInitialize
;
178
180
private
:
181
bool
m_hasHistInitialize
;
182
183
private
:
184
unsigned
m_calls
= 0;
185
186
private
:
187
TH1 *
m_callbacks
=
nullptr
;
188
189
private
:
190
TH1 *
getCallbacks
();
191
192
#pragma GCC diagnostic push
193
#pragma GCC diagnostic ignored "-Wpragmas"
194
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
195
#pragma GCC diagnostic ignored "-Winconsistent-missing-override"
196
ClassDef
(
UnitTestAlg1
, 1);
197
#pragma GCC diagnostic pop
198
};
199
}
200
201
#endif
Algorithm.h
Global.h
EL::Algorithm::Job
friend class Job
Definition
Algorithm.h:292
EL::Algorithm::Algorithm
Algorithm()
effects: standard default constructor guarantee: strong failures: low level errors I
EL::UnitTestAlg1::initialize
virtual StatusCode initialize() override
effects: do everything that needs to be done before running the algorithm, e.g.
EL::UnitTestAlg1::changeInput
virtual StatusCode changeInput(bool firstFile) override
effects: do all changes to work with a new input file, e.g.
EL::UnitTestAlg1::m_hasHistInitialize
bool m_hasHistInitialize
whether histInitialize has been called
Definition
UnitTestAlg1.h:181
EL::UnitTestAlg1::m_fileName
std::string m_fileName
the name of the file (for testing changeInput)
Definition
UnitTestAlg1.h:173
EL::UnitTestAlg1::m_hasInitialize
bool m_hasInitialize
whether initialize has been called
Definition
UnitTestAlg1.h:177
EL::UnitTestAlg1::ClassDef
ClassDef(UnitTestAlg1, 1)
EL::UnitTestAlg1::getCallbacks
TH1 * getCallbacks()
EL::UnitTestAlg1::m_calls
unsigned m_calls
Definition
UnitTestAlg1.h:184
EL::UnitTestAlg1::m_branch
TBranch * m_branch
description: the branch we are using
Definition
UnitTestAlg1.h:157
EL::UnitTestAlg1::m_value
Int_t m_value
description: the value we are reading from the branch
Definition
UnitTestAlg1.h:161
EL::UnitTestAlg1::m_tree
TTree * m_tree
description: the histogram we are creating
Definition
UnitTestAlg1.h:169
EL::UnitTestAlg1::finalize
virtual StatusCode finalize() override
effects: do everything that needs to be done after completing work on this worker guarantee: basic fa...
EL::UnitTestAlg1::execute
virtual StatusCode execute() override
effects: process the next event guarantee: basic failures: algorithm dependent rationale: the virtual...
EL::UnitTestAlg1::testInvariant
void testInvariant() const
effects: test the invariant of this object guarantee: no-fail
EL::UnitTestAlg1::histFinalize
virtual StatusCode histFinalize() override
effects: this is a post-initialization routine that is called after finalize has been called.
EL::UnitTestAlg1::makeOutput
bool makeOutput
description: whether I create an output n-tuple
Definition
UnitTestAlg1.h:46
EL::UnitTestAlg1::setupJob
virtual StatusCode setupJob(Job &job) override
effects: give the algorithm a chance to intialize the job with anything this algorithm needs.
EL::UnitTestAlg1::histInitialize
virtual StatusCode histInitialize() override
effects: this is a pre-initialization routine that is called before changeInput is called.
EL::UnitTestAlg1::UnitTestAlg1
UnitTestAlg1(const std::string &branchName="el_n")
effects: standard constructor.
EL::UnitTestAlg1::m_name
std::string m_name
description: the name of the variable we are using
Definition
UnitTestAlg1.h:153
EL::UnitTestAlg1::fileExecute
virtual StatusCode fileExecute() override
effects: do all the processing that needs to be done once per file guarantee: basic failures: algorit...
EL::UnitTestAlg1::CallBack
CallBack
the various callbacks we use
Definition
UnitTestAlg1.h:52
EL::UnitTestAlg1::CB_FINALIZE
@ CB_FINALIZE
Definition
UnitTestAlg1.h:59
EL::UnitTestAlg1::CB_INITIALIZE
@ CB_INITIALIZE
Definition
UnitTestAlg1.h:55
EL::UnitTestAlg1::CB_CHANGE_INPUT_FIRST
@ CB_CHANGE_INPUT_FIRST
Definition
UnitTestAlg1.h:53
EL::UnitTestAlg1::CB_HIST_INITIALIZE
@ CB_HIST_INITIALIZE
Definition
UnitTestAlg1.h:56
EL::UnitTestAlg1::CB_EXECUTE
@ CB_EXECUTE
Definition
UnitTestAlg1.h:57
EL::UnitTestAlg1::CB_CHANGE_INPUT_OTHER
@ CB_CHANGE_INPUT_OTHER
Definition
UnitTestAlg1.h:54
EL::UnitTestAlg1::CB_HIST_FINALIZE
@ CB_HIST_FINALIZE
Definition
UnitTestAlg1.h:60
EL::UnitTestAlg1::CB_FILE_EXECUTE
@ CB_FILE_EXECUTE
Definition
UnitTestAlg1.h:58
EL::UnitTestAlg1::m_callbacks
TH1 * m_callbacks
Definition
UnitTestAlg1.h:187
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition
AsgComponentFactories.h:16
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Generated on
for ATLAS Offline Software by
1.17.0