Install fatal handler with default options.
This is meant to be easy to call from python via ctypes.
42{
43
44 const char* tdaq_partition_cstr = std::getenv("TDAQ_PARTITION");
45 if (tdaq_partition_cstr != nullptr) {
46 m_partition = std::string(tdaq_partition_cstr);
48 } else {
50 return StatusCode::FAILURE;
51 }
52 const char* tdaqWebdaqBase_cstr = std::getenv("TDAQ_WEBDAQ_BASE");
53 if (tdaqWebdaqBase_cstr != nullptr) {
54 m_tdaqWebdaqBase = std::string(tdaqWebdaqBase_cstr);
55 ATH_MSG_INFO(
"TDAQ_WEBDAQ_BASE value: " << m_tdaqWebdaqBase);
56 } else {
57 ATH_MSG_ERROR(
"TDAQ_WEBDAQ_BASE environment variable not set! "
58 "Is needed for the IS publication through webdaq");
59 return StatusCode::FAILURE;
60 }
61 const char* tdaq_is_server = std::getenv("TDAQ_IS_SERVER");
62 if (tdaq_is_server != nullptr) {
63 m_tdaqIsServerName = std::string(tdaq_is_server);
64 } else {
65 m_tdaqIsServerName = m_isServerName.value();
66 }
67 ATH_MSG_INFO(
"TDAQ_IS_SERVER value: " << m_tdaqIsServerName);
68
69
70 hltinterface::IInfoRegister::setInstance(this, true);
71 ATH_MSG_INFO(
"Installed WebdaqInfoSvc as the hltinterface::IInfoRegister singleton");
72
73
74 m_factory = hltinterface::ContainerFactory::getInstance();
75 if (m_factory) {
76 ATH_MSG_INFO(
"Reusing the hltinterface::ContainerFactory installed by another component");
77 }
78 else {
79 m_factory = std::make_shared<hltinterface::ContainerFactory>();
80 hltinterface::ContainerFactory::setInstance(m_factory);
81 ATH_MSG_INFO(
"Installed the default hltinterface::ContainerFactory");
82 }
83
84
88 return StatusCode::SUCCESS;
89}
#define ATH_CHECK
Evaluate an expression and check for errors.
static const std::string & type()
Incident type.