Skip to content

EventLoop: add possiblity to execute final checks on job output files just before job completion

Romain Bouquet requested to merge (removed):bouquet_21.2_workerFinalCommand into 21.2

This MR enables to add the possibilty for the user to perform some checks/actions on the output files produced by interactive (DirectDriver) or batch (CondorDriver and so on) jobs just before the jobs finish successfully. The output files are all already closed when performing the check.

The command/executable name or path has to be set by the user using the flag EL::Job::optWorkerPostClosedOutputsExecutable

job->options()->setString(EL::Job::optWorkerPostClosedOutputsExecutable, NameExecutable);

For instance a really simple "executable" can be the echo command

job->options()->setString(EL::Job::optWorkerPostClosedOutputsExecutable, "echo");

For each output of the job, the executable will be called and will be provided by EventLoop the 2 following arguments:

  • the output label name (e.g. HISTOGRAM and so on)
  • the associated output file name

This optionnal final command line can be useful for instance to check that the output files produced by the job are not corrupted providing a script that check root files and their content (see comment !53986 (comment 5637319) below).

I tested successfully the MR with the CxAODFramework and it is working as intended both with the DirectDriver and the CondorDriver

Tagging @krumnack and @akraszna on this MR

Edited by Romain Bouquet

Merge request reports