9#include "GaudiKernel/ServiceHandle.h"
25 auto l1menu = std::make_unique<TrigConf::L1Menu>();
30 std::string crest_server(
"");
31 std::string crest_api(
"");
32 std::string dbname(
"");
48 uint32_t smk =
m_smk.value();
50 auto hltmenu = std::make_unique<TrigConf::HLTMenu>();
55 ATH_MSG_DEBUG(
"No HLT menu created, cannot compute a MC-SMK in this job");
58 ATH_MSG_INFO(
"Setting file-loaded L1 Menu SMK to:" << smk);
65 <<
"'. Allowed values: " <<
m_inputType.documentation());
66 return StatusCode::FAILURE;
71 if (detStore->record(std::move(l1menu),
"L1TriggerMenu").isSuccess()) {
72 ATH_MSG_INFO(
"Recorded L1 menu as 'L1TriggerMenu' in detector store");
75 return StatusCode::SUCCESS;
81 if (
auto joSvc = serviceLocator()->service<TrigConf::IJobOptionsSvc>(
"JobOptionsSvc")) {
82 if (joSvc->superMasterKey() > 0) {
84 m_smk = joSvc->superMasterKey();
89 ATH_MSG_DEBUG(
"Did not locate TrigConf::JobOptionsSvc, not running athenaHLT");
104 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Loader class for Trigger configuration from Json.
Loader class for Trigger configuration (L1 prescales set) from the Trigger DB.
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.
Gaudi::Property< std::string > m_inputType
Gaudi::Property< unsigned int > m_smk
Gaudi::Property< std::string > m_hltFileName
Gaudi::Property< std::string > m_dbConnection
virtual StatusCode initialize() override
StatusCode loadRun3StyleMenu()
Gaudi::Property< std::string > m_l1FileName
LVL1ConfigSvc(const std::string &name, ISvcLocator *pSvcLocator)
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...