CMS 3D CMS Logo

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

Class to contain the online luminosity from soft FED 1022. More...

#include <OnlineLuminosityRecord.h>

Public Member Functions

float avgPileUp () const
 Return the average pileup for th current nibble. More...
 
float instLumi () const
 Return the luminosity for the current nibble. More...
 
uint16_t lumiNibble () const
 Return the lumi-nibble number. More...
 
uint16_t lumiSection () const
 Return the lumi-section number. More...
 
 OnlineLuminosityRecord ()
 
 OnlineLuminosityRecord (const online::Luminosity_v1 &)
 
const edm::Timestamptimestamp () const
 Return the time when the lumi was recorded. More...
 
virtual ~OnlineLuminosityRecord ()
 

Private Attributes

float avgPileUp_
 
float instLumi_
 
uint16_t lumiNibble_
 
uint16_t lumiSection_
 
edm::Timestamp timestamp_
 

Detailed Description

Class to contain the online luminosity from soft FED 1022.

Author
Remi Mommsen - Fermilab

Definition at line 17 of file OnlineLuminosityRecord.h.

Constructor & Destructor Documentation

◆ OnlineLuminosityRecord() [1/2]

OnlineLuminosityRecord::OnlineLuminosityRecord ( )

◆ OnlineLuminosityRecord() [2/2]

OnlineLuminosityRecord::OnlineLuminosityRecord ( const online::Luminosity_v1 lumi)

Definition at line 10 of file OnlineLuminosityRecord.cc.

References avgPileUp_, instLumi_, lumiNibble_, lumiSection_, seconds(), and timestamp_.

10  {
11  // DIP timestamp is in milliseconds
12  const uint64_t seconds = lumi.timestamp / 1000;
13  const uint32_t microseconds = (lumi.timestamp % 1000) * 1000;
14  timestamp_ = edm::Timestamp((seconds << 32) | microseconds);
15  instLumi_ = lumi.instLumi;
16  avgPileUp_ = lumi.avgPileUp;
17  lumiSection_ = lumi.lumiSection;
18  lumiNibble_ = lumi.lumiNibble;
19 }
double seconds()
unsigned long long uint64_t
Definition: Time.h:13

◆ ~OnlineLuminosityRecord()

OnlineLuminosityRecord::~OnlineLuminosityRecord ( )
virtual

Definition at line 21 of file OnlineLuminosityRecord.cc.

21 {}

Member Function Documentation

◆ avgPileUp()

float OnlineLuminosityRecord::avgPileUp ( ) const
inline

◆ instLumi()

float OnlineLuminosityRecord::instLumi ( ) const
inline

◆ lumiNibble()

uint16_t OnlineLuminosityRecord::lumiNibble ( ) const
inline

Return the lumi-nibble number.

Definition at line 30 of file OnlineLuminosityRecord.h.

References lumiNibble_.

Referenced by operator<<().

30 { return lumiNibble_; }

◆ lumiSection()

uint16_t OnlineLuminosityRecord::lumiSection ( ) const
inline

Return the lumi-section number.

Definition at line 27 of file OnlineLuminosityRecord.h.

References lumiSection_.

Referenced by operator<<().

27 { return lumiSection_; }

◆ timestamp()

const edm::Timestamp& OnlineLuminosityRecord::timestamp ( ) const
inline

Return the time when the lumi was recorded.

Definition at line 24 of file OnlineLuminosityRecord.h.

References timestamp_.

Referenced by operator<<().

24 { return timestamp_; }

Member Data Documentation

◆ avgPileUp_

float OnlineLuminosityRecord::avgPileUp_
private

Definition at line 41 of file OnlineLuminosityRecord.h.

Referenced by avgPileUp(), and OnlineLuminosityRecord().

◆ instLumi_

float OnlineLuminosityRecord::instLumi_
private

Definition at line 40 of file OnlineLuminosityRecord.h.

Referenced by instLumi(), and OnlineLuminosityRecord().

◆ lumiNibble_

uint16_t OnlineLuminosityRecord::lumiNibble_
private

Definition at line 43 of file OnlineLuminosityRecord.h.

Referenced by lumiNibble(), and OnlineLuminosityRecord().

◆ lumiSection_

uint16_t OnlineLuminosityRecord::lumiSection_
private

Definition at line 42 of file OnlineLuminosityRecord.h.

Referenced by lumiSection(), and OnlineLuminosityRecord().

◆ timestamp_

edm::Timestamp OnlineLuminosityRecord::timestamp_
private

Definition at line 39 of file OnlineLuminosityRecord.h.

Referenced by OnlineLuminosityRecord(), and timestamp().