5#ifndef EVENT_LOOP_ALGS__NTUPLE_SVC_H
6#define EVENT_LOOP_ALGS__NTUPLE_SVC_H
43 const std::string& outputStream,
44 const std::string& treeName =
"");
65 NTupleSvc (
const std::string& val_outputName =
"output");
virtual const std::string & name() const
the interface for algorithms to access IWorker
std::set< std::string > m_whiteFloat
description: the list of whiteboard floats we copy
void testInvariant() const
effects: test the invariant of this object guarantee: no-fail
std::set< std::string >::iterator m_copyBranchesIter
void addWhiteFloat(const std::string &varName)
effects: add a float from the whiteboard guarantee: strong failures: out of memory II
std::set< std::string >::iterator m_whiteFloatIter
TTree * tree() const
returns: the tree we are writing out guarantee: no-fail requires(soft): initialize() has been called ...
TFile * m_file
description: the file we are writing out
bool m_connected
description: whether our output branches are properly connected to the input tree
std::vector< CopyInfo >::iterator copyInfoMIter
std::string m_outputName
description: the name of the output stream
virtual StatusCode setupJob(Job &job)
effects: give the algorithm a chance to intialize the job with anything this algorithm needs.
void initOutput(const std::string &branchName)
effects: create the branch in the output tree guarantee: basic, may create some failures: out of memo...
std::string m_treeName
description: the name of the output tree
std::string m_tree_title
description: the title of the output tree
void treeName(const std::string &val_treeName)
NTupleSvc(const std::string &val_outputName="output")
effects: standard constructor guarantee: strong failures: out of memory I requires: !...
void addWhiteArray(const std::string &varName)
effects: add an array from the whiteboard guarantee: strong failures: out of memory II
void initOutput(const std::set< std::string > &branchList)
effects: create the branches in the output tree guarantee: basic, may create some failures: out of me...
virtual const char * GetName() const
effects: return the name of this algorithm guarantee: no-fail
void copyInput()
effects: copy the input branches to the output branches guarantee: basic, may copy some failures: out...
virtual bool hasName(const std::string &name) const
returns: whether this algorithm has the given name guarantee: basic failures: algorithm dependent rat...
virtual StatusCode changeInput(bool firstFile)
effects: do all changes to work with a new input file, e.g.
const std::string & treeName() const
description: the name of the tree, or the empty string to use the name of the input tree guarantee: n...
virtual StatusCode postExecute()
effects: do the post-processing for the event guarantee: basic failures: algorithm dependent rational...
TTree * m_tree
description: the tree we are writing out
std::vector< WhiteInfo > m_whiteInfo
virtual StatusCode execute()
effects: process the next event guarantee: basic failures: algorithm dependent rationale: the virtual...
void setFilterPassed(bool passed=true)
effects: take the current event if passed is set, otherwise perform a no-op guarantee: no-fail
~NTupleSvc()
effects: standard destructor guarantee: no-fail
virtual StatusCode initialize()
effects: do everything that needs to be done before running the algorithm, e.g.
bool getFilterPassed() const
returns: whether the current event will be taken guarantee: no-fail
std::set< std::string >::iterator m_whiteArrayIter
bool m_taken
description: whether we take the current event
void initBranches()
effects: create all the branches when called for the first time guarantee: basic, may create some fai...
std::vector< CopyInfo > m_copyInfo
void copyBranch(const std::string &name)
effects: add another branch to copy.
std::set< std::string > m_whiteArray
description: the list of whiteboard arrays we copy
void copyBranchList(const std::string &fileName)
effects: read a list of branches to copy from a file.
WhiteBoardSvc * m_whiteboard
description: the white board service, if we are using it
std::set< std::string > m_copyBranches
description: the list of branches we copy
std::vector< WhiteInfo >::iterator whiteInfoMIter
bool m_initialized
description: whether we initialized the tree we are writing out
void findBranches(std::set< std::string > &branchList)
effects: find the branches in the input tree guarantee: basic, may create some failures: out of memor...
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.
description: the information we need for copying branches
std::vector< char > buffer
description: the buffer used if none is set
std::string name
description: the name of the branch
TBranch * target
description: the branch in the output tree
TBranch * source
description: the branch in the source tree
description: the information we need for whiteboard variables
std::vector< float > * pointer
description: a pointer to the buffer rationale: this is used when writing arrays
std::string name
description: the name of the branch
bool array
description: whether this is an array branch
std::vector< float > buffer
description: the buffer we are writing