ATLAS Offline Software
Loading...
Searching...
No Matches
BunchTrain.cxx File Reference
#include <cstdlib>
#include <iostream>
#include "AsgMessaging/AsgMessaging.h"
#include "TrigBunchCrossingTool/BunchTrain.h"
#include "SetPrint.h"
Include dependency graph for BunchTrain.cxx:

Go to the source code of this file.

Namespaces

namespace  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.
std::ostream & operator<< (std::ostream &stream, const Trig::BunchTrain &bt)
 Operator for printing the configuration of bunch trains in a readable format.
MsgStream & operator<< (MsgStream &stream, const Trig::BunchTrain &bt)
 Operator for printing the configuration of bunch trains in a readable format.

Function Documentation

◆ operator<<() [1/2]

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

Operator for printing the configuration of bunch trains in a readable format.

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}
const_iterator train_back() const
Iterator pointing to the last bunch in the 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.

◆ operator<<() [2/2]

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

Operator for printing the configuration of bunch trains in a readable format.

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}