ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDTools
EventLoopAlgs
Root
UnitTestSkim.cxx
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
//
8
// includes
9
//
10
11
#include <
EventLoopAlgs/UnitTestSkim.h
>
12
13
#include <TTree.h>
14
#include <
RootCoreUtils/Assert.h
>
15
#include <
EventLoop/StatusCode.h
>
16
#include <
EventLoop/IWorker.h
>
17
#include <
EventLoopAlgs/NTupleSvc.h
>
18
19
//
20
// method implementations
21
//
22
23
namespace
EL
24
{
25
void
UnitTestSkim ::
26
testInvariant ()
const
27
{}
28
29
30
31
UnitTestSkim ::
32
UnitTestSkim ()
33
{
34
RCU_NEW_INVARIANT
(
this
);
35
}
36
37
38
39
StatusCode
UnitTestSkim ::
40
changeInput (
bool
/*firstFile*/
)
41
{
42
RCU_CHANGE_INVARIANT
(
this
);
43
wk
()->tree()->SetBranchAddress (
"el_n"
, &
el_n
);
44
return
StatusCode::SUCCESS;
45
}
46
47
48
49
StatusCode
UnitTestSkim ::
50
initialize ()
51
{
52
RCU_CHANGE_INVARIANT
(
this
);
53
54
m_skim
=
getNTupleSvc
(
wk
(),
"output"
);
55
m_skim
->tree()->Branch (
"el_n2"
, &
el_n2
,
"el_n2/I"
);
56
57
return
StatusCode::SUCCESS;
58
}
59
60
61
62
StatusCode
UnitTestSkim ::
63
execute ()
64
{
65
RCU_CHANGE_INVARIANT
(
this
);
66
67
wk
()->tree()->GetEntry (
wk
()->treeEntry());
68
el_n2
=
el_n
*
el_n
;
69
70
return
StatusCode::SUCCESS;
71
}
72
}
Assert.h
RCU_CHANGE_INVARIANT
#define RCU_CHANGE_INVARIANT(x)
Definition
Assert.h:219
RCU_NEW_INVARIANT
#define RCU_NEW_INVARIANT(x)
Definition
Assert.h:221
IWorker.h
NTupleSvc.h
StatusCode.h
UnitTestSkim.h
EL::Algorithm::wk
IWorker * wk() const
description: the worker that is controlling us guarantee: no-fail
EL::UnitTestSkim::m_skim
NTupleSvc * m_skim
description: the output algorithm we use
Definition
UnitTestSkim.h:83
EL::UnitTestSkim::el_n
Int_t el_n
description: the member we read into
Definition
UnitTestSkim.h:87
EL::UnitTestSkim::el_n2
Int_t el_n2
description: the member we write from
Definition
UnitTestSkim.h:91
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition
AsgComponentFactories.h:16
EL::getNTupleSvc
NTupleSvc * getNTupleSvc(IWorker *worker, const std::string &outputStream, const std::string &treeName="")
effects: get the skimming algorithm for the given output for this worker guarantee: strong failures: ...
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