ATLAS Offline Software
JobConfig.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 
9 #ifndef EVENT_LOOP__JOB_CONFIG_H
10 #define EVENT_LOOP__JOB_CONFIG_H
11 
12 #include <EventLoop/Global.h>
13 
14 #include <AnaAlgorithm/Global.h>
15 #include <TObject.h>
16 #include <memory>
17 #include <vector>
18 
19 class StatusCode;
20 
21 namespace EL
22 {
37 
38  class JobConfig final : public TObject
39  {
40  //
41  // public interface
42  //
43 
47  public:
48  void testInvariant () const;
49 
50 
54  public:
55  JobConfig () noexcept;
56 
57 
64  public:
66 
67 
71  public:
72  JobConfig (JobConfig&& that) noexcept;
73 
74 
78  public:
79  virtual ~JobConfig () noexcept;
80 
81 
88  public:
89  JobConfig& operator = (const JobConfig& that);
90 
91 
95  public:
96  JobConfig& operator = (JobConfig&& that) noexcept;
97 
98 
102  public:
103  void swap (JobConfig& that) noexcept;
104 
105 
113  public:
114  ::StatusCode addAlgorithm (std::unique_ptr<IAlgorithmWrapper>&& val_algorithm);
115 
116 
121  public:
122  const IAlgorithmWrapper *getAlgorithm (std::string_view name) const noexcept;
123 
124 
134  public:
135  std::vector<std::unique_ptr<EL::IAlgorithmWrapper> > extractAlgorithms ();
136 
137 
141  public:
142  std::size_t numberOfAlgorithms () const noexcept;
143 
144 
145 
146  //
147  // private interface
148  //
149 
154  private:
155  std::size_t m_algorithmCount = 0;
156 
162  private:
163  std::vector<std::unique_ptr<EL::IAlgorithmWrapper> > m_algorithms;
164 
166  };
167 }
168 
169 #endif
EL::JobConfig::getAlgorithm
const IAlgorithmWrapper * getAlgorithm(std::string_view name) const noexcept
get the algorithm with the given name, or nullptr if there is no algorithm with that name
EL::JobConfig::ClassDef
ClassDef(JobConfig, 1)
EL::JobConfig::testInvariant
void testInvariant() const
test the invariant of this object
EL::JobConfig::JobConfig
JobConfig() noexcept
standard constructor
EL::JobConfig::m_algorithms
std::vector< std::unique_ptr< EL::IAlgorithmWrapper > > m_algorithms
the list of algorithms added
Definition: JobConfig.h:163
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
vector
Definition: MultiHisto.h:13
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition: AlgorithmWorkerData.h:24
EL::JobConfig::addAlgorithm
::StatusCode addAlgorithm(std::unique_ptr< IAlgorithmWrapper > &&val_algorithm)
add an algorithm
Global.h
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
EL::JobConfig
the job configuration that is independent of driver and dataset
Definition: JobConfig.h:39
EL::IAlgorithmWrapper
a wrapper around a generic algorithm for use within EventLoop
Definition: IAlgorithmWrapper.h:48
EL::JobConfig::numberOfAlgorithms
std::size_t numberOfAlgorithms() const noexcept
get the number of algorithms configured
EL::JobConfig::swap
void swap(JobConfig &that) noexcept
standard swap
EL::JobConfig::extractAlgorithms
std::vector< std::unique_ptr< EL::IAlgorithmWrapper > > extractAlgorithms()
extract the list of algorithms from this object
Global.h
EL::JobConfig::m_algorithmCount
std::size_t m_algorithmCount
the number of algorithms added
Definition: JobConfig.h:155