|
ATLAS Offline Software
|
Go to the documentation of this file.
24 m_front(), m_back(), m_gapFound( false ) {
37 m_front(), m_back(), m_gapFound( false ) {
50 std::set< BunchCrossing >::operator=( rhs );
95 if( !
size() )
return 0;
98 if(
find( bc ) !=
end() )
return 0;
103 BunchTrain::const_iterator itr =
begin();
104 for( ; itr !=
end(); ++itr ) {
106 if( (
diff = itr->distance( bc ) ) < min_distance ) {
128 if(
find( bc ) !=
end() )
return true;
214 BunchTrain::const_iterator itr =
begin();
215 size_t bunch_pos = 0;
216 BunchTrain::const_iterator
next;
217 for( ; itr !=
end(); ++itr, ++bunch_pos ) {
245 logger.msg() << MSG::WARNING <<
"Bunches don't appear to have "
246 <<
"equal spacing!" <<
endmsg;
255 <<
"Gap found in train! train_front = "
260 <<
"Gap not found in train! train_front = "
279 if( ! bt2.size() )
return false;
280 if( ! bt1.size() )
return true;
282 return ( ( *bt1.begin() ) < ( *bt2.begin() ) );
299 <<
static_cast< const std::set< Trig::BunchCrossing >&
>( bt )
318 <<
static_cast< const std::set< Trig::BunchCrossing >&
>( bt )
A smart set of BunchCrossing objects.
bool isInside(const BunchCrossing &bc) const
Check if a bunch crossing is inside this train.
std::string find(const std::string &s)
return a remapped string
static const int MAX_BCID
The maximum number of bunches that can be in the LHC.
The common trigger namespace for trigger analysis tools.
const_iterator m_front
Iterator pointing to the first bunch.
bool validate()
Check the spacing of the bunches in the train.
const_iterator train_back() const
Iterator pointing to the last bunch in the train.
std::ostream & operator<<(std::ostream &stream, const Trig::BunchTrain &bt)
Operator for printing the configuration of bunch trains in a readable format.
static const int BUNCH_SPACING
Minimum spacing between the bunches, in nanoseconds.
BunchTrain & operator=(const BunchTrain &rhs)
Assignment operator.
bool m_gapFound
Flag specifying if the train spreads over the "BCID turnover".
int m_spacing
Spacing of the bunches in nanoseconds.
bool operator<(const BunchTrain &bt1, const BunchTrain &bt2)
This operator is here to be able to put BunchTrain objects into ordered containers like std::set and ...
int distance(const BunchCrossing &bc) const
"Distance" of a bunch crossing from this bunch train
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
BunchTrain()
Default constructor.
Class mimicking the AthMessaging class from the offline software.
int spacing() const
Spacing of the bunches in this train in nanoseconds.
const_iterator train_front() const
Iterator pointing to the first bunch in the train.
const_iterator m_back
Iterator pointing to the last bunch.
A smart integer class representing bunch crossings.