9#include "GaudiKernel/ServiceHandle.h"
26 std::unique_ptr<TrigConf::HLTMenu> hltmenu = std::make_unique<TrigConf::HLTMenu>();
27 std::unique_ptr<TrigConf::HLTMonitoring> monitoring;
32 std::string crest_server(
"");
33 std::string crest_api(
"");
34 std::string dbname(
"");
49 uint32_t smk =
m_smk.value();
51 auto l1menu = std::make_unique<TrigConf::L1Menu>();
56 ATH_MSG_DEBUG(
"No L1 menu created, cannot compute a MC-SMK in this job");
59 ATH_MSG_INFO(
"Setting file-loaded HLT Menu SMK to:" << smk);
68 <<
", but the monitoring collection is flagged as optional. Continuing.");
72 <<
", the monitoring collection flagged as non-optional in this job.");
73 return StatusCode::FAILURE;
76 monitoring->setSMK(smk);
82 <<
"'. Allowed values: " <<
m_inputType.documentation());
83 return StatusCode::FAILURE;
88 if (detStore->record(std::move(hltmenu),
"HLTTriggerMenu").isSuccess()) {
89 ATH_MSG_INFO(
"Recorded HLT menu as 'HLTTriggerMenu' in detector store");
91 if (monitoring and detStore->record(std::move(monitoring),
"HLTMonitoringMenu").isSuccess()) {
92 ATH_MSG_INFO(
"Recorded HLT monitoring menu as 'HLTMonitoringMenu' in detector store");
95 return StatusCode::SUCCESS;
101 if (
auto joSvc = serviceLocator()->service<TrigConf::IJobOptionsSvc>(
"JobOptionsSvc")) {
102 if (joSvc->superMasterKey() > 0) {
104 m_smk = joSvc->superMasterKey();
109 ATH_MSG_DEBUG(
"Did not locate TrigConf::JobOptionsSvc, not running athenaHLT");
124 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Loader class for Trigger configuration from Json.
HLTConfigSvc(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::string > m_dbConnection
Gaudi::Property< std::string > m_l1FileName
Gaudi::Property< unsigned int > m_smk
Gaudi::Property< std::string > m_inputType
Gaudi::Property< bool > m_monitoringOptional
Gaudi::Property< std::string > m_hltFileName
Gaudi::Property< std::string > m_monitoringFileName
virtual StatusCode initialize() override
StatusCode writeConfigToDetectorStore()
HLT monitoring configuration.
Loader of trigger configurations from Json files.
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.
void setLevel(MSGTC::Level lvl)
void setCrestTrigDB(const std::string &crestTrigDB)
set trigger db for the crest connection
void setCrestConnection(const std::string &server, const std::string &version="")
declare CREST as the source of the configuration An empty crest server makes it use Oracle
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...