 |
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 24 of file Worker.h.
◆ OutputHistMapIter
the output map
Definition at line 410 of file Worker.h.
◆ OutputTreeMapIter
description: the list of output trees
Definition at line 417 of file Worker.h.
◆ GridErrorCodes
Enumerator |
---|
EC_FAIL | |
EC_ABORT | |
EC_NOTFINISHED | |
EC_BADINPUT | |
Definition at line 249 of file Worker.h.
◆ ~Worker()
effects: standard destructor guarantee: no-fail
Definition at line 79 of file Worker.cxx.
◆ Worker()
standard constructor
- Guarantee
- strong
- Failures
- out of memory I
Definition at line 323 of file Worker.cxx.
◆ addModule()
void EL::Worker::addModule |
( |
std::unique_ptr< Detail::Module > |
module | ) |
|
|
protected |
add the given module to this worker
- Guarantee
- strong
- Failures
- out of memory I
Definition at line 760 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 87 of file Worker.cxx.
90 std::unique_ptr<TObject>
output (output_swallow);
96 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 101 of file Worker.cxx.
104 std::unique_ptr<TObject>
output (output_swallow);
110 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 712 of file Worker.cxx.
716 using namespace msgEventLoop;
722 return ::StatusCode::FAILURE;
724 if (
data.file() ==
nullptr)
726 ANA_MSG_ERROR (
"output stream does not have a file attached");
727 return ::StatusCode::FAILURE;
729 if (
data.mainStreamName().empty())
731 m_outputs.insert (std::make_pair (
label, std::make_shared<Detail::OutputStreamData>(std::move (
data))));
732 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 154 of file Worker.cxx.
157 using namespace msgEventLoop;
165 return ::StatusCode::FAILURE;
168 outputIter->second->addClone (
tree);
171 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 816 of file Worker.cxx.
819 using namespace msgEventLoop;
824 std::unique_ptr<TFile>
file (TFile::Open (confFile,
"READ"));
825 if (
file.get() ==
nullptr ||
file->IsZombie())
828 return ::StatusCode::FAILURE;
831 std::unique_ptr<BatchJob>
job (
dynamic_cast<BatchJob*
>(
file->Get (
"job")));
832 if (
job.get() ==
nullptr)
835 return ::StatusCode::FAILURE;
838 if (job_id >=
job->segments.size())
840 ANA_MSG_ERROR (
"invalid job-id " << job_id <<
", max is " <<
job->segments.size());
841 return ::StatusCode::FAILURE;
843 BatchSegment *
segment = &
job->segments[job_id];
848 gSystem->Exec (
"pwd");
849 gSystem->MakeDirectory (
"output");
860 Detail::OutputStreamData
data {
866 auto module = std::make_unique<Detail::BatchInputModule> (
"BatchInputModule");
879 std::ostringstream job_name;
881 std::ofstream
completed ((
job->location +
"/status/completed-" + job_name.str()).c_str());
882 return ::StatusCode::SUCCESS;
886 return ::StatusCode::FAILURE;
◆ directExecute()
run the job
- Guarantee
- basic
Definition at line 770 of file Worker.cxx.
774 using namespace msgEventLoop;
791 Detail::OutputStreamData
data {
792 out->output()->makeWriter (
sample->name(),
"",
".root")};
797 auto module = std::make_unique<Detail::DirectInputModule> (
"DirectInputModule");
811 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 751 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 611 of file Worker.cxx.
615 if (strstr (
s2,
"no streamer or dictionary") !=
nullptr) {
620 if(
level > kWarning ) {
622 std::string
msg =
"ROOT error detected in Worker.cxx: ";
626 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 305 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 480 of file Worker.cxx.
483 using namespace msgEventLoop;
490 return StatusCode::FAILURE;
500 output.second->saveOutput ();
502 std::string
path =
output.second->finalFileName ();
509 if (
m_jobStats->GetListOfBranches()->GetEntries() > 0)
514 return ::StatusCode::FAILURE;
516 ModuleData::addOutput (std::move (
m_jobStats));
528 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 282 of file Worker.cxx.
289 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 130 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 142 of file Worker.cxx.
149 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 118 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 176 of file Worker.cxx.
179 using namespace msgEventLoop;
189 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 892 of file Worker.cxx.
895 using namespace msgEventLoop;
898 ANA_MSG_INFO (
"Running with ROOT version " << gROOT->GetVersion()
899 <<
" (" << gROOT->GetVersionDate() <<
")");
908 std::unique_ptr<TFile>
f (TFile::Open(
"jobdef.root"));
909 if (
f ==
nullptr ||
f->IsZombie()) {
911 return ::StatusCode::FAILURE;
919 return ::StatusCode::FAILURE;
926 return ::StatusCode::FAILURE;
930 std::unique_ptr<TList> outs ((TList*)
f->Get(
"outputs"));
934 return ::StatusCode::FAILURE;
937 TIter itr(outs.get());
939 while ((
obj = itr())) {
945 ANA_MSG_ERROR (
"Encountered unexpected entry in list of outputs");
946 return ::StatusCode::FAILURE;
954 const std::string location =
".";
964 TIter itr(&bigOutputs);
966 while ((
obj = itr())) {
971 return ::StatusCode::FAILURE;
974 Detail::OutputStreamData
data {
975 location +
"/" +
os->label() +
".root",
"RECREATE"};
984 auto module = std::make_unique<Detail::DirectInputModule> (
"DirectInputModule");
985 std::ifstream
infile(
"input.txt");
988 if (!getline(
infile, sLine))
break;
989 std::istringstream ssLine(sLine);
992 if (!getline(ssLine, sFile,
','))
break;
993 module->fileList.push_back(sFile);
996 if (
module->fileList.size() == 0) {
1019 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 376 of file Worker.cxx.
379 using namespace msgEventLoop;
386 m_modules.push_back (std::make_unique<Detail::MemoryMonitorModule> (
"EarlyMemoryMonitorModule"));
388 m_modules.push_back (std::make_unique<Detail::TEventModule> (
"TEventModule"));
390 if (!factoryPreload.empty())
392 auto module = std::make_unique<Detail::FactoryPreloadModule> (
"FactoryPreloadModule");
393 module->preloader = factoryPreload;
396 m_modules.push_back (std::make_unique<Detail::LeakCheckModule> (
"LeakCheckModule"));
397 m_modules.push_back (std::make_unique<Detail::StopwatchModule> (
"StopwatchModule"));
399 m_modules.push_back (std::make_unique<Detail::GridReportingModule>(
"GridReportingModule"));
401 m_modules.push_back (std::make_unique<Detail::AlgorithmTimerModule> (
"AlgorithmTimerModule"));
403 m_modules.push_back (std::make_unique<Detail::AlgorithmMemoryModule> (
"AlgorithmMemoryModule"));
404 m_modules.push_back (std::make_unique<Detail::FileExecutedModule> (
"FileExecutedModule"));
405 m_modules.push_back (std::make_unique<Detail::EventCountModule> (
"EventCountModule"));
406 m_modules.push_back (std::make_unique<Detail::WorkerConfigModule> (
"WorkerConfigModule"));
407 m_modules.push_back (std::make_unique<Detail::AlgorithmStateModule> (
"AlgorithmStateModule"));
408 m_modules.push_back (std::make_unique<Detail::PostClosedOutputsModule> (
"PostClosedOutputsModule"));
410 m_modules.push_back (std::make_unique<Detail::MemoryMonitorModule> (
"LateMemoryMonitorModule"));
414 Detail::OutputStreamData
data {
423 std::istringstream iss (aliases);
425 while (std::getline (iss,
alias,
','))
428 if (
pos == std::string::npos)
431 return ::StatusCode::FAILURE;
433 auto aliasName =
alias.substr (0,
pos);
434 auto realName =
alias.substr (
pos + 1);
435 auto realOutput =
m_outputs.find (realName);
438 ANA_MSG_ERROR (
"output stream " << realName <<
" not found for alias " << aliasName);
439 return ::StatusCode::FAILURE;
441 auto [aliasOutput, success] =
m_outputs.emplace (aliasName, realOutput->second);
444 ANA_MSG_ERROR (
"output stream " << aliasName <<
" already exists, can't make alias");
445 return ::StatusCode::FAILURE;
451 (
"EventLoop_JobStats",
"EventLoop job statistics");
454 ANA_MSG_INFO (
"calling firstInitialize on all modules");
457 ANA_MSG_INFO (
"calling preFileInitialize on all modules");
461 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 226 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 235 of file Worker.cxx.
241 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 199 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 636 of file Worker.cxx.
639 using namespace msgEventLoop;
647 return ::StatusCode::SUCCESS;
664 if (inputFileUrl.empty())
665 return ::StatusCode::SUCCESS;
680 module->reportInputFailure (*
this);
681 return ::StatusCode::FAILURE;
687 module->reportInputFailure (*
this);
688 return ::StatusCode::FAILURE;
698 ANA_MSG_INFO (
"treating this like a tree with no events");
707 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 533 of file Worker.cxx.
536 using namespace msgEventLoop;
548 return ::StatusCode::FAILURE;
556 return ::StatusCode::FAILURE;
575 if (eventRange.m_beginEvent == 0)
581 ANA_MSG_INFO (
"Processing events " << eventRange.m_beginEvent <<
"-" << eventRange.m_endEvent <<
" in file " << eventRange.m_url);
590 if (
module->onExecute (*this).isFailure())
593 return ::StatusCode::FAILURE;
606 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 466 of file Worker.cxx.
469 using namespace msgEventLoop;
475 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 364 of file Worker.cxx.
368 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 344 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 354 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 296 of file Worker.cxx.
◆ testInvariant()
void EL::Worker::testInvariant |
( |
| ) |
const |
effects: test the invariant of this object guarantee: no-fail
Definition at line 67 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 208 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 217 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 249 of file Worker.cxx.
253 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 258 of file Worker.cxx.
◆ xaodStore()
◆ m_algorithmsInitialized
bool EL::Worker::m_algorithmsInitialized {false} |
|
private |
whether the algorithms are initialized
Definition at line 444 of file Worker.h.
◆ m_algs
◆ 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 449 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_modules
the list of modules we hold
Definition at line 423 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 429 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 434 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 439 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
std::string inputFileName() const override
the name of the file we are reading the current tree from, without the path component
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
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 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
xAOD::TStore * m_tstore
the TStore structure, if we use one
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
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 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)
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
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)