14 q.addToTableList (
"SUPER_MASTER_TABLE",
"SMT" );
15 q.addToTableList (
"JO_MASTER_TABLE",
"JOMT" );
17 q.extendBinding<
int>(
"key");
19 q.extendCondition(
"SMT.SMT_ID = :key");
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" );
24 q.extendOutput<coral::Blob>(
"JOMT.JO_CONTENT" );
26 q.setDataName(
"JOMT.JO_CONTENT");
31 q.addToTableList (
"SUPER_MASTER_TABLE",
"SMT" );
32 q.addToTableList (
"HLT_JOBOPTIONS",
"HJO" );
34 q.extendBinding<
int>(
"key");
36 q.extendCondition(
"SMT.SMT_ID = :key");
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" );
41 q.extendOutput<coral::Blob>(
"HJO.HJO_DATA" );
43 q.setDataName(
"HJO.HJO_DATA");
53 const std::string & outFileName )
const
67 const std::string & outFileName )
const
70 boost::property_tree::ptree ptJobOptions;
75 catch(std::exception & ex) {
77 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.
Base class for Trigger configuration data and wrapper around underlying representation.
TrigDBJobOptionsLoader(const std::string &connection)
Constructor.
std::map< size_t, QueryDefinition > m_queries
bool loadJobOptions(unsigned int smk, boost::property_tree::ptree &jobOptions, const std::string &outFileName="") const
Load job options from the Trigger DB into a ptree for a given SuperMasterKey (SMK)
virtual ~TrigDBJobOptionsLoader() override
Destructor - cannot be defined here because QueryDefinition is an incomplete type.
TrigDBLoader(const std::string &loaderName, const std::string &connection)
Constructor.
void loadFromOracle(unsigned int key, boost::property_tree::ptree &pt, const std::string &outFileName, const std::string &description, const std::map< size_t, QueryDefinition > &queries) const
void loadFromCrest(unsigned int key, boost::property_tree::ptree &pt, const std::string &outFileName, const std::string &description, const std::string &query_type) const