ATLAS Offline Software
Classes | Namespaces | Functions
BunchTrain.h File Reference
#include <set>
#include <iosfwd>
#include "AsgMessaging/MsgStream.h"
#include "TrigBunchCrossingTool/BunchCrossing.h"
Include dependency graph for BunchTrain.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Trig::BunchTrain
 A smart set of BunchCrossing objects. More...
 

Namespaces

 Trig
 The common trigger namespace for trigger analysis tools.
 

Functions

bool Trig::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 friends. More...
 
std::ostream & operator<< (std::ostream &stream, const Trig::BunchTrain &bt)
 Output operator for BunchTrain objects. More...
 
MsgStream & operator<< (MsgStream &stream, const Trig::BunchTrain &bt)
 Output operator for BunchTrain objects. More...
 

Function Documentation

◆ operator<<() [1/2]

MsgStream& operator<< ( MsgStream &  stream,
const Trig::BunchTrain bt 
)

Output operator for BunchTrain objects.

Output operator for BunchTrain objects.

Parameters
streamA functional MsgStream object
btThe bunch train to print
Returns
The same stream object that it received

Definition at line 314 of file BunchTrain.cxx.

314  {
315 
316  // Take advantage of the output operator defined for std::set objects:
317  stream << "[spacing: " << bt.spacing() << "; bunches: "
318  << static_cast< const std::set< Trig::BunchCrossing >& >( bt )
319  << "; front: " << *bt.train_front() << "; back: "
320  << *bt.train_back() << "]";
321 
322  return stream;
323 }

◆ operator<<() [2/2]

std::ostream& operator<< ( std::ostream &  stream,
const Trig::BunchTrain bt 
)

Output operator for BunchTrain objects.

Output operator for BunchTrain objects.

Parameters
streamA standard std::ostream object
btThe bunch train to print
Returns
The same stream object that it received

Definition at line 295 of file BunchTrain.cxx.

295  {
296 
297  // Take advantage of the output operator defined for std::set objects:
298  stream << "[spacing: " << bt.spacing() << "; bunches: "
299  << static_cast< const std::set< Trig::BunchCrossing >& >( bt )
300  << "; front: " << *bt.train_front() << "; back: "
301  << *bt.train_back() << "]";
302 
303  return stream;
304 }
Trig::BunchTrain::train_back
const_iterator train_back() const
Iterator pointing to the last bunch in the train.
Definition: BunchTrain.cxx:185
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
Trig::BunchTrain::spacing
int spacing() const
Spacing of the bunches in this train in nanoseconds.
Definition: BunchTrain.cxx:75
Trig::BunchTrain::train_front
const_iterator train_front() const
Iterator pointing to the first bunch in the train.
Definition: BunchTrain.cxx:165