CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
BSTRecord Class Reference

Class representing the Beam Synchronous Timing (BST) information included in the TCDS record. Beam parameters provided by BST are defined in: https://edms.cern.ch/document/638899/2.0. More...

#include <BSTRecord.h>

Public Types

enum  BeamMode {
  NOMODE = 0, SETUP = 1, INJPILOR = 3, INJINTR = 4,
  INJNOMN = 5, PRERAMP = 6, RAMP = 7, FLATTOP = 8,
  SQUEEZE = 9, ADJUST = 10, STABLE = 11, UNSTABLE = 12,
  BEAMDUMP = 13, RAMPDOWN = 14, RECOVERY = 15, INJDUMP = 16,
  CIRCDUMP = 17, ABORT = 18, CYCLING = 19, WBDUMP = 20,
  NOBEAM = 21
}
 
enum  Particle { PROTON = 0, LEAD = 1 }
 

Public Member Functions

 BSTRecord ()
 
 BSTRecord (const tcds::BST_v1 &)
 
uint16_t const getBeamMode () const
 
int32_t const getBeamMomentum () const
 
uint8_t const getBstMaster () const
 
uint64_t const getGpsTime () const
 
uint32_t const getIntensityBeam1 () const
 
uint32_t const getIntensityBeam2 () const
 
uint32_t const getLhcFill () const
 
uint8_t const getParticleBeam1 () const
 
uint8_t const getParticleBeam2 () const
 
uint32_t const getTurnCount () const
 

Private Attributes

uint16_t m_beamMode
 
int32_t m_beamMomentum
 
uint8_t m_bstMaster
 
uint64_t m_gpstime
 
uint32_t m_intensityBeam1
 
uint32_t m_intensityBeam2
 
uint32_t m_lhcFill
 
uint8_t m_particleBeam1
 
uint8_t m_particleBeam2
 
uint32_t m_turnCount
 

Detailed Description

Class representing the Beam Synchronous Timing (BST) information included in the TCDS record. Beam parameters provided by BST are defined in: https://edms.cern.ch/document/638899/2.0.

Author
S. Di Guida - INFN and Marconi University
Remi Mommsen - Fermilab

Definition at line 22 of file BSTRecord.h.

Member Enumeration Documentation

◆ BeamMode

Enumerator
NOMODE 
SETUP 
INJPILOR 
INJINTR 
INJNOMN 
PRERAMP 
RAMP 
FLATTOP 
SQUEEZE 
ADJUST 
STABLE 
UNSTABLE 
BEAMDUMP 
RAMPDOWN 
RECOVERY 
INJDUMP 
CIRCDUMP 
ABORT 
CYCLING 
WBDUMP 
NOBEAM 

Definition at line 24 of file BSTRecord.h.

◆ Particle

Enumerator
PROTON 
LEAD 

Definition at line 48 of file BSTRecord.h.

48  {
49  PROTON = 0,
50  LEAD = 1,
51  };

Constructor & Destructor Documentation

◆ BSTRecord() [1/2]

BSTRecord::BSTRecord ( )

Definition at line 4 of file BSTRecord.cc.

5  : m_gpstime(0),
6  m_turnCount(0),
7  m_lhcFill(0),
10  m_beamMomentum(0),
11  m_beamMode(0),
12  m_particleBeam1(0),
13  m_particleBeam2(0),
14  m_bstMaster(0) {}
uint32_t m_intensityBeam1
Definition: BSTRecord.h:91
uint64_t m_gpstime
Definition: BSTRecord.h:88
uint32_t m_turnCount
Definition: BSTRecord.h:89
uint8_t m_particleBeam2
Definition: BSTRecord.h:96
int32_t m_beamMomentum
Definition: BSTRecord.h:93
uint8_t m_particleBeam1
Definition: BSTRecord.h:95
uint32_t m_intensityBeam2
Definition: BSTRecord.h:92
uint16_t m_beamMode
Definition: BSTRecord.h:94
uint8_t m_bstMaster
Definition: BSTRecord.h:97
uint32_t m_lhcFill
Definition: BSTRecord.h:90

◆ BSTRecord() [2/2]

BSTRecord::BSTRecord ( const tcds::BST_v1 bst)

Definition at line 16 of file BSTRecord.cc.

References m_beamMomentum, and m_lhcFill.

17  : m_gpstime(((uint64_t)(bst.gpstimehigh) << 32) | bst.gpstimelow),
18  m_turnCount(((uint32_t)(bst.turnCountHigh) << 16) | bst.turnCountLow),
19  m_lhcFill(((uint32_t)(bst.lhcFillHigh) << 16) | bst.lhcFillLow),
23  m_beamMode(bst.beamMode),
24  m_particleBeam1(bst.particleTypes & 0xFF),
26  m_bstMaster(bst.bstMaster >> 8) {
27  if (m_beamMomentum == 65535) // Invalid value
28  m_beamMomentum = -1;
29  else if (m_lhcFill >= 5698) // scale factor changed from 1GeV/LSB to 120MeV/LSB
30  m_beamMomentum *= 0.120;
31 }
const uint16_t beamMode
Definition: TCDSRaw.h:81
uint32_t m_intensityBeam1
Definition: BSTRecord.h:91
const uint16_t turnCountLow
Definition: TCDSRaw.h:77
const uint16_t particleTypes
Definition: TCDSRaw.h:82
const uint16_t beamMomentum
Definition: TCDSRaw.h:83
uint64_t m_gpstime
Definition: BSTRecord.h:88
uint32_t m_turnCount
Definition: BSTRecord.h:89
const uint16_t bstMaster
Definition: TCDSRaw.h:76
uint8_t m_particleBeam2
Definition: BSTRecord.h:96
unsigned long long uint64_t
Definition: Time.h:13
const uint32_t intensityBeam1
Definition: TCDSRaw.h:84
const uint16_t turnCountHigh
Definition: TCDSRaw.h:78
const uint16_t lhcFillLow
Definition: TCDSRaw.h:79
int32_t m_beamMomentum
Definition: BSTRecord.h:93
uint8_t m_particleBeam1
Definition: BSTRecord.h:95
const uint32_t intensityBeam2
Definition: TCDSRaw.h:85
const uint32_t gpstimelow
Definition: TCDSRaw.h:72
uint32_t m_intensityBeam2
Definition: BSTRecord.h:92
const uint32_t gpstimehigh
Definition: TCDSRaw.h:73
uint16_t m_beamMode
Definition: BSTRecord.h:94
const uint16_t lhcFillHigh
Definition: TCDSRaw.h:80
uint8_t m_bstMaster
Definition: BSTRecord.h:97
uint32_t m_lhcFill
Definition: BSTRecord.h:90

