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
RCU_INVARIANT
(
this
!= 0);
29
}
30
31
32
33
UnitTestSkim ::
34
UnitTestSkim ()
35
{
36
RCU_NEW_INVARIANT
(
this
);
37
}
38
39
40
41
StatusCode
UnitTestSkim ::
42
changeInput (
bool
/*firstFile*/
)
43
{
44
RCU_CHANGE_INVARIANT
(
this
);
45
wk
()->tree()->SetBranchAddress (
"el_n"
, &
el_n
);
46
return
StatusCode::SUCCESS;
47
}
48
49
50
51
StatusCode
UnitTestSkim ::
52
initialize ()
53
{
54
RCU_CHANGE_INVARIANT
(
this
);
55
56
m_skim
=
getNTupleSvc
(
wk
(),
"output"
);
57
m_skim
->tree()->Branch (
"el_n2"
, &
el_n2
,
"el_n2/I"
);
58
59
return
StatusCode::SUCCESS;
60
}
61
62
63
64
StatusCode
UnitTestSkim ::
65
execute ()
66
{
67
RCU_CHANGE_INVARIANT
(
this
);
68
69
wk
()->tree()->GetEntry (
wk
()->treeEntry());
70
el_n2
=
el_n
*
el_n
;
71
72
return
StatusCode::SUCCESS;
73
}
74
}
Assert.h
RCU_INVARIANT
#define RCU_INVARIANT(x)
Definition
Assert.h:189
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