ATLAS Offline Software
Loading...
Searching...
No Matches
BunchCrossing.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: BunchCrossing.h 618129 2014-09-23 11:37:00Z krasznaa $
8#ifndef TRIGBUNCHCROSSINGTOOL_BUNCHCROSSING_H
9#define TRIGBUNCHCROSSINGTOOL_BUNCHCROSSING_H
10
11// System include(s):
12#include <iosfwd>
13
14// Gaudi/Athena include(s):
16
17namespace Trig {
18
34
35 public:
37 BunchCrossing( int bcid = 0, float intBeam1 = 1.0, float intBeam2 = 1.0 );
39 BunchCrossing( unsigned int bcid, float intBeam1 = 1.0,
40 float intBeam2 = 1.0 );
42 BunchCrossing( const BunchCrossing& parent );
43
45 BunchCrossing& operator=( const BunchCrossing& parent );
46
48 static const int BUNCH_SPACING;
50 static const int MAX_BCID;
51
53 operator int&();
55 operator const int&() const;
56
61
66
71
73 int distance( const BunchCrossing& bc ) const;
75 int gapFrom( const BunchCrossing& bc ) const;
77 int gapTo( const BunchCrossing& bc ) const;
78
80 int bcid() const;
82 void setBCID( int bcid );
83
85 float intensityBeam1() const;
87 void setIntensityBeam1( float intensity );
88
90 float intensityBeam2() const;
92 void setIntensityBeam2( float intensity );
93
95 bool operator== ( const BunchCrossing& bc ) const;
96
97 private:
98 int m_bcid;
103
104 }; // class BunchCrossing
105
107 BunchCrossing operator+ ( const BunchCrossing& bc1, const BunchCrossing& bc2 );
109 BunchCrossing operator- ( const BunchCrossing& bc1, const BunchCrossing& bc2 );
110
112 int distance( const BunchCrossing bc1, const BunchCrossing bc2 );
113
114} // namespace Trig
115
117std::ostream& operator<< ( std::ostream& out, const Trig::BunchCrossing& bc );
119MsgStream& operator<< ( MsgStream& out, const Trig::BunchCrossing& bc );
120
121#endif // TRIGBUNCHCROSSINGTOOL_BUNCHCROSSING_H
std::ostream & operator<<(std::ostream &out, const Trig::BunchCrossing &bc)
Output operator for printing BunchCrossing objects.
A smart integer class representing bunch crossings.
BunchCrossing & operator--()
Operator pushing the object to the previous bunch crossing.
void setIntensityBeam1(float intensity)
Set the "intensity" of beam 1 in this bunch crossing.
BunchCrossing & operator+=(const BunchCrossing &bc)
Operator adding another BunchCrossing object.
void setBCID(int bcid)
Set the BCID of this bunch crossing.
bool operator==(const BunchCrossing &bc) const
Equality operator for bunch crossings.
float intensityBeam2() const
Get the "intensity" of beam 2 in this bunch crossing.
BunchCrossing(int bcid=0, float intBeam1=1.0, float intBeam2=1.0)
Constructor with a value.
int gapTo(const BunchCrossing &bc) const
Distance to a following bunch crossing.
int m_bcid
The BCID of this bunch crossing.
int distance(const BunchCrossing &bc) const
The distance from another bunch crossing.
BunchCrossing & operator++()
Operator pushing the object to the next bunch crossing.
int gapFrom(const BunchCrossing &bc) const
Distance from a previous bunch crossing.
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.
float m_intensityBeam2
Intensity of the bunch in "beam 2" some measure.
float m_intensityBeam1
Intensity of the bunch in "beam 1" some measure.
BunchCrossing & operator=(const BunchCrossing &parent)
Assignment operator.
float intensityBeam1() const
Get the "intensity" of beam 1 in this bunch crossing.
int bcid() const
Get the BCID of this bunch crossing.
BunchCrossing & operator-=(const BunchCrossing &bc)
Operator subtracting another BunchCrossing object.
void setIntensityBeam2(float intensity)
Set the "intensity" of beam 2 in this bunch crossing.
The common trigger namespace for trigger analysis tools.
int distance(const BunchCrossing bc1, const BunchCrossing bc2)
I need this function only for technical reasons.
BunchCrossing operator+(const BunchCrossing &bc1, const BunchCrossing &bc2)
Convenience operator taking advantage of the += operator defined in the BunchCrossing class.
BunchCrossing operator-(const BunchCrossing &bc1, const BunchCrossing &bc2)
Convenience operator taking advantage of the -= operator defined in the BunchCrossing class.