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 19 of file OnlineLuminosityRecord.h.

Constructor & Destructor Documentation

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

Definition at line 17 of file OnlineLuminosityRecord.cc.

References online::Luminosity_v1::avgPileUp, avgPileUp_, online::Luminosity_v1::instLumi, instLumi_, online::Luminosity_v1::lumiNibble, lumiNibble_, online::Luminosity_v1::lumiSection, lumiSection_, seconds(), online::Luminosity_v1::timestamp, and timestamp_.

18 {
19  // DIP timestamp is in milliseconds
20  const uint64_t seconds = lumi.timestamp / 1000;
21  const uint32_t microseconds = (lumi.timestamp % 1000) * 1000;
22  timestamp_ = edm::Timestamp((seconds<<32) | microseconds );
23  instLumi_ = lumi.instLumi;
24  avgPileUp_ = lumi.avgPileUp;
26  lumiNibble_ = lumi.lumiNibble;
27 }
double seconds()
const uint16_t lumiNibble
const uint16_t lumiSection
const uint64_t timestamp
unsigned long long uint64_t
Definition: Time.h:15
OnlineLuminosityRecord::~OnlineLuminosityRecord ( )
virtual

Definition at line 30 of file OnlineLuminosityRecord.cc.

30 {}

Member Function Documentation

float OnlineLuminosityRecord::avgPileUp ( ) const
inline

Return the average pileup for th current nibble.

Definition at line 40 of file OnlineLuminosityRecord.h.

References avgPileUp_.

Referenced by operator<<().

float OnlineLuminosityRecord::instLumi ( ) const
inline

Return the luminosity for the current nibble.

Definition at line 37 of file OnlineLuminosityRecord.h.

References instLumi_.

Referenced by operator<<().

uint16_t OnlineLuminosityRecord::lumiNibble ( ) const
inline

Return the lumi-nibble number.

Definition at line 34 of file OnlineLuminosityRecord.h.

References lumiNibble_.

Referenced by operator<<().

34 { return lumiNibble_; }
uint16_t OnlineLuminosityRecord::lumiSection ( ) const
inline

Return the lumi-section number.

Definition at line 31 of file OnlineLuminosityRecord.h.

References lumiSection_.

Referenced by operator<<().

31 { return lumiSection_; }
const edm::Timestamp& OnlineLuminosityRecord::timestamp ( ) const
inline

Return the time when the lumi was recorded.

Definition at line 28 of file OnlineLuminosityRecord.h.

References timestamp_.

Referenced by operator<<().

28 { return timestamp_; }

Member Data Documentation

float OnlineLuminosityRecord::avgPileUp_
private

Definition at line 47 of file OnlineLuminosityRecord.h.

Referenced by avgPileUp(), and OnlineLuminosityRecord().

float OnlineLuminosityRecord::instLumi_
private

Definition at line 46 of file OnlineLuminosityRecord.h.

Referenced by instLumi(), and OnlineLuminosityRecord().

uint16_t OnlineLuminosityRecord::lumiNibble_
private

Definition at line 49 of file OnlineLuminosityRecord.h.

Referenced by lumiNibble(), and OnlineLuminosityRecord().

uint16_t OnlineLuminosityRecord::lumiSection_
private

Definition at line 48 of file OnlineLuminosityRecord.h.

Referenced by lumiSection(), and OnlineLuminosityRecord().

edm::Timestamp OnlineLuminosityRecord::timestamp_
private

Definition at line 45 of file OnlineLuminosityRecord.h.

Referenced by OnlineLuminosityRecord(), and timestamp().