25{
26 std::unique_ptr<TrigConf::HLTMenu> hltmenu = std::make_unique<TrigConf::HLTMenu>();
27 std::unique_ptr<TrigConf::HLTMonitoring> monitoring;
28
30
33 std::string crest_api("");
36 dbloader.setCrestTrigDB(dbname);
37 dbloader.setCrestConnection(crest_server, crest_api);
38 }
41 }
43
44 TrigConf::JsonFileLoader fileLoader;
46
48
51 auto l1menu = std::make_unique<TrigConf::L1Menu>();
53 if (status) {
55 } else {
56 ATH_MSG_DEBUG(
"No L1 menu created, cannot compute a MC-SMK in this job");
57 }
58 }
59 ATH_MSG_INFO(
"Setting file-loaded HLT Menu SMK to:" << smk);
60 hltmenu->setSMK(smk);
61
63 monitoring.reset( new TrigConf::HLTMonitoring() );
65 if (not success) {
68 << ", but the monitoring collection is flagged as optional. Continuing.");
69 monitoring.reset();
70 } else {
72 << ", the monitoring collection flagged as non-optional in this job.");
73 return StatusCode::FAILURE;
74 }
75 } else {
76 monitoring->setSMK(smk);
77 }
78 }
79 }
80 else {
82 <<
"'. Allowed values: " <<
m_inputType.documentation());
83 return StatusCode::FAILURE;
84 }
85
86 ServiceHandle<StoreGateSvc>
detStore(
"StoreGateSvc/DetectorStore",
name());
88 if (
detStore->record(std::move(hltmenu),
"HLTTriggerMenu").isSuccess()) {
89 ATH_MSG_INFO(
"Recorded HLT menu as 'HLTTriggerMenu' in detector store");
90 }
91 if (monitoring and
detStore->record(std::move(monitoring),
"HLTMonitoringMenu").isSuccess()) {
92 ATH_MSG_INFO(
"Recorded HLT monitoring menu as 'HLTMonitoringMenu' in detector store");
93 }
94
95 return StatusCode::SUCCESS;
96}
Gaudi::Property< std::string > m_l1FileName
Gaudi::Property< bool > m_monitoringOptional
void setLevel(MSGTC::Level lvl)
bool loadFile(const std::string &filename, boost::property_tree::ptree &data, const std::string &pathToChild="") const
Load content of json file into a ptree.
uint32_t truncatedHash(const DataStructure &dataStructure)
Function to compute a truncated MD5 hash for a JSON file.
bool isCrestConnection(const std::string &db_connection_string, std::string &crest_server, std::string &crest_api, std::string &dbname)
Function to interpret the trigger connection string for CREST connections Format of the connections s...