|
ATLAS Offline Software
|
Go to the documentation of this file.
18 #define BOOST_BIND_GLOBAL_PLACEHOLDERS // Needed to silence Boost pragma message
19 #include <boost/property_tree/ptree.hpp>
20 #include <boost/property_tree/json_parser.hpp>
54 m_hltJson( nullptr), m_hltmonitoringJson(nullptr), m_l1Json( nullptr ),
55 m_hltpsJson( nullptr ), m_l1psJson( nullptr ), m_bgJson( nullptr ),
57 m_currentHltJson( nullptr ), m_currentHltmonitoringJson( nullptr ), m_currentL1Json( nullptr ),
58 m_currentHltpsJson( nullptr ), m_currentL1psJson( nullptr ), m_currentBgJson( nullptr ),
59 m_triggerMenuContainerAvailable(false),
60 m_menuJSONContainerAvailable(false),
111 return StatusCode::SUCCESS;
116 if(
m_impl->m_ctpConfig.menu().size() == 0 ) {
118 throw std::runtime_error(
"Tool not initialised correctly" );
122 return &
m_impl->m_ctpConfig;
127 if(
m_impl->m_bgSet.bunchGroups().size() == 0 ) {
129 throw std::runtime_error(
"Tool not initialised correctly" );
146 throw std::runtime_error(
"Tool not initialised correctly" );
158 return m_impl->m_currentBg.bgsk();
160 ATH_MSG_DEBUG(
"There's no way to access the bunch group set key from a legacy AOD!");
167 if(
m_impl->m_chainList.size() == 0 ) {
169 throw std::runtime_error(
"Tool not initialised correctly" );
173 return m_impl->m_chainList;
178 if(
m_impl->m_sequenceList.size() == 0 ) {
180 throw std::runtime_error(
"Tool not initialised correctly" );
184 return m_impl->m_sequenceList;
197 throw std::runtime_error(
"Tool not initialised correctly" );
216 throw std::runtime_error(
"Tool not initialised correctly" );
228 throw std::runtime_error(
"Tool not initialised correctly" );
230 return m_impl->m_currentHlt;
236 throw std::runtime_error(
"Tool not initialised correctly" );
238 return m_impl->m_currentHltmonitoring;
244 throw std::runtime_error(
"Tool not initialised correctly" );
246 return m_impl->m_currentL1;
252 throw std::runtime_error(
"Tool not initialised correctly" );
254 return m_impl->m_currentHltps;
260 throw std::runtime_error(
"Tool not initialised correctly" );
262 return m_impl->m_currentL1ps;
268 throw std::runtime_error(
"Tool not initialised correctly" );
270 return m_impl->m_currentBg;
276 ATH_MSG_DEBUG(
"Loading the trigger menu from a new input file" );
331 return StatusCode::SUCCESS;
344 return StatusCode::SUCCESS;
392 return StatusCode::SUCCESS;
403 return StatusCode::SUCCESS;
413 return StatusCode::SUCCESS;
416 ATH_MSG_ERROR(
"Both m_menuJSONContainerAvailable and m_triggerMenuContainerAvailable are false");
417 return StatusCode::FAILURE;
446 ATH_MSG_ERROR(
"Both m_menuJSONContainerAvailable and m_triggerMenuContainerAvailable are false");
447 return StatusCode::FAILURE;
454 return StatusCode::SUCCESS;
460 for( ; menu_itr != menu_end; ++menu_itr ) {
471 return StatusCode::SUCCESS;
475 ATH_MSG_ERROR(
"Couldn't find configuration for current event (SMK:"
476 <<
keys->smk() <<
", L1PSK:" <<
keys->l1psk()
477 <<
", HLTPSK:" <<
keys->hltpsk() <<
")" );
478 return StatusCode::FAILURE;
484 return StatusCode::FAILURE;
488 bool validConfig =
true;
507 return StatusCode::SUCCESS;
550 return StatusCode::SUCCESS;
560 for( ; menu_itr != menu_end; ++menu_itr ) {
562 if( keyToCheck != (*menu_itr)->key() )
continue;
563 ptrToSet = *menu_itr;
564 return StatusCode::SUCCESS;
567 ATH_MSG_FATAL(
"Couldn't find configuration for current event"
568 <<
", Requested key=" << keyToCheck
569 <<
", Requested menu=" << humanName);
570 return StatusCode::FAILURE;
584 return StatusCode::SUCCESS;
591 std::stringstream rawData;
592 rawData <<
menu->payload();
593 dataStructure.
clear();
596 boost::property_tree::read_json(rawData,
pt);
598 }
catch (
const boost::property_tree::json_parser_error&
e) {
599 ATH_MSG_FATAL(
"Unable to decode a JSON trigger menu metadata payload for " << humanName <<
" with key " <<
menu->key());
601 return StatusCode::FAILURE;
603 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
Const iterator class for DataVector/DataList.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StatusCode prepareTriggerMenu(const xAOD::TriggerMenu *menu, CTPConfig &ctpConfig, HLTChainList &chainList, HLTSequenceList &sequenceList, BunchGroupSet &bgSet, MsgStream &msg)
In order to avoid duplicating code between how the dual-use and the Athena-only code translates the x...
void setData(const ptree &data)
Setting the configuration data.
Forward iterator to traverse the main components of the trigger configuration.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
bool xAODKeysMatch(const xAOD::TrigConfKeys *keys, const xAOD::TriggerMenu *menu)
Since this is used in a couple of places, it seemed to make sense to put this simple code into a cent...
list of all HLT chains in a trigger menu
::StatusCode StatusCode
StatusCode definition for legacy code.
boost::property_tree::ptree ptree
Class describing the configuration used in a given event.
Base class for Trigger configuration data and wrapper around underlying representation.
uint32_t id() const
Get the 32-bit identifier of the bunch configuration.
HLT monitoring configuration.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
#define ATH_MSG_WARNING(x)
virtual void clear()
Clearing the configuration data.
const T * at(size_type n) const
Access an element, as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Class identifying the bunch configuration of a given event.