ATLAS Offline Software
Loading...
Searching...
No Matches
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
15
17#include <AsgTools/IAsgTool.h>
19
20class TBranch;
21class TH1;
22class TTree;
23
24namespace 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:
50
51
53 public:
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:
121
122 private:
123 unsigned m_calls = 0;
124
125 private:
126 TH1 *m_callbacks = nullptr;
127
128 private:
130 };
131}
132
133#endif
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
ToolHandle< IUnitTestTool > m_toolHandle
the tool handle property our owner sets
TBranch * m_branch
description: the branch we are using
virtual::StatusCode finalize() override
void testInvariant() const
effects: test the invariant of this object guarantee: no-fail
float m_property
the float property our owner sets
std::string m_name
description: the name of the variable we are using
std::string m_string_property
the string property our owner sets
Int_t m_value
description: the value we are reading from the branch
TH1 * getCallbacks()
CallBack
the various callbacks we use
virtual::StatusCode initialize() override
UnitTestAlg2(const std::string &name, ISvcLocator *pSvcLocator)
effects: standard constructor.
TTree * m_tree
description: the histogram we are creating
virtual::StatusCode execute() override
std::string m_fileName
the name of the file (for testing changeInput)
bool makeOutput
description: whether I create an output n-tuple
bool m_hasInitialize
whether initialize has been called
This module defines the arguments passed from the BATCH driver to the BATCH worker.