|
ATLAS Offline Software
|
Go to the documentation of this file.
28 #include <TObjString.h>
56 m_hasInitialize (
false),
57 m_hasHistInitialize (
false)
78 return StatusCode::SUCCESS;
100 return StatusCode::SUCCESS;
115 book (
TH1F (
"file_executes",
"file executes", 1, 0, 1));
117 return StatusCode::SUCCESS;
146 m_tree =
new TTree (
"tree",
"test output");
151 return StatusCode::SUCCESS;
164 hist (
"file_executes")->Fill (0);
165 return StatusCode::SUCCESS;
188 return StatusCode::SUCCESS;
201 wk()->
addOutput (
new TH1F (
"beta/dir/hist",
"directory test", 10, 0, 10));
203 return StatusCode::SUCCESS;
216 wk()->
addOutput (
new TH1F (
"beta/dir/hist",
"directory test", 10, 0, 10));
218 return StatusCode::SUCCESS;
ClassImp(EL::UnitTestAlg1) namespace EL
void setMsgLevel(int level)
set the message level for the message stream for this object
Int_t m_value
description: the value we are reading from the branch
virtual StatusCode fileExecute() override
effects: do all the processing that needs to be done once per file guarantee: basic failures: algorit...
virtual void addOutput(TObject *output_swallow)=0
effects: add an object to the output.
bool m_hasInitialize
whether initialize has been called
TGraphErrors * GetEntries(TH2F *histo)
TH1 * hist(const std::string &name) const
get the histogram with the given name
virtual StatusCode finalize() override
effects: do everything that needs to be done after completing work on this worker guarantee: basic fa...
virtual void addOutputList(const std::string &name, TObject *output_swallow)=0
effects: add a given object to the output.
UnitTestAlg1(const std::string &branchName="el_n")
effects: standard constructor.
virtual TFile * inputFile() const =0
description: the file we are reading the current tree from guarantee: no-fail
#define RCU_ASSERT_SOFT(x)
virtual StatusCode histFinalize() override
effects: this is a post-initialization routine that is called after finalize has been called.
bool m_hasHistInitialize
whether histInitialize has been called
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode setupJob(Job &job) override
effects: give the algorithm a chance to intialize the job with anything this algorithm needs.
bool makeOutput
description: whether I create an output n-tuple
This module defines the arguments passed from the BATCH driver to the BATCH worker.
virtual StatusCode initialize() override
effects: do everything that needs to be done before running the algorithm, e.g.
IWorker * wk() const
description: the worker that is controlling us guarantee: no-fail
virtual StatusCode execute() override
effects: process the next event guarantee: basic failures: algorithm dependent rationale: the virtual...
void testInvariant() const
effects: test the invariant of this object guarantee: no-fail
std::string m_fileName
the name of the file (for testing changeInput)
TBranch * m_branch
description: the branch we are using
TTree * m_tree
description: the histogram we are creating
virtual StatusCode histInitialize() override
effects: this is a pre-initialization routine that is called before changeInput is called.
void book(const TH1 &hist)
book the given histogram
virtual TFile * getOutputFile(const std::string &label) const =0
effects: get the output file that goes into the dataset with the given label.
#define RCU_CHANGE_INVARIANT(x)
#define RCU_THROW_MSG(message)
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
std::string m_name
description: the name of the variable we are using
virtual TTree * tree() const =0
description: the tree we are running on guarantee: no-fail
virtual StatusCode changeInput(bool firstFile) override
effects: do all changes to work with a new input file, e.g.
#define RCU_NEW_INVARIANT(x)