 |
ATLAS Offline Software
|
#include <Worker.h>
|
void | testInvariant () const |
| effects: test the invariant of this object guarantee: no-fail More...
|
|
virtual | ~Worker () |
| effects: standard destructor guarantee: no-fail More...
|
|
void | addOutput (TObject *output_swallow) final override |
| effects: add an object to the output. More...
|
|
void | addOutputList (const std::string &name, TObject *output_swallow) override |
| effects: add a given object to the output. More...
|
|
TObject * | getOutputHist (const std::string &name) const final override |
| get the output histogram with the given name More...
|
|
TFile * | getOutputFile (const std::string &label) const override |
| effects: get the output file that goes into the dataset with the given label. More...
|
|
TFile * | getOutputFileNull (const std::string &label) const override |
| effects: get the output file that goes into the dataset with the given label. More...
|
|
::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 specified, called at the wrong time note: See getOutputFile for failure types... More...
|
|
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 More...
|
|
const SH::MetaObject * | metaData () const override |
| description: the sample meta-data we are working on guarantee: no-fail invariant: metaData != 0 rationale: this can be used for accessing sample meta-data More...
|
|
TTree * | tree () const override |
| description: the tree we are running on guarantee: no-fail More...
|
|
Long64_t | treeEntry () const override |
| description: the entry in the tree we are reading guarantee: no-fail More...
|
|
TFile * | inputFile () const override |
| description: the file we are reading the current tree from guarantee: no-fail More...
|
|
std::string | inputFileName () const override |
| the name of the file we are reading the current tree from, without the path component More...
|
|
TTree * | triggerConfig () const override |
| description: the trigger config tree from the input file, or NULL if we did not find it guarantee: strong failures: i/o errors More...
|
|
xAOD::TEvent * | xaodEvent () const override |
| description: the xAOD event and store guarantee: strong failures: out of memory I failures: TEventSvc not configured postcondition: result != 0 More...
|
|
xAOD::TStore * | xaodStore () const override |
|
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 failures: out of memory II More...
|
|
void | skipEvent () override |
| effects: skip the current event, i.e. More...
|
|
virtual bool | filterPassed () const noexcept final override |
| whether the current algorithm passed its filter criterion for the current event More...
|
|
virtual void | setFilterPassed (bool val_filterPassed) noexcept final override |
| set the value of filterPassed More...
|
|
| Worker () |
| standard constructor More...
|
|
::StatusCode | directExecute (const SH::SamplePtr &sample, const Job &job, const std::string &location, const SH::MetaObject &options) |
| run the job More...
|
|
::StatusCode | batchExecute (unsigned job_id, const char *confFile) |
| effects: do what is needed to execute the given job segment guarantee: basic failures: job specific More...
|
|
::StatusCode | gridExecute (const std::string &sampleName, Long64_t SkipEvents, Long64_t nEventsPerJob) |
|
Definition at line 25 of file Worker.h.
◆ OutputHistMapIter
the output map
Definition at line 402 of file Worker.h.
◆ OutputTreeMapIter
description: the list of output trees
Definition at line 409 of file Worker.h.
◆ GridErrorCodes
Enumerator |
---|
EC_FAIL | |
EC_ABORT | |
EC_NOTFINISHED | |
EC_BADINPUT | |
Definition at line 250 of file Worker.h.
◆ ~Worker()
effects: standard destructor guarantee: no-fail
Definition at line 80 of file Worker.cxx.
◆ Worker()
standard constructor
- Guarantee
- strong
- Failures
- out of memory I
Definition at line 324 of file Worker.cxx.
◆ addOutput() [1/2]
void EL::Detail::ModuleData::addOutput |
( |
std::unique_ptr< TObject > |
output | ) |
|
|
inherited |
add the given output object to the histogram output stream
- Guarantee
- basic
- Failures
- out of memory II
Definition at line 33 of file ModuleData.cxx.
◆ addOutput() [2/2]
void EL::Worker::addOutput |
( |
TObject * |
output_swallow | ) |
|
|
finaloverridevirtual |
effects: add an object to the output.
the worker takes over ownership of the object, but the caller may maintain a reference to it guarantee: basic, argument is always swallowed failures: out of memory I requires: output_swallow != 0 warning: so far I placed no requirements on the output objects. I may do that at a later stage though, possibly breaking existing code.
Implements EL::IHistogramWorker.
Definition at line 88 of file Worker.cxx.
91 std::unique_ptr<TObject>
output (output_swallow);
97 ModuleData::addOutput (std::move (output));
◆ addOutputList()
void EL::Worker::addOutputList |
( |
const std::string & |
name, |
|
|
TObject * |
output_swallow |
|
) |
| |
|
overridevirtual |
effects: add a given object to the output.
instead of trying to merge the outputs from multiple jobs the output file will contain a TList of the given name with the objects from all the output. guarantee: basic, argument is always swallowed failures: out of memory II requires: output_swallow != 0 rationale: This was primarily build to allow the GRL output to be collected from EventLoop jobs, but it can be used for any kind of output that can not or should not be merged.
Implements EL::IWorker.
Definition at line 102 of file Worker.cxx.
105 std::unique_ptr<TObject>
output (output_swallow);
111 std::unique_ptr<TList>
list (
new TList);
◆ addOutputStream()
effects: add another output file guarantee: strong failures: low level errors II failures: label already used
Definition at line 738 of file Worker.cxx.
742 using namespace msgEventLoop;
748 return ::StatusCode::FAILURE;
750 if (
data.file() ==
nullptr)
752 ANA_MSG_ERROR (
"output stream does not have a file attached");
753 return ::StatusCode::FAILURE;
755 if (
data.mainStreamName().empty())
757 m_outputs.insert (std::make_pair (
label, std::make_shared<Detail::OutputStreamData>(std::move (
data))));
758 return ::StatusCode::SUCCESS;
◆ addTree()
effects: adds a tree to an output file specified by the stream/label failures: Incorrect stream/label specified, called at the wrong time note: See getOutputFile for failure types...
Implements EL::ITreeWorker.
Definition at line 155 of file Worker.cxx.
158 using namespace msgEventLoop;
166 return ::StatusCode::FAILURE;
169 outputIter->second->addClone (
tree);
172 return ::StatusCode::SUCCESS;
◆ batchExecute()
StatusCode EL::Worker::batchExecute |
( |
unsigned |
job_id, |
|
|
const char * |
confFile |
|
) |
| |
effects: do what is needed to execute the given job segment guarantee: basic failures: job specific
Definition at line 831 of file Worker.cxx.
834 using namespace msgEventLoop;
839 std::unique_ptr<TFile>
file (TFile::Open (confFile,
"READ"));
840 if (
file.get() ==
nullptr ||
file->IsZombie())
843 return ::StatusCode::FAILURE;
846 std::unique_ptr<BatchJob>
job (
dynamic_cast<BatchJob*
>(
file->Get (
"job")));
848 if (
job.get() ==
nullptr)
851 return ::StatusCode::FAILURE;
854 if (job_id >=
job->segments.size())
856 ANA_MSG_ERROR (
"invalid job-id " << job_id <<
", max is " <<
job->segments.size());
857 return ::StatusCode::FAILURE;
859 BatchSegment *
segment = &
job->segments[job_id];
864 gSystem->Exec (
"pwd");
865 gSystem->MakeDirectory (
"output");
876 Detail::OutputStreamData
data {
882 m_moduleConfig.emplace_back (
"EL::Detail::BatchInputModule/BatchInputModule");
893 std::ostringstream job_name;
895 std::ofstream
completed ((
job->location +
"/status/completed-" + job_name.str()).c_str());
896 return ::StatusCode::SUCCESS;
900 return ::StatusCode::FAILURE;
◆ directExecute()
run the job
- Guarantee
- basic
Definition at line 786 of file Worker.cxx.
790 using namespace msgEventLoop;
807 Detail::OutputStreamData
data {
808 out->output()->makeWriter (
sample->name(),
"",
".root")};
813 m_moduleConfig.emplace_back (
"EL::Detail::DirectInputModule/DirectInputModule");
826 return ::StatusCode::SUCCESS;
◆ eventsProcessed()
uint64_t EL::Worker::eventsProcessed |
( |
| ) |
const |
|
protectednoexcept |
the number of events that have been processed
- Guarantee
- no-fail
Definition at line 777 of file Worker.cxx.
◆ fileOpenErrorFilter()
bool EL::Worker::fileOpenErrorFilter |
( |
int |
level, |
|
|
bool |
, |
|
|
const char * |
s1, |
|
|
const char * |
s2 |
|
) |
| |
|
staticprivate |
Error handler for file opening.
Definition at line 637 of file Worker.cxx.
641 if (strstr (
s2,
"no streamer or dictionary") !=
nullptr) {
646 if(
level > kWarning ) {
648 std::string
msg =
"ROOT error detected in Worker.cxx: ";
652 throw std::runtime_error(
msg);
◆ filterPassed()
bool EL::Worker::filterPassed |
( |
| ) |
const |
|
finaloverridevirtualnoexcept |
whether the current algorithm passed its filter criterion for the current event
- Guarantee
- no-fail
Implements EL::IFilterWorker.
Definition at line 306 of file Worker.cxx.
◆ finalize()
finalize the worker
This method ought to be called after all events have been processed. It is meant to ensure that the job is ended properly and all outputs are written out and files are closed.
- Guarantee
- basic
- Failures
- finalization failures
Definition at line 506 of file Worker.cxx.
509 using namespace msgEventLoop;
516 return StatusCode::FAILURE;
526 output.second->saveOutput ();
528 std::string
path =
output.second->finalFileName ();
535 if (
m_jobStats->GetListOfBranches()->GetEntries() > 0)
540 return ::StatusCode::FAILURE;
542 ModuleData::addOutput (std::move (
m_jobStats));
554 return ::StatusCode::SUCCESS;
◆ getAlg()
effects: returns the algorithms with the given name or NULL if there is none guarantee: strong failures: out of memory II
Implements EL::IWorker.
Definition at line 283 of file Worker.cxx.
290 return alg.m_algorithm->getLegacyAlg();
◆ getOutputFile()
TFile * EL::Worker::getOutputFile |
( |
const std::string & |
label | ) |
const |
|
overridevirtual |
effects: get the output file that goes into the dataset with the given label.
this dataset has to be registered before the job is submitted. typically that happens in the doSetupJob method. guarantee: strong failures: no dataset with the given label postcondition: result != 0 note: the default value for the argument corresponds to the default label value in the OutputInfo class.
Implements EL::IWorker.
Definition at line 131 of file Worker.cxx.
◆ getOutputFileNull()
TFile * EL::Worker::getOutputFileNull |
( |
const std::string & |
label | ) |
const |
|
overridevirtual |
effects: get the output file that goes into the dataset with the given label.
this dataset has to be registered before the job is submitted. typically that happens in the doSetupJob method. guarantee: strong failures: internal errors note: the default value for the argument corresponds to the default label value in the OutputInfo class. rationale: this method was added to support optional output files, i.e.: the algorithm leaves it to the user whether or not the output file gets configured. then the algorithm just checks whether the output file is there. if so it fills it, otherwise it ignores it.
Implements EL::IWorker.
Definition at line 143 of file Worker.cxx.
150 return iter->second->file();
◆ getOutputHist()
TObject * EL::Worker::getOutputHist |
( |
const std::string & |
name | ) |
const |
|
finaloverridevirtual |
get the output histogram with the given name
This is mostly meant, so that I can emulate the Athena histogram mechanism.
- Guarantee
- strong
- Failures
- object not found
- Postcondition
- result != 0
Implements EL::IHistogramWorker.
Definition at line 119 of file Worker.cxx.
◆ getOutputTree()
TTree * EL::Worker::getOutputTree |
( |
const std::string & |
name, |
|
|
const std::string & |
stream |
|
) |
| const |
|
finaloverridevirtual |
effects: get the tree that was added to an output file earlier failures: Tree doesn't exist
Implements EL::ITreeWorker.
Definition at line 177 of file Worker.cxx.
180 using namespace msgEventLoop;
190 TTree *
result = outputIter->second->getOutputTree(
name );
◆ gridCreateJobSummary()
void EL::Worker::gridCreateJobSummary |
( |
uint64_t |
eventsProcessed | ) |
|
|
private |
◆ gridExecute()
StatusCode EL::Worker::gridExecute |
( |
const std::string & |
sampleName, |
|
|
Long64_t |
SkipEvents, |
|
|
Long64_t |
nEventsPerJob |
|
) |
| |
Definition at line 906 of file Worker.cxx.
909 using namespace msgEventLoop;
912 ANA_MSG_INFO (
"Running with ROOT version " << gROOT->GetVersion()
913 <<
" (" << gROOT->GetVersionDate() <<
")");
922 std::unique_ptr<TFile>
f (TFile::Open(
"jobdef.root"));
923 if (
f ==
nullptr ||
f->IsZombie()) {
925 return ::StatusCode::FAILURE;
933 return ::StatusCode::FAILURE;
940 return ::StatusCode::FAILURE;
944 std::unique_ptr<TList> outs ((TList*)
f->Get(
"outputs"));
948 return ::StatusCode::FAILURE;
951 TIter itr(outs.get());
953 while ((
obj = itr())) {
959 ANA_MSG_ERROR (
"Encountered unexpected entry in list of outputs");
960 return ::StatusCode::FAILURE;
968 const std::string location =
".";
978 TIter itr(&bigOutputs);
980 while ((
obj = itr())) {
985 return ::StatusCode::FAILURE;
988 Detail::OutputStreamData
data {
989 location +
"/" +
os->label() +
".root",
"RECREATE"};
999 std::ifstream
infile(
"input.txt");
1002 if (!getline(
infile, sLine))
break;
1003 std::istringstream ssLine(sLine);
1006 if (!getline(ssLine, sFile,
','))
break;
1015 m_moduleConfig.emplace_back (
"EL::Detail::DirectInputModule/DirectInputModule");
1034 return ::StatusCode::SUCCESS;
◆ initialize()
initialize the worker
This method ought to be called after the options on the worker are set and before any events are processed. It is meant to make sure everything is ready and set up for event processing.
- Guarantee
- basic
- Failures
- initialization failures
Definition at line 377 of file Worker.cxx.
380 using namespace msgEventLoop;
388 m_moduleConfig.emplace_back (
"EL::Detail::MemoryMonitorModule/EarlyMemoryMonitorModule");
391 m_moduleConfig.emplace_back (
"EL::Detail::TreeCacheModule/TreeCacheModule");
398 m_moduleConfig.emplace_back (
"EL::Detail::TEventModule/TEventModule");
405 if (!factoryPreload.empty())
407 m_moduleConfig.emplace_back (
"EL::Detail::FactoryPreloadModule/FactoryPreloadModule");
410 m_moduleConfig.emplace_back (
"EL::Detail::LeakCheckModule/LeakCheckModule");
416 m_moduleConfig.emplace_back (
"EL::Detail::StopwatchModule/StopwatchModule");
418 m_moduleConfig.emplace_back (
"EL::Detail::GridReportingModule/GridReportingModule");
420 m_moduleConfig.emplace_back (
"EL::Detail::AlgorithmTimerModule/AlgorithmTimerModule");
422 m_moduleConfig.emplace_back (
"EL::Detail::AlgorithmMemoryModule/AlgorithmMemoryModule");
423 m_moduleConfig.emplace_back (
"EL::Detail::FileExecutedModule/FileExecutedModule");
424 m_moduleConfig.emplace_back (
"EL::Detail::EventCountModule/EventCountModule");
425 m_moduleConfig.emplace_back (
"EL::Detail::WorkerConfigModule/WorkerConfigModule");
426 m_moduleConfig.emplace_back (
"EL::Detail::AlgorithmStateModule/AlgorithmStateModule");
427 m_moduleConfig.emplace_back (
"EL::Detail::PostClosedOutputsModule/PostClosedOutputsModule");
429 m_moduleConfig.emplace_back (
"EL::Detail::MemoryMonitorModule/LateMemoryMonitorModule");
433 std::unique_ptr<Detail::Module>
module;
440 Detail::OutputStreamData
data {
449 std::istringstream iss (aliases);
451 while (std::getline (iss,
alias,
','))
454 if (
pos == std::string::npos)
457 return ::StatusCode::FAILURE;
459 auto aliasName =
alias.substr (0,
pos);
460 auto realName =
alias.substr (
pos + 1);
461 auto realOutput =
m_outputs.find (realName);
464 ANA_MSG_ERROR (
"output stream " << realName <<
" not found for alias " << aliasName);
465 return ::StatusCode::FAILURE;
467 auto [aliasOutput, success] =
m_outputs.emplace (aliasName, realOutput->second);
470 ANA_MSG_ERROR (
"output stream " << aliasName <<
" already exists, can't make alias");
471 return ::StatusCode::FAILURE;
477 (
"EventLoop_JobStats",
"EventLoop job statistics");
480 ANA_MSG_INFO (
"calling firstInitialize on all modules");
483 ANA_MSG_INFO (
"calling preFileInitialize on all modules");
487 return ::StatusCode::SUCCESS;
◆ inputFile()
TFile * EL::Worker::inputFile |
( |
| ) |
const |
|
overridevirtual |
description: the file we are reading the current tree from guarantee: no-fail
Implements EL::IWorker.
Definition at line 227 of file Worker.cxx.
◆ inputFileName()
std::string EL::Worker::inputFileName |
( |
| ) |
const |
|
overridevirtual |
the name of the file we are reading the current tree from, without the path component
- Guarantee
- no-fail
Implements EL::IWorker.
Definition at line 236 of file Worker.cxx.
242 if (
split != std::string::npos)
◆ inputFileNumEntries()
Long64_t EL::Worker::inputFileNumEntries |
( |
| ) |
const |
|
overrideprotectedvirtual |
◆ metaData()
description: the sample meta-data we are working on guarantee: no-fail invariant: metaData != 0 rationale: this can be used for accessing sample meta-data
Implements EL::IWorker.
Definition at line 200 of file Worker.cxx.
◆ openInputFile()
open the given input file without processing it
This is mostly to allow the driver to query the number of events in the input file without processing it, usually to determine the range of events to process.
- Guarantee
- basic
- Failures
- file can't be opened
Implements EL::Detail::IInputModuleActions.
Definition at line 662 of file Worker.cxx.
665 using namespace msgEventLoop;
673 return ::StatusCode::SUCCESS;
690 if (inputFileUrl.empty())
691 return ::StatusCode::SUCCESS;
706 module->reportInputFailure (*
this);
707 return ::StatusCode::FAILURE;
713 module->reportInputFailure (*
this);
714 return ::StatusCode::FAILURE;
724 ANA_MSG_INFO (
"treating this like a tree with no events");
733 return ::StatusCode::SUCCESS;
◆ processEvents()
process the given event range
This will update eventRange
if the end is set to eof
- Guarantee
- basic
- Failures
- file can't be opened
event range exceeds length of file
processing failures
Implements EL::Detail::IInputModuleActions.
Definition at line 559 of file Worker.cxx.
562 using namespace msgEventLoop;
574 return ::StatusCode::FAILURE;
582 return ::StatusCode::FAILURE;
601 if (eventRange.m_beginEvent == 0)
607 ANA_MSG_INFO (
"Processing events " << eventRange.m_beginEvent <<
"-" << eventRange.m_endEvent <<
" in file " << eventRange.m_url);
616 if (
module->onExecute (*this).isFailure())
619 return ::StatusCode::FAILURE;
632 return ::StatusCode::SUCCESS;
◆ processInputs()
process all the inputs
This method ought to be called after initialize and before finalize. It will rely on the defined modules to steer it to the files and events it ought to process.
Definition at line 492 of file Worker.cxx.
495 using namespace msgEventLoop;
501 return ::StatusCode::SUCCESS;
◆ setFilterPassed()
void EL::Worker::setFilterPassed |
( |
bool |
val_filterPassed | ) |
|
|
finaloverridevirtualnoexcept |
◆ setJobConfig()
void EL::Worker::setJobConfig |
( |
JobConfig && |
jobConfig | ) |
|
|
protected |
set the JobConfig
This takes care of adding the algorithms, etc. (only algorithms for now, 03 Feb 17).
Note the rvalue calling convention here: Algorithms are objects that get modified, so if you use them more than once you need to copy/clone them. However, in practice no driver should need that (though many do for now, 03 Feb 17), as drivers generally stream the JobConfig in for one-time use.
- Guarantee
- basic
- Failures
- job configuration/streaming errors
Definition at line 365 of file Worker.cxx.
369 for (std::unique_ptr<IAlgorithmWrapper>&
alg :
jobConfig.extractAlgorithms())
◆ setMetaData()
◆ setOutputHist()
void EL::Worker::setOutputHist |
( |
const std::string & |
val_outputTarget | ) |
|
|
protected |
set the histogram output list
- Guarantee
- no-fail
Definition at line 345 of file Worker.cxx.
◆ setSegmentName()
void EL::Worker::setSegmentName |
( |
const std::string & |
val_segmentName | ) |
|
|
protected |
set the segment name
- Guarantee
- no-fail
Definition at line 355 of file Worker.cxx.
◆ skipEvent()
void EL::Worker::skipEvent |
( |
| ) |
|
|
overridevirtual |
effects: skip the current event, i.e.
skip the rest of the algorithms for this event guarantee: no-fail rationale: if you have an analysis strategy in which you divide work into multiple algorithms you may want to have dedicated algorithms for event selection that then skip later algorithms that fill histograms
Implements EL::IWorker.
Definition at line 297 of file Worker.cxx.
◆ testInvariant()
void EL::Worker::testInvariant |
( |
| ) |
const |
effects: test the invariant of this object guarantee: no-fail
Definition at line 68 of file Worker.cxx.
◆ tree()
TTree * EL::Worker::tree |
( |
| ) |
const |
|
overridevirtual |
description: the tree we are running on guarantee: no-fail
Implements EL::IWorker.
Definition at line 209 of file Worker.cxx.
◆ treeEntry()
Long64_t EL::Worker::treeEntry |
( |
| ) |
const |
|
overridevirtual |
description: the entry in the tree we are reading guarantee: no-fail
Implements EL::IWorker.
Definition at line 218 of file Worker.cxx.
◆ triggerConfig()
TTree * EL::Worker::triggerConfig |
( |
| ) |
const |
|
overridevirtual |
description: the trigger config tree from the input file, or NULL if we did not find it guarantee: strong failures: i/o errors
Implements EL::IWorker.
Definition at line 250 of file Worker.cxx.
254 return dynamic_cast<TTree*
>(
inputFile()->Get(
"physicsMeta/TrigConfTree"));
◆ xaodEvent()
description: the xAOD event and store guarantee: strong failures: out of memory I failures: TEventSvc not configured postcondition: result != 0
Implements EL::IWorker.
Definition at line 259 of file Worker.cxx.
◆ xaodStore()
◆ m_algorithmsInitialized
bool EL::Worker::m_algorithmsInitialized {false} |
|
private |
whether the algorithms are initialized
Definition at line 436 of file Worker.h.
◆ m_algs
◆ m_batchJob
BatchJob* EL::Detail::ModuleData::m_batchJob = nullptr |
|
inherited |
◆ m_eventsProcessed
uint64_t EL::Detail::ModuleData::m_eventsProcessed {0} |
|
inherited |
the number of events that have been processed
Definition at line 88 of file ModuleData.h.
◆ m_evtStore
the SgTEvent structure, if we use one
Definition at line 103 of file ModuleData.h.
◆ m_firstEvent
bool EL::Worker::m_firstEvent {true} |
|
private |
whether we are still to process the first event
Definition at line 441 of file Worker.h.
◆ m_histOutput
OutputStreamData* EL::Detail::ModuleData::m_histOutput {nullptr} |
|
inherited |
the histogram output stream
Definition at line 91 of file ModuleData.h.
◆ m_inputFile
std::unique_ptr<TFile> EL::Detail::ModuleData::m_inputFile |
|
inherited |
the input file pointer of the currently opened filed
Definition at line 72 of file ModuleData.h.
◆ m_inputFileUrl
std::string EL::Detail::ModuleData::m_inputFileUrl |
|
inherited |
the input file url of the currently opened file
Definition at line 69 of file ModuleData.h.
◆ m_inputTree
TTree* EL::Detail::ModuleData::m_inputTree {nullptr} |
|
inherited |
the (main) tree in the input file
Definition at line 75 of file ModuleData.h.
◆ m_inputTreeEntry
uint64_t EL::Detail::ModuleData::m_inputTreeEntry {0} |
|
inherited |
the entry in the input tree we are currently looking at
Definition at line 79 of file ModuleData.h.
◆ m_jobStats
std::unique_ptr<TTree> EL::Detail::ModuleData::m_jobStats |
|
inherited |
◆ m_metaData
◆ m_moduleConfig
the module configurations we use
Definition at line 446 of file Worker.h.
◆ m_modules
the list of modules we hold
Definition at line 415 of file Worker.h.
◆ m_newInputFile
bool EL::Worker::m_newInputFile {false} |
|
private |
whether this is a new input file (i.e.
one that has not yet been connected to the algorithms)
Definition at line 421 of file Worker.h.
◆ m_outputHistMap
std::map<std::string,TH1*> EL::Worker::m_outputHistMap |
|
private |
◆ m_outputs
◆ m_outputTarget
std::string EL::Worker::m_outputTarget |
|
private |
the target file to which we will write the histogram output
Definition at line 426 of file Worker.h.
◆ m_outputTreeMap
std::map<std::pair<std::string,std::string>,TTree*> EL::Worker::m_outputTreeMap |
|
private |
◆ m_segmentName
std::string EL::Worker::m_segmentName |
|
private |
the name of the segment we are processing
Definition at line 431 of file Worker.h.
◆ m_skipEvent
bool EL::Detail::ModuleData::m_skipEvent = false |
|
inherited |
whether we are skipping the current event
Definition at line 82 of file ModuleData.h.
◆ m_tevent
the TEvent structure, if we use one
Definition at line 97 of file ModuleData.h.
◆ m_tstore
the TStore structure, if we use one
Definition at line 100 of file ModuleData.h.
◆ m_worker
Worker* EL::Detail::ModuleData::m_worker {nullptr} |
|
inherited |
the worker (to pass on to the algorithms)
Definition at line 106 of file ModuleData.h.
The documentation for this class was generated from the following files:
::StatusCode finalize()
finalize the worker
static const std::string optMaxEvents
description: the name of the option used for setting the maximum number of events to process per samp...
void addOutput(std::unique_ptr< TObject > outputObject)
add the given output object to this stream
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
std::string m_outputTarget
the target file to which we will write the histogram output
char data[hepevt_bytes_allocation_ATLAS]
TFile * getOutputFileNull(const std::string &label) const override
effects: get the output file that goes into the dataset with the given label.
TObject * getOutputHist(const std::string &name) const noexcept
get the output histogram with the given name, or nullptr if there is no histogam with such a name
TTree * m_inputTree
the (main) tree in the input file
path
python interpreter configuration --------------------------------------—
uint64_t eventsProcessed() const noexcept
the number of events that have been processed
static const std::string optXaodAccessMode
description: the option to select the access mode for xAODs.
std::string inputFileName() const override
the name of the file we are reading the current tree from, without the path component
static const std::string optPrintPerFileStats
description: the option to turn on printing of i/o statistics at the end of each file rationale: whil...
TFile * inputFile() const override
description: the file we are reading the current tree from guarantee: no-fail
::StatusCode openInputFile(const std::string &inputFileUrl) override
open the given input file without processing it
static const std::string optMemResidentPerEventIncreaseLimit
The minimal per-event resident memory increase for triggering an error.
bool m_algorithmsInitialized
whether the algorithms are initialized
BatchJob * m_batchJob
the BatchJob configuration (if used)
void close()
close this file
static const std::string optFactoryPreload
a boolean flag for whether to perform a component factory preload
std::unique_ptr< TFile > m_inputFile
the input file pointer of the currently opened filed
std::unique_ptr< TTree > m_jobStats
Tree saving per-job statistics information.
static const std::string optXAODSummaryReport
the option to turn on/off the xAOD summary reporting at the end of the job
static const std::string optXAODInput
the option to select whether our input is xAODs
std::map< std::string, std::shared_ptr< Detail::OutputStreamData > > m_outputs
the list of output files
static bool fileOpenErrorFilter(int level, bool, const char *, const char *)
Error handler for file opening.
static const std::string optStreamAliases
an option for stream aliases
const SH::MetaObject * metaData() const override
description: the sample meta-data we are working on guarantee: no-fail invariant: metaData !...
POOL::TEvent event(POOL::TEvent::kClassAccess)
#define RCU_REQUIRE_SOFT(x)
void setSegmentName(const std::string &val_segmentName)
set the segment name
void setOutputHist(const std::string &val_outputTarget)
set the histogram output list
static const std::string optCacheSize
description: this option allows to configure the TTreeCache size for this job.
xAOD::TStore * m_tstore
the TStore structure, if we use one
static const std::string optXAODPerfStats
description: the name of the option for turning on XAODPerfStats.
std::unique_ptr< TFile > openFile(const std::string &name, const MetaObject &options)
open a file with the given options
static constexpr Long64_t eof
the special value to indicate that the range includes all events until the end of the file
std::vector< asg::AsgComponentConfig > m_moduleConfig
the module configurations we use
static const std::string optCacheLearnEntries
description: this option allows to configure the number of tree entries used for learning cache behav...
static const std::string optMemFailOnLeak
Failure behaviour of the code when a "significant memory leak" is found.
Long64_t inputFileNumEntries() const override
the number of events in the input file
void setJobConfig(JobConfig &&jobConfig)
set the JobConfig
static const std::string optAlgorithmTimer
a boolean flag for whether to add a timer for the algorithms
static const std::string optMemResidentIncreaseLimit
The minimal resident memory increase necessary to trigger an error.
static const std::string histogramStreamName
the name of the histogram output stream
static const std::string optAlgorithmMemoryMonitor
a boolean flag for whether to add a memory monitor for the algorithms
::StatusCode addOutputStream(const std::string &label, Detail::OutputStreamData output)
effects: add another output file guarantee: strong failures: low level errors II failures: label alre...
bool SetDirectory(TObject *object, TDirectory *directory)
effects: set the directory this object is associated with returns: whether the object type actively k...
Run a MT piece of code with an alternate root error handler.
uint64_t m_inputTreeEntry
the entry in the input tree we are currently looking at
std::vector< Detail::AlgorithmData > m_algs
the list of algorithms
std::string m_inputFileUrl
the input file url of the currently opened file
OutputStreamData * m_histOutput
the histogram output stream
uint64_t m_eventsProcessed
the number of events that have been processed
#define RCU_DESTROY_INVARIANT(x)
xAOD::TEvent * m_tevent
the TEvent structure, if we use one
const OutputStream * outputIter
bool m_skipEvent
whether we are skipping the current event
#define RCU_CHANGE_INVARIANT(x)
void setMetaData(const SH::MetaObject *val_metaData)
set the metaData
Long64_t treeEntry() const override
description: the entry in the tree we are reading guarantee: no-fail
#define RCU_THROW_MSG(message)
static const std::string optSkipEvents
description: the name of the option used for skipping a certain number of events in the beginning rat...
::StatusCode initialize()
initialize the worker
void saveOutput()
write the list of output objects to disk and clear it
Worker * m_worker
the worker (to pass on to the algorithms)
static const std::string optMemVirtualPerEventIncreaseLimit
The minimal per-event virtual memory increase for triggering an error.
const SH::MetaObject * m_metaData
the meta-data we use
#define RCU_READ_INVARIANT(x)
void report_exception(std::exception_ptr eptr)
print out the currently evaluated exception
TTree * tree() const override
description: the tree we are running on guarantee: no-fail
static const std::string optMemVirtualIncreaseLimit
The minimal virtual memory increase necessary to trigger an error.
void addOutputList(const std::string &name, TObject *output_swallow) override
effects: add a given object to the output.
::StatusCode processInputs()
process all the inputs
static const std::string optGridReporting
whether to use grid reporting even when not running on the grid
std::string m_segmentName
the name of the segment we are processing
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
#define RCU_NEW_INVARIANT(x)