ATLAS Offline Software
Loading...
Searching...
No Matches
BunchTrain.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id: BunchTrain.h 618129 2014-09-23 11:37:00Z krasznaa $
8#ifndef TRIGBUNCHCROSSINGTOOL_BUNCHTRAIN_H
9#define TRIGBUNCHCROSSINGTOOL_BUNCHTRAIN_H
10
11// System include(s):
12#include <set>
13#include <iosfwd>
14
15// Gaudi/Athena include(s):
17
18// Local include(s):
20
21namespace Trig {
22
35 class BunchTrain : public std::set< BunchCrossing > {
36
37 public:
39 BunchTrain();
41 BunchTrain( const BunchTrain& parent );
42
44 BunchTrain& operator= ( const BunchTrain& rhs );
45
47 int spacing() const;
49 int distance( const BunchCrossing& bc ) const;
51 bool isInside( const BunchCrossing& bc ) const;
52
54 const_iterator train_front() const;
56 const_iterator train_back() const;
57
59 bool validate();
60
61 private:
63 const_iterator m_front;
64 const_iterator m_back;
66
67 }; // class BunchTrain
68
70 bool operator< ( const BunchTrain& bt1, const BunchTrain& bt2 );
71
72} // namespace Trig
73
75std::ostream& operator<< ( std::ostream& stream, const Trig::BunchTrain& bt );
77MsgStream& operator<< ( MsgStream& stream, const Trig::BunchTrain& bt );
78
79#endif // TRIGBUNCHCROSSINGTOOL_BUNCHTRAIN_H
std::ostream & operator<<(std::ostream &stream, const Trig::BunchTrain &bt)
Output operator for BunchTrain objects.
A smart integer class representing bunch crossings.
A smart set of BunchCrossing objects.
Definition BunchTrain.h:35
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.
Definition BunchTrain.h:63
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.
Definition BunchTrain.h:62
BunchTrain()
Default constructor.
bool m_gapFound
Flag specifying if the train spreads over the "BCID turnover".
Definition BunchTrain.h:65
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.
Definition BunchTrain.h:64
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 ...