11#ifndef XAOD_STANDALONE
12# include "GaudiKernel/IIncidentSvc.h"
24 template<
typename T >
25 MsgStream&
operator<< ( MsgStream& out,
const std::vector< T >&
vec ) {
28 for(
size_t i = 0;
i <
vec.size(); ++
i ) {
30 if( i <
vec.size() - 1 ) {
44 TrigConfBunchCrossingTool::
45 TrigConfBunchCrossingTool(
const std::string& name )
57 ATH_MSG_INFO(
"Initializing TrigConfBunchCrossingTool" );
61#ifndef XAOD_STANDALONE
67#ifndef XAOD_STANDALONE
69 ATH_MSG_DEBUG(
" xAODConfigTool is set - will read from xAOD metadata" );
72 ATH_MSG_DEBUG(
" xAODConfigTool is not set - will read from xAODConfigSvc" );
80 return StatusCode::SUCCESS;
89 return StatusCode::SUCCESS;
114 return std::vector< float >();
129 return std::vector< float >();
144 return std::vector< float >();
159 return std::vector< float >();
179#ifndef XAOD_STANDALONE
191 ATH_MSG_FATAL(
"Trigger configuration service doesn't provide "
192 "BunchGroupSet information" );
193 return StatusCode::FAILURE;
198 return StatusCode::SUCCESS;
213 const std::vector< TrigConf::BunchGroup >& bgs =
215 std::vector< TrigConf::BunchGroup >::const_iterator filled_bg =
218 ATH_MSG_INFO(
"Taking the second bunch group as the colliding bunch "
231 std::vector< int > unpaired;
233 if( bgs.size() > 4 ) {
234 unpaired.insert( unpaired.end(), bgs[ 4 ].bunches().begin(),
235 bgs[ 4 ].bunches().end() );
238 if( bgs.size() > 5 ) {
239 unpaired.insert( unpaired.end(), bgs[ 5 ].bunches().begin(),
240 bgs[ 5 ].bunches().end() );
251#ifndef XAOD_STANDALONE
255 incidentSvc->fireIncident( Incident(
"BunchConfiguration update",
260 return StatusCode::SUCCESS;
267 void TrigConfBunchCrossingTool::
271 if( !
msgLvl( MSG::VERBOSE ) )
return;
275 for(
const auto& bg : svc->bunchGroupSet()->bunchGroups() ) {
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
std::vector< size_t > vec
std::ostream & operator<<(std::ostream &lhs, const TestGaudiProperty &rhs)
bool msgLvl(const MSG::Level lvl) const
const std::vector< BunchGroup > & bunchGroups() const
Interface for all services/tools that provide LVL1 menu configuration information.
virtual const BunchGroupSet * bunchGroupSet() const =0
Provides the LVL1 bunch group set.
static const std::string BUNCH_CONFIG_INCIDENT_NAME
Type name for the incident that such tools should emit.
unsigned int configid_type
Declare the interface that this class provides.
The common trigger namespace for trigger analysis tools.