|
ATLAS Offline Software
|
Go to the documentation of this file.
14 q.addToTableList (
"SUPER_MASTER_TABLE",
"SMT" );
15 q.addToTableList (
"JO_MASTER_TABLE",
"JOMT" );
17 q.extendBinding<
int>(
"smk");
19 q.extendCondition(
"SMT.SMT_ID = :smk");
20 q.extendCondition(
" AND SMT.SMT_JO_MASTER_TABLE_ID = JOMT.JO_ID");
22 q.extendOutput<std::string>(
"SMT.SMT_NAME" );
23 q.extendOutput<
int> (
"SMT.SMT_JO_MASTER_TABLE_ID" );
26 q.setDataName(
"JOMT.JO_CONTENT");
31 q.addToTableList (
"SUPER_MASTER_TABLE",
"SMT" );
32 q.addToTableList (
"HLT_JOBOPTIONS",
"HJO" );
34 q.extendBinding<
int>(
"smk");
36 q.extendCondition(
"SMT.SMT_ID = :smk");
37 q.extendCondition(
"AND HJO.HJO_ID=SMT.SMT_HLT_JOBOPTIONS_ID");
39 q.extendOutput<std::string>(
"SMT.SMT_NAME" );
40 q.extendOutput<
int> (
"SMT.SMT_HLT_JOBOPTIONS_ID" );
43 q.setDataName(
"HJO.HJO_DATA");
55 auto session = createDBSession();
56 session->transaction().start(
true);
57 const size_t sv = schemaVersion(session.get());
64 TRG_MSG_ERROR(
"Tried reading HLT job options, but SuperMasterKey " <<
smk <<
" is not available" );
72 catch(coral::QueryException & ex) {
73 TRG_MSG_ERROR(
"When reading HLT job options for SMK " <<
smk <<
" a coral::QueryException was caught ( " << ex.what() <<
" )" );
93 TRG_MSG_ERROR(
"When reading HLT job options for SMK " <<
smk <<
" a parsing error occured ( " << ex.what() <<
" )" );
Loader class for Trigger configuration from the Trigger DB.
Loader of trigger configurations from Json files.
std::map< size_t, QueryDefinition > m_queries
void setBoundValue(const std::string &fieldName, const T &value)
std::unique_ptr< coral::IQuery > createQuery(coral::ISessionProxy *session)
TrigDBJobOptionsLoader(const std::string &connection)
Constructor.
boost::property_tree::ptree ptree
std::string to_string(const DetectorType &type)
Base class for Trigger configuration data and wrapper around underlying representation.
virtual ~TrigDBJobOptionsLoader() override
Destructor - cannot be defined here because QueryDefinition is an incomplete type.
void blobToPtree(const coral::Blob &blob, boost::property_tree::ptree &pt)
bool loadJobOptions(unsigned int smk, boost::property_tree::ptree &jobOptions, const std::string &outFileName="") const
Load content from the Trigger DB into two ptrees for a given SuperMasterKey (SMK)
const std::string & dataName()