ATLAS Offline Software
JobOptionTableLoader.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 //
7 //NAME: JobOptionTableLoader.h
8 //AUTHOR: J.Haller (CERN) Johannes.Haller@cern.ch
9 //CREATED: 06. Feb. 2006
10 //
11 //PURPOSE:
12 //
13 //
15 
16 #ifndef TrigConf_JobOptionTableLoader
17 #define TrigConf_JobOptionTableLoader
18 
22 
23 #include <set>
24 
25 namespace coral {
26  class IQuery;
27  class AttributeList;
28 }
29 
30 namespace TrigConf {
31 
32  class JobOptionTable;
33 
36  virtual public IJobOptionTableLoader
37  {
38  public:
39 
41 
48  JobOptionTableLoader( StorageMgr& sm, coral::ISessionProxy& session)
49  : DBLoader("JobOptionTableLoader", sm, session)
50  {}
51 
53  virtual ~JobOptionTableLoader() override = default;
54 
55  virtual bool load( TrigConfData& data);
56 
57  void defineQueries();
58 
59  private:
60 
61  class SplitParam {
62  public:
63  SplitParam(const std::string& alias, const std::string& name,
64  const std::string& type, const std::string& op, const std::string& value) :
65  alias(alias),
66  name(name),
67  type(type),
68  op(op),
69  value(value),
71  {
72  actualname = actualname.erase(actualname.find("__IPC__"));
73  }
74  std::string alias;
75  std::string name;
76  std::string type;
77  std::string op;
78  std::string value;
79  std::string actualname;
80  };
81 
82 
83  bool load( JobOptionTable& jot ) override;
84 
85  bool loadHLTMasterTable(int SuperMasterKey,
86  int& masterTableID,
87  int& triggerMenuID,
88  int& l2SetupID,
89  int& efSetupID );
90 
91  bool loadComponentNamesAndParameters(TrigConf::JobOptionTable& JOTable, const std::set<int>& compIDsToLoad);
92 
93  bool loadComponentNamesAndParameters(TrigConf::JobOptionTable& JOTable, const std::set<int>& compIDsToLoad, std::vector<SplitParam>& splitparams,
94  std::set<int>::const_iterator & current, unsigned int batchSize);
95 
96  std::set<int> loadComponentIDsFromSetup(const int setup_id);
97 
98  std::set<int> loadComponentIDsFromMenu(const int menu_id, int triggerLevel);
99 
100  std::set<int> getChildCompIDs(const std::set<int>& compIDs);
101 
102  std::string buildCond_IN_(const std::string& field, const std::set<int>& IDs, std::set<int>::const_iterator & current, unsigned int batchSize);
103 
104  unsigned int assembleSplitParameters( JobOptionTable& jot, const std::vector< SplitParam >& splitparams );
105  unsigned int assembleSplitParameters2( JobOptionTable& jot, const std::vector< SplitParam >& splitparams );
106 
107  };
108 }
109 
110 #endif
TrigConf::JobOptionTableLoader::loadComponentNamesAndParameters
bool loadComponentNamesAndParameters(TrigConf::JobOptionTable &JOTable, const std::set< int > &compIDsToLoad)
Definition: JobOptionTableLoader.cxx:91
fillPileUpNoiseLumi.current
current
Definition: fillPileUpNoiseLumi.py:52
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
TrigConf::JobOptionTableLoader::getChildCompIDs
std::set< int > getChildCompIDs(const std::set< int > &compIDs)
Definition: JobOptionTableLoader.cxx:335
IJobOptionTableLoader.h
TrigConf::JobOptionTableLoader
TriggerDB loader of the HLT job options.
Definition: JobOptionTableLoader.h:37
TrigConf::JobOptionTableLoader::assembleSplitParameters
unsigned int assembleSplitParameters(JobOptionTable &jot, const std::vector< SplitParam > &splitparams)
Definition: JobOptionTableLoader.cxx:411
TrigConf::JobOptionTableLoader::SplitParam::name
std::string name
Definition: JobOptionTableLoader.h:75
TrigConf::JobOptionTableLoader::loadComponentIDsFromMenu
std::set< int > loadComponentIDsFromMenu(const int menu_id, int triggerLevel)
Definition: JobOptionTableLoader.cxx:206
TrigConf::JobOptionTableLoader::defineQueries
void defineQueries()
TrigConf::JobOptionTableLoader::SplitParam::actualname
std::string actualname
Definition: JobOptionTableLoader.h:79
TrigConf::JobOptionTableLoader::SplitParam::value
std::string value
Definition: JobOptionTableLoader.h:78
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
TrigConf::JobOptionTable
table to hold the complete list of JobOption entries for a single configuration, from which the JobOp...
Definition: JobOptionTable.h:20
TrigConf::JobOptionTableLoader::SplitParam
Definition: JobOptionTableLoader.h:61
TrigConf::StorageMgr
Database Storage Manager, controls the database session and the different loader classes for DB acces...
Definition: StorageMgr.h:23
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
coral
Definition: ISecondaryEventSelector.h:19
TrigConf::DBLoader
Base class for loaders of configurations from the TriggerDB.
Definition: DBLoader.h:20
TrigConf::TrigConfMessaging::msg
MsgStreamTC & msg() const
The standard message stream.
Definition: TrigConfMessaging.h:81
TrigConf::JobOptionTableLoader::loadComponentIDsFromSetup
std::set< int > loadComponentIDsFromSetup(const int setup_id)
Definition: JobOptionTableLoader.cxx:168
TrigConf::TrigConfData
Definition: TrigConfData.h:13
DBLoader.h
TrigConf::JobOptionTableLoader::SplitParam::alias
std::string alias
Definition: JobOptionTableLoader.h:74
TrigConf::name
Definition: HLTChainList.h:35
TrigConf::JobOptionTableLoader::loadHLTMasterTable
bool loadHLTMasterTable(int SuperMasterKey, int &masterTableID, int &triggerMenuID, int &l2SetupID, int &efSetupID)
Definition: JobOptionTableLoader.cxx:35
TrigConf::IJobOptionTableLoader
Definition: IJobOptionTableLoader.h:27
TrigConf::JobOptionTableLoader::load
virtual bool load(TrigConfData &data)
Definition: JobOptionTableLoader.cxx:391
TrigConf::JobOptionTableLoader::~JobOptionTableLoader
virtual ~JobOptionTableLoader() override=default
destructor
TrigConf::JobOptionTableLoader::assembleSplitParameters2
unsigned int assembleSplitParameters2(JobOptionTable &jot, const std::vector< SplitParam > &splitparams)
Definition: JobOptionTableLoader.cxx:506
TrigConfMessaging.h
Messaging base class for TrigConf code shared with Lvl1 ( AthMessaging)
TrigConf::JobOptionTableLoader::SplitParam::op
std::string op
Definition: JobOptionTableLoader.h:77
TrigConf::JobOptionTableLoader::buildCond_IN_
std::string buildCond_IN_(const std::string &field, const std::set< int > &IDs, std::set< int >::const_iterator &current, unsigned int batchSize)
Definition: JobOptionTableLoader.cxx:268
TrigConf::JobOptionTableLoader::JobOptionTableLoader
JobOptionTableLoader(StorageMgr &sm, coral::ISessionProxy &session)
constructor
Definition: JobOptionTableLoader.h:48
TrigConf::JobOptionTableLoader::SplitParam::type
std::string type
Definition: JobOptionTableLoader.h:76
TrigConf::JobOptionTableLoader::SplitParam::SplitParam
SplitParam(const std::string &alias, const std::string &name, const std::string &type, const std::string &op, const std::string &value)
Definition: JobOptionTableLoader.h:63