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;
133 if( ( ( *begin() < bc ) && ( *
train_back() > bc ) ) ||
134 ( ( *
train_front() < bc ) && ( *( --end() ) > bc ) ) ) {
214 BunchTrain::const_iterator itr = begin();
215 size_t bunch_pos = 0;
216 BunchTrain::const_iterator next;
217 for( ; itr != end(); ++itr, ++bunch_pos ) {
220 if( next == end() )
continue;
245 logger.msg() << MSG::WARNING <<
"Bunches don't appear to have "
246 <<
"equal spacing!" <<
endmsg;
254 logger.msg() << MSG::VERBOSE
255 <<
"Gap found in train! train_front = "
259 logger.msg() << MSG::VERBOSE
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() ) );
298 stream <<
"[spacing: " << bt.
spacing() <<
"; bunches: "
299 <<
static_cast< const std::set< Trig::BunchCrossing >&
>( bt )
317 stream <<
"[spacing: " << bt.
spacing() <<
"; bunches: "
318 <<
static_cast< const std::set< Trig::BunchCrossing >&
>( bt )
std::ostream & operator<<(std::ostream &stream, const Trig::BunchTrain &bt)
Operator for printing the configuration of bunch trains in a readable format.
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.
A smart integer class representing bunch crossings.
static const int MAX_BCID
The maximum number of bunches that can be in the LHC.
static const int BUNCH_SPACING
Minimum spacing between the bunches, in nanoseconds.
A smart set of BunchCrossing objects.
bool validate()
Check the spacing of the bunches in the train.
BunchTrain & operator=(const BunchTrain &rhs)
Assignment operator.
const_iterator m_front
Iterator pointing to the first bunch.
bool isInside(const BunchCrossing &bc) const
Check if a bunch crossing is inside this train.
const_iterator train_back() const
Iterator pointing to the last bunch in the train.
int m_spacing
Spacing of the bunches in nanoseconds.
BunchTrain()
Default constructor.
bool m_gapFound
Flag specifying if the train spreads over the "BCID turnover".
int distance(const BunchCrossing &bc) const
"Distance" of a bunch crossing from this bunch train
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.
Class mimicking the AthMessaging class from the offline software.
std::string find(const std::string &s)
return a remapped string
static Root::TMsgLogger logger("iLumiCalc")
The common trigger namespace for trigger analysis tools.
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 ...