ATLAS Offline Software
Loading...
Searching...
No Matches
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
12
13#include <TTree.h>
16#include <EventLoop/IWorker.h>
18
19//
20// method implementations
21//
22
23namespace 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 {
45 wk()->tree()->SetBranchAddress ("el_n", &el_n);
46 return StatusCode::SUCCESS;
47 }
48
49
50
51 StatusCode UnitTestSkim ::
52 initialize ()
53 {
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 {
68
69 wk()->tree()->GetEntry (wk()->treeEntry());
70 el_n2 = el_n * el_n;
71
72 return StatusCode::SUCCESS;
73 }
74}
#define RCU_INVARIANT(x)
Definition Assert.h:196
#define RCU_CHANGE_INVARIANT(x)
Definition Assert.h:226
#define RCU_NEW_INVARIANT(x)
Definition Assert.h:228
IWorker * wk() const
description: the worker that is controlling us guarantee: no-fail
NTupleSvc * m_skim
description: the output algorithm we use
Int_t el_n
description: the member we read into
Int_t el_n2
description: the member we write from
This module defines the arguments passed from the BATCH driver to the BATCH worker.
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: ...
::StatusCode StatusCode
StatusCode definition for legacy code.