Member Function Documentation

◆ getBeamMode()

uint16_t const BSTRecord::getBeamMode ( ) const
inline

◆ getBeamMomentum()

int32_t const BSTRecord::getBeamMomentum ( ) const
inline

Definition at line 79 of file BSTRecord.h.

References m_beamMomentum.

Referenced by DQMProvInfo::analyzeLhcInfo().

79 { return m_beamMomentum; }
int32_t m_beamMomentum
Definition: BSTRecord.h:93

◆ getBstMaster()

uint8_t const BSTRecord::getBstMaster ( ) const
inline

Definition at line 61 of file BSTRecord.h.

References m_bstMaster.

61 { return m_bstMaster; }
uint8_t m_bstMaster
Definition: BSTRecord.h:97

◆ getGpsTime()

uint64_t const BSTRecord::getGpsTime ( ) const
inline

Definition at line 58 of file BSTRecord.h.

References m_gpstime.

58 { return m_gpstime; }
uint64_t m_gpstime
Definition: BSTRecord.h:88

◆ getIntensityBeam1()

uint32_t const BSTRecord::getIntensityBeam1 ( ) const
inline

Definition at line 82 of file BSTRecord.h.

References m_intensityBeam1.

Referenced by DQMProvInfo::analyzeLhcInfo().

82 { return m_intensityBeam1; }
uint32_t m_intensityBeam1
Definition: BSTRecord.h:91

◆ getIntensityBeam2()

uint32_t const BSTRecord::getIntensityBeam2 ( ) const
inline

Definition at line 85 of file BSTRecord.h.

References m_intensityBeam2.

Referenced by DQMProvInfo::analyzeLhcInfo().

85 { return m_intensityBeam2; }
uint32_t m_intensityBeam2
Definition: BSTRecord.h:92

◆ getLhcFill()

uint32_t const BSTRecord::getLhcFill ( ) const
inline

Definition at line 67 of file BSTRecord.h.

References m_lhcFill.

Referenced by DQMProvInfo::analyzeLhcInfo().

67 { return m_lhcFill; }
uint32_t m_lhcFill
Definition: BSTRecord.h:90

◆ getParticleBeam1()

uint8_t const BSTRecord::getParticleBeam1 ( ) const
inline

Definition at line 73 of file BSTRecord.h.

References m_particleBeam1.

73 { return m_particleBeam1; }
uint8_t m_particleBeam1
Definition: BSTRecord.h:95

◆ getParticleBeam2()

uint8_t const BSTRecord::getParticleBeam2 ( ) const
inline

Definition at line 76 of file BSTRecord.h.

References m_particleBeam2.

76 { return m_particleBeam2; }
uint8_t m_particleBeam2
Definition: BSTRecord.h:96

◆ getTurnCount()

uint32_t const BSTRecord::getTurnCount ( ) const
inline

Definition at line 64 of file BSTRecord.h.

References m_turnCount.

64 { return m_turnCount; }
uint32_t m_turnCount
Definition: BSTRecord.h:89

Member Data Documentation

◆ m_beamMode

uint16_t BSTRecord::m_beamMode
private

Definition at line 94 of file BSTRecord.h.

Referenced by getBeamMode().

◆ m_beamMomentum

int32_t BSTRecord::m_beamMomentum
private

Definition at line 93 of file BSTRecord.h.

Referenced by BSTRecord(), and getBeamMomentum().

◆ m_bstMaster

uint8_t BSTRecord::m_bstMaster
private

Definition at line 97 of file BSTRecord.h.

Referenced by getBstMaster().

◆ m_gpstime

uint64_t BSTRecord::m_gpstime
private

Definition at line 88 of file BSTRecord.h.

Referenced by getGpsTime().

◆ m_intensityBeam1

uint32_t BSTRecord::m_intensityBeam1
private

Definition at line 91 of file BSTRecord.h.

Referenced by getIntensityBeam1().

◆ m_intensityBeam2

uint32_t BSTRecord::m_intensityBeam2
private

Definition at line 92 of file BSTRecord.h.

Referenced by getIntensityBeam2().

◆ m_lhcFill

uint32_t BSTRecord::m_lhcFill
private

Definition at line 90 of file BSTRecord.h.

Referenced by BSTRecord(), and getLhcFill().

◆ m_particleBeam1

uint8_t BSTRecord::m_particleBeam1
private

Definition at line 95 of file BSTRecord.h.

Referenced by getParticleBeam1().

◆ m_particleBeam2

uint8_t BSTRecord::m_particleBeam2
private

Definition at line 96 of file BSTRecord.h.

Referenced by getParticleBeam2().

◆ m_turnCount

uint32_t BSTRecord::m_turnCount
private

Definition at line 89 of file BSTRecord.h.

Referenced by getTurnCount().