ATLAS Offline Software
Loading...
Searching...
No Matches
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
15
16#include <EventLoop/Algorithm.h>
17
18class TBranch;
19class TH1;
20class TTree;
21
22namespace 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:
47
48
50 public:
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:
178
180 private:
182
183 private:
184 unsigned m_calls = 0;
185
186 private:
187 TH1 *m_callbacks = nullptr;
188
189 private:
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"
197#pragma GCC diagnostic pop
198 };
199}
200
201#endif
friend class Job
Definition Algorithm.h:292
Algorithm()
effects: standard default constructor guarantee: strong failures: low level errors I
virtual StatusCode initialize() override
effects: do everything that needs to be done before running the algorithm, e.g.
virtual StatusCode changeInput(bool firstFile) override
effects: do all changes to work with a new input file, e.g.
bool m_hasHistInitialize
whether histInitialize has been called
std::string m_fileName
the name of the file (for testing changeInput)
bool m_hasInitialize
whether initialize has been called
ClassDef(UnitTestAlg1, 1)
TH1 * getCallbacks()
TBranch * m_branch
description: the branch we are using
Int_t m_value
description: the value we are reading from the branch
TTree * m_tree
description: the histogram we are creating
virtual StatusCode finalize() override
effects: do everything that needs to be done after completing work on this worker guarantee: basic fa...
virtual StatusCode execute() override
effects: process the next event guarantee: basic failures: algorithm dependent rationale: the virtual...
void testInvariant() const
effects: test the invariant of this object guarantee: no-fail
virtual StatusCode histFinalize() override
effects: this is a post-initialization routine that is called after finalize has been called.
bool makeOutput
description: whether I create an output n-tuple
virtual StatusCode setupJob(Job &job) override
effects: give the algorithm a chance to intialize the job with anything this algorithm needs.
virtual StatusCode histInitialize() override
effects: this is a pre-initialization routine that is called before changeInput is called.
UnitTestAlg1(const std::string &branchName="el_n")
effects: standard constructor.
std::string m_name
description: the name of the variable we are using
virtual StatusCode fileExecute() override
effects: do all the processing that needs to be done once per file guarantee: basic failures: algorit...
CallBack
the various callbacks we use
This module defines the arguments passed from the BATCH driver to the BATCH worker.
::StatusCode StatusCode
StatusCode definition for legacy code.