|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef EVENT_LOOP_WORKER_HH
6 #define EVENT_LOOP_WORKER_HH
17 #include <unordered_map>
52 void addOutput (TObject *output_swallow)
final override;
117 const std::string&
stream )
final override;
124 const std::string&
stream )
const final override;
138 TTree *
tree ()
const override;
203 virtual bool filterPassed ()
const noexcept
final override;
209 virtual void setFilterPassed (
bool val_filterPassed) noexcept
final override;
416 typedef std::map<std::pair<std::
string,std::
string>,TTree*>::const_iterator
::StatusCode finalize()
finalize the worker
bool m_newInputFile
whether this is a new input file (i.e.
void addOutput(TObject *output_swallow) final override
effects: add an object to the output.
bool m_firstEvent
whether we are still to process the first event
std::vector< std::unique_ptr< Detail::Module > > m_modules
the list of modules we hold
all data needed to manage a given output stream
std::string m_outputTarget
the target file to which we will write the histogram output
virtual bool filterPassed() const noexcept final override
whether the current algorithm passed its filter criterion for the current event
TFile * getOutputFileNull(const std::string &label) const override
effects: get the output file that goes into the dataset with the given label.
std::map< std::string, TH1 * >::const_iterator OutputHistMapIter
the output map
uint64_t eventsProcessed() const noexcept
the number of events that have been processed
::StatusCode directExecute(const SH::SamplePtr &sample, const Job &job, const std::string &location, const SH::MetaObject &options)
run the job
the data the EventLoop core classes are sharing with the Module implementation
std::string inputFileName() const override
the name of the file we are reading the current tree from, without the path component
std::map< std::string, TH1 * > m_outputHistMap
TFile * inputFile() const override
description: the file we are reading the current tree from guarantee: no-fail
void addModule(std::unique_ptr< Detail::Module > module)
add the given module to this worker
::StatusCode openInputFile(const std::string &inputFileUrl) override
open the given input file without processing it
bool m_algorithmsInitialized
whether the algorithms are initialized
bool const RAWDATA *ch2 const
virtual void setFilterPassed(bool val_filterPassed) noexcept final override
set the value of filterPassed
::StatusCode processEvents(EventRange &eventRange) override
process the given event range
static bool fileOpenErrorFilter(int level, bool, const char *, const char *)
Error handler for file opening.
std::map< std::pair< std::string, std::string >, TTree * > m_outputTreeMap
const SH::MetaObject * metaData() const override
description: the sample meta-data we are working on guarantee: no-fail invariant: metaData !...
EL::Algorithm * getAlg(const std::string &name) const override
effects: returns the algorithms with the given name or NULL if there is none guarantee: strong failur...
void setSegmentName(const std::string &val_segmentName)
set the segment name
void setOutputHist(const std::string &val_outputTarget)
set the histogram output list
::StatusCode StatusCode
StatusCode definition for legacy code.
TTree * triggerConfig() const override
description: the trigger config tree from the input file, or NULL if we did not find it guarantee: st...
the interface for algorithms to access IWorker
virtual ~Worker()
effects: standard destructor guarantee: no-fail
This module defines the arguments passed from the BATCH driver to the BATCH worker.
TObject * getOutputHist(const std::string &name) const final override
get the output histogram with the given name
Long64_t inputFileNumEntries() const override
the number of events in the input file
void setJobConfig(JobConfig &&jobConfig)
set the JobConfig
void skipEvent() override
effects: skip the current event, i.e.
::StatusCode addOutputStream(const std::string &label, Detail::OutputStreamData output)
effects: add another output file guarantee: strong failures: low level errors II failures: label alre...
::StatusCode batchExecute(unsigned job_id, const char *confFile)
effects: do what is needed to execute the given job segment guarantee: basic failures: job specific
the job configuration that is independent of driver and dataset
A smart pointer class that holds a single Sample object.
::StatusCode addTree(const TTree &tree, const std::string &stream) final override
effects: adds a tree to an output file specified by the stream/label failures: Incorrect stream/label...
void testInvariant() const
effects: test the invariant of this object guarantee: no-fail
TTree * getOutputTree(const std::string &name, const std::string &stream) const final override
effects: get the tree that was added to an output file earlier failures: Tree doesn't exist
A relatively simple transient store for objects created in analysis.
TFile * getOutputFile(const std::string &label) const override
effects: get the output file that goes into the dataset with the given label.
void setMetaData(const SH::MetaObject *val_metaData)
set the metaData
xAOD::TEvent * xaodEvent() const override
description: the xAOD event and store guarantee: strong failures: out of memory I failures: TEventSvc...
Long64_t treeEntry() const override
description: the entry in the tree we are reading guarantee: no-fail
::StatusCode gridExecute(const std::string &sampleName, Long64_t SkipEvents, Long64_t nEventsPerJob)
::StatusCode initialize()
initialize the worker
std::map< std::pair< std::string, std::string >, TTree * >::const_iterator OutputTreeMapIter
description: the list of output trees
xAOD::TStore * xaodStore() const override
void gridCreateJobSummary(uint64_t eventsProcessed)
a range of events in a given file
TTree * tree() const override
description: the tree we are running on guarantee: no-fail
void addOutputList(const std::string &name, TObject *output_swallow) override
effects: add a given object to the output.
Tool for accessing xAOD files outside of Athena.
Worker()
standard constructor
::StatusCode processInputs()
process all the inputs
std::string m_segmentName
the name of the segment we are processing