ATLAS Offline Software
PrunDriver.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 
9 
11 #include <EventLoop/Algorithm.h>
12 #include <EventLoop/ManagerData.h>
13 #include <EventLoop/ManagerStep.h>
14 #include <EventLoop/Job.h>
15 #include <EventLoop/MessageCheck.h>
16 #include <EventLoop/OutputStream.h>
18 #include <RootCoreUtils/Assert.h>
19 #include <RootCoreUtils/hadd.h>
23 #include <SampleHandler/Sample.h>
27 
28 
29 #include <TList.h>
30 #include <TPython.h>
31 #include <TROOT.h>
32 #include <TFile.h>
33 #include <TSystem.h>
34 
35 #include <algorithm>
36 #include <cstdlib>
37 #include <iostream>
38 #include <sstream>
39 #include <string>
40 #include <vector>
41 #include <stdexcept>
42 
43 #include <boost/algorithm/string.hpp>
44 
45 #include "pool.h"
46 #include <mutex>
47 
49 
50 namespace {
51  namespace JobState {
52  static const unsigned int NSTATES = 6;
53  enum Enum { INIT=0, RUN=1, DOWNLOAD=2, MERGE=3, FINISHED=4, FAILED=5 };
54  static const char* name[NSTATES] =
55  { "INIT", "RUNNING", "DOWNLOAD", "MERGE", "FINISHED", "FAILED" };
56  Enum parse(const std::string& what)
57  {
58  for (unsigned int i = 0; i != NSTATES; ++i) {
59  if (what == name[i]) { return static_cast<Enum>(i); }
60  }
61  RCU_ASSERT0("Failed to parse job state string");
62  throw std::runtime_error("PrunDriver.cxx: Failed to parse job state string"); //compiler dummy
63  }
64  }
65 
66  // When changing the values in the enum make sure
67  // corresponding values in `data/ELG_jediState.py` script
68  // are changed accordingly
69  namespace Status {
70  //static const int NSTATES = 3;
71  enum Enum { DONE=0, PENDING=1, FAIL=2 };
72  }
73 
74  struct TransitionRule {
75  JobState::Enum fromState;
76  Status::Enum status;
77  JobState::Enum toState;
78  TransitionRule(JobState::Enum fromState,
79  Status::Enum status,
80  JobState::Enum toState)
81  : fromState(fromState)
82  , status(status)
83  , toState(toState)
84  {
85  }
86  };
87 
88  struct TmpCd {
89  const std::string origDir;
90  TmpCd(const std::string & dir)
91  : origDir(gSystem->pwd())
92  {
93  gSystem->cd(dir.c_str());
94  }
95  ~TmpCd()
96  {
97  gSystem->cd(origDir.c_str());
98  }
99  };
100 }
101 
102 static JobState::Enum sampleState(SH::Sample* sample)
103 {
105  static const std::string defaultState = JobState::name[JobState::INIT];
106  std::string label = sample->meta()->castString ("nc_ELG_state", defaultState, SH::MetaObject::CAST_NOCAST_DEFAULT);
107  return JobState::parse(label);
108 }
109 
110 static JobState::Enum nextState(JobState::Enum state, Status::Enum status)
111 {
113  RCU_REQUIRE(state != JobState::FAILED);
114  static const TransitionRule TABLE[] =
115  {
116  TransitionRule(JobState::INIT, Status::DONE, JobState::RUN),
117  TransitionRule(JobState::INIT, Status::PENDING, JobState::INIT),
118  TransitionRule(JobState::INIT, Status::FAIL, JobState::FAILED),
119  TransitionRule(JobState::RUN, Status::DONE, JobState::DOWNLOAD),
120  TransitionRule(JobState::RUN, Status::PENDING, JobState::RUN),
121  TransitionRule(JobState::RUN, Status::FAIL, JobState::FAILED),
122  TransitionRule(JobState::DOWNLOAD, Status::DONE, JobState::MERGE),
123  TransitionRule(JobState::DOWNLOAD, Status::PENDING, JobState::DOWNLOAD),
124  TransitionRule(JobState::DOWNLOAD, Status::FAIL, JobState::FAILED),
125  TransitionRule(JobState::MERGE, Status::DONE, JobState::FINISHED),
126  TransitionRule(JobState::MERGE, Status::PENDING, JobState::MERGE),
127  TransitionRule(JobState::MERGE, Status::FAIL, JobState::DOWNLOAD)
128  };
129  static const unsigned int TABLE_SIZE = sizeof(TABLE) / sizeof(TABLE[0]);
130  for (unsigned int i = 0; i != TABLE_SIZE; ++i) {
131  if (TABLE[i].fromState == state && TABLE[i].status == status) {
132  return TABLE[i].toState;
133  }
134  }
135  RCU_ASSERT0("Missing state transition rule");
136  throw std::logic_error("PrunDriver.cxx: Missing state transition rule");
137 }
138 
139 static SH::MetaObject defaultOpts()
140 {
141  SH::MetaObject o;
142  o.setString("nc_nGBPerJob", "MAX");
143  o.setString("nc_mergeOutput", "true");
144  o.setString("nc_cmtConfig", gSystem->ExpandPathName("$AnalysisBase_PLATFORM"));
145  o.setString("nc_useAthenaPackages", "true");
146  const std::string mergestr = "elg_merge jobdef.root %OUT %IN";
147  o.setString("nc_mergeScript", mergestr);
148  return o;
149 }
150 
151 static bool downloadContainer(const std::string& name,
152  const std::string& location)
153 {
154  RCU_ASSERT(not name.empty());
155  RCU_ASSERT(name[name.size()-1] == '/');
156  RCU_ASSERT(not location.empty());
157 
158  try {
159  gSystem->Exec(Form("mkdir -p %s", location.c_str()));
160 
161  std::vector<std::string> datasets;
162  for (auto& entry : SH::rucioListDids (name))
163  {
164  if (entry.type == "CONTAINER" || entry.type == "DIDType.CONTAINER")
165  datasets.push_back (entry.name);
166  }
167 
168  auto downloadResult = SH::rucioDownloadList (location, datasets);
169  for (const auto& result : downloadResult)
170  {
171  if (result.notDownloaded != 0)
172  return false;
173  }
174  } catch (...) {
175  return false;
176  }
177  return true;
178 }
179 
180 static Status::Enum submit(SH::Sample* const sample)
181 {
183 
184  std::cout << "Submitting " << sample->name() << "...\n";
185 
186  static bool loaded = false;
187  if (not loaded) {
188  // TString path = "$ROOTCOREBIN/python/EventLoopGrid/ELG_prun.py";
189  // gSystem->ExpandPathName(path);
190  // TPython::LoadMacro(path.Data());
191  std::string path = PathResolverFindCalibFile("EventLoopGrid/ELG_prun.py");
192  TPython::LoadMacro(path.c_str());
193  loaded = true;
194  }
195 
196  TPython::Bind(dynamic_cast<TObject*>(sample), "ELG_SAMPLE");
197  int ret = TPython::Eval("ELG_prun(ELG_SAMPLE)");
198  TPython::Bind(0, "ELG_SAMPLE");
199 
200  if (ret < 100) {
201  sample->meta()->setString("nc_ELG_state_details",
202  "problem submitting");
203  return Status::FAIL;
204  }
205 
206  sample->meta()->setDouble("nc_jediTaskID", ret);
207 
208  return Status::DONE;
209 }
210 
211 static Status::Enum checkPandaTask(SH::Sample* const sample)
212 {
214  RCU_REQUIRE(static_cast<int>(sample->meta()->castDouble("nc_jediTaskID",0, SH::MetaObject::CAST_NOCAST_DEFAULT)) > 100);
215 
216  static bool loaded = false;
217  if (not loaded) {
218  std::string path = PathResolverFindCalibFile("EventLoopGrid/ELG_jediState.py");
219  TPython::LoadMacro(path.c_str());
220  loaded = true;
221  }
222 
223  TPython::Bind(dynamic_cast<TObject*>(sample), "ELG_SAMPLE");
224  int ret = TPython::Eval("ELG_jediState(ELG_SAMPLE)");
225  TPython::Bind(0, "ELG_SAMPLE");
226 
227  if (ret == Status::DONE) return Status::DONE;
228  if (ret == Status::FAIL) return Status::FAIL;
229 
230  // Value 90 corresponds to `running` state of the job
231  if (ret != 90) { sample->meta()->setString("nc_ELG_state_details", "task status other than done/finished/failed/running"); }
232  // Value 99 is returned if there is error in the script (import, missing ID)
233  if (ret == 99) {
234  sample->meta()->setString("nc_ELG_state_details",
235  "problem checking jedi task status");
236  }
237 
238  return Status::PENDING;
239 }
240 
241 static Status::Enum download(SH::Sample* const sample)
242 {
244 
245  {
246  static std::mutex mutex;
247  std::lock_guard<std::mutex> lock(mutex);
248  std::cout << "Downloading output from: "
249  << sample->name() << "..." << std::endl;
250  }
251 
252  std::string container = sample->meta()->castString("nc_outDS", "", SH::MetaObject::CAST_NOCAST_DEFAULT);
253  RCU_ASSERT(not container.empty());
254  if (container[container.size()-1] == '/') {
255  container.resize(container.size() - 1);
256  }
257  container += "_hist/";
258 
259  bool downloadOk = downloadContainer(container, "elg/download/" + container);
260 
261  if (not downloadOk) {
262  std::cerr << "Failed to download one or more files" << std::endl;
263  sample->meta()->setString("nc_ELG_state_details",
264  "error, check log for details");
265  return Status::PENDING;
266  }
267 
268  return Status::DONE;
269 }
270 
271 static Status::Enum merge(SH::Sample* const sample)
272 {
274 
275  std::string container = sample->meta()->castString("nc_outDS", "", SH::MetaObject::CAST_NOCAST_DEFAULT);
276  RCU_ASSERT(not container.empty());
277  if (container[container.size()-1] == '/') {
278  container.resize(container.size() - 1);
279  }
280  container += "_hist/";
281  const std::string dir = "elg/download/" + container;
282 
283  const std::string fileName = "hist-output.root";
284 
285  const std::string target = Form("hist-%s.root", sample->name().c_str());
286 
287  const std::string findCmd(Form("find %s -name \"*.%s*\" | tr '\n' ' '",
288  dir.c_str(), fileName.c_str()));
289  std::istringstream input(gSystem->GetFromPipe(findCmd.c_str()).Data());
290  std::vector<std::string> files((std::istream_iterator<std::string>(input)),
291  std::istream_iterator<std::string>());
292 
293  std::sort(files.begin(), files.end());
294  RCU_ASSERT(std::unique(files.begin(), files.end()) == files.end());
295 
296  if (not files.size()) {
297  std::cerr << "Found no input files for merging! "
298  << "Requeueing sample for download..." << std::endl;
299  sample->meta()->setString("nc_ELG_state_details", "retry, files were lost");
300  return Status::FAIL;
301  }
302 
303  try {
304  RCU::hadd(target.c_str(), files);
305  } catch (...) {
306  sample->meta()->setString("nc_ELG_state_details",
307  "error, check log for details");
308  gSystem->Exec(Form("rm -f %s", target.c_str()));
309  return Status::PENDING;
310  }
311 
312  for (size_t i = 0; i != files.size(); ++i) {
313  gSystem->Exec(Form("rm %s", files[i].c_str()));
314  }
315  gSystem->Exec(Form("rmdir %s/*", dir.c_str()));
316  gSystem->Exec(Form("rmdir %s", dir.c_str()));
317 
318  return Status::DONE;
319 }
320 
321 static void processTask(SH::Sample* const sample)
322 {
324 
325  JobState::Enum state = sampleState(sample);
326 
327  sample->meta()->setString("nc_ELG_state_details", "");
328 
329  Status::Enum status = Status::PENDING;
330  switch (state) {
331  case JobState::INIT:
332  status = submit(sample);
333  break;
334  case JobState::RUN:
335  status = checkPandaTask(sample);
336  break;
337  case JobState::DOWNLOAD:
338  status = download(sample);
339  break;
340  case JobState::MERGE:
341  status = merge(sample);
342  break;
343  case JobState::FINISHED:
344  case JobState::FAILED:
345  break;
346  }
347 
348  state = nextState(state, status);
349  sample->meta()->setString("nc_ELG_state", JobState::name[state]);
350 }
351 
352 static void processAllInState(const SH::SampleHandler& sh, JobState::Enum state,
353  const size_t nThreads)
354 {
355  RCU_REQUIRE(sh.size());
356 
357  WorkList workList;
358  for (SH::SampleHandler::iterator s = sh.begin(); s != sh.end(); ++s) {
359  if (sampleState(*s) == state) {
360  workList.push_back([s]()->void{ processTask(*s); });
361  }
362  }
363  process(workList, nThreads);
364 
365 }
366 
367 static std::string formatOutputName(const SH::MetaObject& sampleMeta,
368  const std::string & pattern)
369 {
370  const std::string sampleName = sampleMeta.castString("sample_name");
371  RCU_REQUIRE(not pattern.empty());
372 
373  static const std::string nickname =
374  gSystem->GetFromPipe(Form("python -c \"%s\" 2>/dev/null",
375  "from pandatools import PsubUtils;"
376  "print(PsubUtils.getNickname());")).Data();
377 
378  TString out = pattern.c_str();
379 
380  out.ReplaceAll("%nickname%", nickname);
381  out.ReplaceAll("%in:name%", sampleName);
382 
383  std::stringstream ss(sampleName);
384  std::string item;
385  int field = 0;
386  while(std::getline(ss, item, '.')) {
387  std::stringstream sskey;
388  sskey << "%in:name[" << ++field << "]%";
389  out.ReplaceAll(sskey.str(), item);
390  }
391  while (out.Index("%in:") != -1) {
392  int i1 = out.Index("%in:");
393  int i2 = out.Index("%", i1+1);
394  TString metaName = out(i1+4, i2-i1-4);
395  out.ReplaceAll("%in:"+metaName+"%",
396  sampleMeta.castString(std::string(metaName.Data())));
397  }
398  out.ReplaceAll("/", "");
399  return out.Data();
400 }
401 
402 std::string outputFileNames(const EL::Job& job)
403 {
404  TList outputs;
405  for (EL::Job::outputIter out = job.outputBegin(),
406  end = job.outputEnd(); out != end; ++out) {
407  outputs.Add(out->Clone());
408  }
409  std::string out = "hist:hist-output.root";
410  TIter itr(&outputs);
411  TObject *obj = 0;
412  while ((obj = itr())) {
413  EL::OutputStream *os = dynamic_cast<EL::OutputStream*>(obj);
414  const std::string name = os->label() + ".root";
415  const std::string ds =
416  os->options()->castString(EL::OutputStream::optContainerSuffix);
417  out += "," + (ds.empty() ? name : ds + ":" + name);
418  }
419  return out;
420 }
421 
422 // Save algortihms and lists of inputs and outputs to a root file
423 static void saveJobDef(const std::string& fileName,
424  const EL::Job& job,
425  const SH::SampleHandler sh)
426 {
427  TFile file(fileName.c_str(), "RECREATE");
428  TList outputs;
429  for (EL::Job::outputIter o = job.outputBegin(); o !=job.outputEnd(); ++o)
430  outputs.Add(o->Clone());
431  file.WriteTObject(&job.jobConfig(), "jobConfig", "SingleKey");
432  file.WriteTObject(&outputs, "outputs", "SingleKey");
433  bool haveDefault = false;
434  for (SH::SampleHandler::iterator s = sh.begin(); s != sh.end(); ++s) {
435  const SH::MetaObject& meta = *((*s)->meta());
436  file.WriteObject(&meta, meta.castString("sample_name").c_str());
437  if (!haveDefault)
438  {
439  file.WriteObject (&meta, "defaultMetaObject");
440  haveDefault = true;
441  }
442  }
443 }
444 
445 // Create a sample handler with grid locations of outputs with given label
446 static SH::SampleHandler outputSH(const SH::SampleHandler& in,
447  const std::string& outputLabel)
448 {
450  const std::string outputFile = "*" + outputLabel + ".root*";
451  const std::string outDSSuffix = '_' + outputLabel + ".root/";
452  for (SH::SampleHandler::iterator s = in.begin(); s != in.end(); ++s) {
453  SH::SampleGrid* outSample = new SH::SampleGrid((*s)->name());
454  const std::string outputDS = (*s)->meta()->castString("nc_outDS", "", SH::MetaObject::CAST_NOCAST_DEFAULT) + outDSSuffix;
455  outSample->meta()->setString("nc_grid", outputDS);
456  outSample->meta()->setString("nc_grid_filter", outputFile);
457  out.add(outSample);
458  }
459  out.fetch(in);
460  return out;
461 }
462 
464 {
465  RCU_INVARIANT(this != 0);
466 }
467 
469 {
470  RCU_NEW_INVARIANT(this);
471 }
472 
475 {
476  using namespace msgEventLoop;
478  switch (data.step)
479  {
481  {
482  const std::string jobELGDir = data.submitDir + "/elg";
483  const std::string runShFile = jobELGDir + "/runjob.sh";
484  //const std::string runShOrig = "$ROOTCOREBIN/data/EventLoopGrid/runjob.sh";
485  const std::string mergeShFile = jobELGDir + "/elg_merge";
486  //const std::string mergeShOrig =
487  // "$ROOTCOREBIN/user_scripts/EventLoopGrid/elg_merge";
488  const std::string runShOrig = PathResolverFindCalibFile("EventLoopGrid/runjob.sh");
489  const std::string mergeShOrig = PathResolverFindCalibFile("EventLoopGrid/elg_merge");
490 
491  const std::string jobDefFile = jobELGDir + "/jobdef.root";
492  gSystem->Exec(Form("mkdir -p %s", jobELGDir.c_str()));
493  gSystem->Exec(Form("cp %s %s", runShOrig.c_str(), runShFile.c_str()));
494  gSystem->Exec(Form("chmod +x %s", runShFile.c_str()));
495  gSystem->Exec(Form("cp %s %s", mergeShOrig.c_str(), mergeShFile.c_str()));
496  gSystem->Exec(Form("chmod +x %s", mergeShFile.c_str()));
497 
498  // create symbolic links for additionnal files/directories if any to ship to the grid
499  std::string listToShipToGrid = data.options.castString(EL::Job::optGridPrunShipAdditionalFilesOrDirs, "");
500  // parse the list of comma separated files and/or directories to ship to the grid
501  if (listToShipToGrid.size()){
502  ANA_MSG_INFO (
503  "Creating symbolic links for additional files or directories to be sent to grid.\n"
504  "For root or heavy files you should also add their name (not the full path) to EL::Job::optUserFiles.\n"
505  "Otherwise prun ignores those files."
506  );
507 
508  std::vector<std::string> vect_filesOrDirToShip;
509  // split string based on comma separators
510  boost::split(vect_filesOrDirToShip,listToShipToGrid,boost::is_any_of(","));
511 
512  // Create symbolic links of files or directories to the submission directory
513  for (const std::string & fileOrDirToShip: vect_filesOrDirToShip){
514  ANA_MSG_INFO (("Creating symbolic link for: " +fileOrDirToShip).c_str());
515  RCU::Shell::exec("ln -sf " + fileOrDirToShip + " " + jobELGDir);
516  }
517  ANA_MSG_INFO ("Finished creation of symbolic links");
518  }
519 
520  const SH::SampleHandler& sh = data.job->sampleHandler();
521 
522  for (SH::SampleHandler::iterator s = sh.begin(); s != sh.end(); ++s) {
523  SH::MetaObject& meta = *(*s)->meta();
524  meta.fetchDefaults(data.options);
525  meta.fetchDefaults(defaultOpts());
526  meta.setString("nc_outputs", outputFileNames(*data.job));
527  std::string outputSampleName = meta.castString("nc_outputSampleName");
528  if (outputSampleName.empty()) {
529  outputSampleName = "user.%nickname%.%in:name%";
530  }
531  meta.setString("nc_outDS", formatOutputName(meta, outputSampleName));
532  meta.setString("nc_inDS", meta.castString("nc_grid", (*s)->name()));
533  meta.setString("nc_writeInputToTxt", "IN:input.txt");
534  meta.setString("nc_match", meta.castString("nc_grid_filter"));
535  const std::string execstr = "runjob.sh " + (*s)->name();
536  meta.setString("nc_exec", execstr);
537  }
538 
539  saveJobDef(jobDefFile, *data.job, sh);
540 
541  for (EL::Job::outputIter out = data.job->outputBegin();
542  out != data.job->outputEnd(); ++out) {
543  SH::SampleHandler shOut = outputSH(sh, out->label());
544  shOut.save(data.submitDir + "/output-" + out->label());
545  }
546  SH::SampleHandler shHist = outputSH(sh, "hist-output");
547  shHist.save(data.submitDir + "/output-hist");
548 
549  TmpCd keepDir(jobELGDir);
550 
551  processAllInState(sh, JobState::INIT, 0);
552 
553  sh.save(data.submitDir + "/input");
554  data.submitted = true;
555  }
556  break;
557 
559  {
560  ANA_CHECK (doRetrieve (data));
561  }
562  break;
563 
564  default:
565  (void) true; // safe to do nothing
566  }
567  return ::StatusCode::SUCCESS;
568 }
569 
571 {
572  RCU_READ_INVARIANT(this);
573  RCU_REQUIRE(not data.submitDir.empty());
574 
575  TmpCd tmpDir(data.submitDir);
576 
578  sh.load("input");
579  RCU_ASSERT(sh.size());
580 
581  const size_t nRunThreads = options()->castDouble("nc_run_threads", 0);
582  const size_t nDlThreads = options()->castDouble("nc_download_threads", 0);
583  processAllInState(sh, JobState::INIT, 0);
584  processAllInState(sh, JobState::RUN, nRunThreads);
585  processAllInState(sh, JobState::DOWNLOAD, nDlThreads);
586  processAllInState(sh, JobState::MERGE, 0);
587 
588  sh.save("input");
589 
590  std::cout << std::endl;
591 
592  bool allDone = true;
593  for (SH::SampleHandler::iterator s = sh.begin(); s != sh.end(); ++s) {
594  JobState::Enum state = sampleState(*s);
595  std::string details = (*s)->meta()->castString("nc_ELG_state_details", "", SH::MetaObject::CAST_NOCAST_DEFAULT);
596  if (not details.empty()) { details = '(' + details + ')'; }
597 
598  std::cout << (*s)->name() << "\t";
599  switch (state) {
600  case JobState::INIT:
601  case JobState::RUN:
602  case JobState::DOWNLOAD:
603  case JobState::MERGE:
604  std::cout << JobState::name[state] << "\t";
605  break;
606  case JobState::FINISHED:
607  std::cout << "\033[1;32m" << JobState::name[state] << "\033[0m\t";
608  break;
609  case JobState::FAILED:
610  std::cout << "\033[1;31m" << JobState::name[state] << "\033[0m\t";
611  break;
612  }
613  std::cout << details << std::endl;
614 
615  allDone &= (state == JobState::FINISHED || state == JobState::FAILED);
616  }
617 
618  std::cout << std::endl;
619 
620  data.retrieved = true;
621  data.completed = allDone;
622  return ::StatusCode::SUCCESS;
623 }
624 
625 void EL::PrunDriver::status(const std::string& location)
626 {
627  RCU_REQUIRE(not location.empty());
628  TmpCd tmpDir(location);
630  sh.load("input");
631  RCU_ASSERT(sh.size());
632  processAllInState(sh, JobState::RUN, 0);
633  sh.save("input");
634  for (SH::SampleHandler::iterator s = sh.begin(); s != sh.end(); ++s) {
635  JobState::Enum state = sampleState(*s);
636  std::string details = (*s)->meta()->castString("nc_ELG_state_details", "", SH::MetaObject::CAST_NOCAST_DEFAULT);
637  if (not details.empty()) { details = '(' + details + ')'; }
638  std::cout << (*s)->name() << "\t" << JobState::name[state]
639  << "\t" << details << std::endl;
640  }
641 }
642 
643 void EL::PrunDriver::setState(const std::string& location,
644  const std::string& task,
645  const std::string& state)
646 {
647  RCU_REQUIRE(not location.empty());
648  RCU_REQUIRE(not task.empty());
649  RCU_REQUIRE(not state.empty());
650  TmpCd tmpDir(location);
652  sh.load("input");
653  RCU_ASSERT(sh.size());
654  if (not sh.get(task)) {
655  std::cout << "Unknown task: " << task << std::endl;
656  std::cout << "Choose one of: " << std::endl;
657  sh.print();
658  return;
659  }
660  JobState::parse(state);
661  sh.get(task)->meta()->setString("nc_ELG_state", state);
662  sh.save("input");
663 }
mergePhysValFiles.pattern
pattern
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:26
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
EL::Driver::doManagerStep
virtual ::StatusCode doManagerStep(Detail::ManagerData &data) const
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:257
SH::MetaObject::CAST_NOCAST_DEFAULT
@ CAST_NOCAST_DEFAULT
cast and return the default value if the input has the wrong type
Definition: MetaObject.h:78
SH::SampleHandler::iterator
std::vector< Sample * >::const_iterator iterator
the iterator to use
Definition: SampleHandler.h:475
python.compareTCTs.details
details
Definition: compareTCTs.py:214
INIT
#define INIT(__TYPE)
ExceptionMsg.h
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
get_generator_info.result
result
Definition: get_generator_info.py:21
offline_EventStorage_v5::FINISHED
@ FINISHED
Definition: v5_DataWriter.h:42
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:126
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
SH::MetaObject
A class that manages meta-data to be associated with an object.
Definition: MetaObject.h:56
EL::OutputStream
Definition: OutputStream.h:34
SH::rucioListDids
std::vector< RucioListDidsEntry > rucioListDids(const std::string &dataset)
run rucio-list-dids for the given dataset
Definition: GridTools.cxx:348
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
Job.h
DoubleEventSelectorOverlayTest.nThreads
nThreads
Definition: DoubleEventSelectorOverlayTest.py:83
outputLabel
const std::string outputLabel
Definition: OverlapRemovalTester.cxx:69
parse
std::map< std::string, std::string > parse(const std::string &list)
Definition: egammaLayerRecalibTool.cxx:983
RCU_REQUIRE
#define RCU_REQUIRE(x)
Definition: Assert.h:208
EL::PrunDriver::status
static void status(const std::string &location)
Definition: PrunDriver.cxx:625
OutputStream.h
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
SH::SampleHandler::end
iterator end() const
the end iterator to use
SampleHandler.h
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
hadd.h
ShellExec.h
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
EL::PrunDriver::setState
static void setState(const std::string &location, const std::string &task, const std::string &state)
Definition: PrunDriver.cxx:643
Assert.h
MessageCheck.h
SUSY_SimplifiedModel_PostInclude.process
string process
Definition: SUSY_SimplifiedModel_PostInclude.py:42
submit
Definition: submit.py:1
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
SH::SampleHandler::save
void save(const std::string &directory) const
save the list of samples to the given directory
EL::PrunDriver::PrunDriver
PrunDriver()
Definition: PrunDriver.cxx:468
compareGeometries.outputFile
string outputFile
Definition: compareGeometries.py:25
PyPoolBrowser.item
item
Definition: PyPoolBrowser.py:129
WorkList
std::vector< WorkUnit > WorkList
Definition: PhysicsAnalysis/D3PDTools/EventLoopGrid/Root/pool.h:13
RCU::hadd
void hadd(const std::string &output_file, const std::vector< std::string > &input_files, unsigned max_files)
effects: perform the hadd functionality guarantee: basic failures: out of memory III failures: i/o er...
Definition: hadd.cxx:28
EL::PrunDriver
a Driver to submit jobs via prun
Definition: PrunDriver.h:23
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
MetaObject.h
FullCPAlgorithmsTest_eljob.sh
sh
Definition: FullCPAlgorithmsTest_eljob.py:98
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:100
lumiFormat.i
int i
Definition: lumiFormat.py:92
internal_poltrig::MERGE
@ MERGE
Definition: PolygonTriangulator.cxx:112
ret
T ret(T t)
Definition: rootspy.cxx:260
RCU::Shell
Definition: ShellExec.cxx:28
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ManagerData.h
python.sizes.location
string location
Definition: sizes.py:11
Algorithm.h
EL::Job::optGridPrunShipAdditionalFilesOrDirs
static const std::string optGridPrunShipAdditionalFilesOrDirs
Enables to ship additional files to the tarbal sent to the grid Should be a list of comma separated p...
Definition: Job.h:485
mergePhysValFiles.origDir
origDir
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:24
ANA_MSG_INFO
#define ANA_MSG_INFO(xmsg)
Macro printing info messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:290
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
GridTools.h
generateReferenceFile.files
files
Definition: generateReferenceFile.py:12
file
TFile * file
Definition: tile_monitor.h:29
SH::SampleGrid
This class implements a Sample located on the grid.
Definition: SampleGrid.h:44
SH::MetaObject::castString
std::string castString(const std::string &name, const std::string &def_val="", CastMode mode=CAST_ERROR_THROW) const
the meta-data string with the given name
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:379
EL::PrunDriver::doManagerStep
virtual ::StatusCode doManagerStep(Detail::ManagerData &data) const override
Definition: PrunDriver.cxx:474
EL::Detail::ManagerStep::doRetrieve
@ doRetrieve
call the actual doRetrieve method
SH::Sample::meta
MetaObject * meta()
the meta-information for this sample
RCU_INVARIANT
#define RCU_INVARIANT(x)
Definition: Assert.h:201
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
python.CreateTierZeroArgdict.outputs
outputs
Definition: CreateTierZeroArgdict.py:189
SH::Sample
a base class that manages a set of files belonging to a particular data set and the associated meta-d...
Definition: Sample.h:54
SH::MetaObject::setString
void setString(const std::string &name, const std::string &value)
set the meta-data string with the given name
beamspotman.dir
string dir
Definition: beamspotman.py:623
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
PathResolver.h
python.ExitCodes.what
def what(code)
Definition: ExitCodes.py:73
LoadMacro
gROOT LoadMacro("../ISF_FastCaloSimParametrization/MeanAndRMS.h+")
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
PrunDriver.h
SH::SampleHandler::begin
iterator begin() const
the begin iterator to use
item
Definition: ItemListSvc.h:43
SH::MetaObject::fetchDefaults
void fetchDefaults(const MetaObject &source)
fetch the meta-data from the given sample not present in this sample.
SampleGrid.h
EL::OutputStream::optContainerSuffix
static const std::string optContainerSuffix
Definition: OutputStream.h:122
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
EL::PrunDriver::testInvariant
void testInvariant() const
Definition: PrunDriver.cxx:463
pool.h
Athena::Status
Status
Athena specific StatusCode values.
Definition: AthStatusCode.h:22
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
RCU::Shell::exec
void exec(const std::string &cmd)
effects: execute the given command guarantee: strong failures: out of memory II failures: system fail...
Definition: ShellExec.cxx:29
EL::Detail::ManagerData
an internal data structure for passing data between different manager objects anbd step
Definition: ManagerData.h:46
python.logger.FAIL
string FAIL
Definition: PhysicsAnalysis/TopPhys/xAOD/TopExamples/python/logger.py:7
SH::SampleHandler
A class that manages a list of Sample objects.
Definition: SampleHandler.h:60
RCU_ASSERT0
#define RCU_ASSERT0(y)
Definition: Assert.h:226
merge.status
status
Definition: merge.py:17
ManagerStep.h
COOLRates.target
target
Definition: COOLRates.py:1106
Data_rel21.datasets
datasets
Definition: Data_rel21.py:306
EL::Job
Definition: Job.h:51
EL::PrunDriver::doRetrieve
::StatusCode doRetrieve(Detail::ManagerData &data) const
Definition: PrunDriver.cxx:570
test_interactive_athena.job
job
Definition: test_interactive_athena.py:6
python.PyAthena.obj
obj
Definition: PyAthena.py:135
outputFileNames
std::string outputFileNames(const EL::Job &job)
Definition: PrunDriver.cxx:402
RCU_ASSERT
#define RCU_ASSERT(x)
Definition: Assert.h:222
SH::rucioDownloadList
std::vector< RucioDownloadResult > rucioDownloadList(const std::string &location, const std::vector< std::string > &datasets)
run rucio-download with multiple datasets
Definition: GridTools.cxx:523
create_dcsc_inputs_sqlite.RUN
int RUN
Definition: create_dcsc_inputs_sqlite.py:45
RCU_READ_INVARIANT
#define RCU_READ_INVARIANT(x)
Definition: Assert.h:229
EL::Detail::ManagerStep::submitJob
@ submitJob
do the actual job submission
skel.keepDir
keepDir
Definition: skel.ABtoEVGEN.py:514
Sample.h
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
ClassImp
ClassImp(EL::PrunDriver) namespace
Definition: PrunDriver.cxx:48
merge
Definition: merge.py:1
RCU_NEW_INVARIANT
#define RCU_NEW_INVARIANT(x)
Definition: Assert.h:233