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
5#ifndef EVENT_LOOP_UNIT_TEST_ALG2_H
6#define EVENT_LOOP_UNIT_TEST_ALG2_H
7
8// Copyright Nils Krumnack 2011.
9// Distributed under the Boost Software License, Version 1.0.
10// (See accompanying file LICENSE_1_0.txt or copy at
11// http://www.boost.org/LICENSE_1_0.txt)
12
13// Please feel free to contact me (krumnack@iastate.edu) for bug
14// reports, feature suggestions, praise and complaints.
15
16
20
21
22
24
26#include <AsgTools/IAsgTool.h>
28
29class TBranch;
30class TH1;
31class TTree;
32
33namespace EL
34{
35 class UnitTestAlg2 final : public AnaAlgorithm
36 {
37 //
38 // public interface
39 //
40
43 public:
44 void testInvariant () const;
45
46
51 public:
52 UnitTestAlg2 (const std::string& name,
53 ISvcLocator* pSvcLocator);
54
55
57 public:
59
60
62 public:
69
70
71
72 //
73 // interface inherited from Algorithm
74 //
75
76 private:
77 virtual ::StatusCode initialize () override;
78
79 private:
80 virtual ::StatusCode execute () override;
81
82 private:
83 virtual ::StatusCode finalize () override;
84
85
86
87 //
88 // private interface
89 //
90
92 public:
93 float m_property = 0;
94
96 public:
97 std::string m_string_property;
98
100 public:
101 ToolHandle<IUnitTestTool> m_toolHandle;
102
104 private:
105 std::string m_name;
106
108 private:
109 TBranch *m_branch = nullptr;
110
112 private:
113 Int_t m_value;
114
116 private:
117 // TH1 *m_hist;
118
120 private:
121 TTree *m_tree;
122
124 private:
125 std::string m_fileName;
126
128 private:
130
131 private:
132 unsigned m_calls = 0;
133
134 private:
135 TH1 *m_callbacks = nullptr;
136
137 private:
139 };
140}
141
142#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.