Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:49

0001 #ifndef DATAFORMATS_ONLINEMETADATA_ONLINELUMINOSITYRECORD_H
0002 #define DATAFORMATS_ONLINEMETADATA_ONLINELUMINOSITYRECORD_H
0003 
0004 //---------------------------------------------------------------------------
0005 //!  \class OnlineLuminosityRecord
0006 //!  \brief Class to contain the online luminosity from soft FED 1022
0007 //!
0008 //!  \author Remi Mommsen - Fermilab
0009 //---------------------------------------------------------------------------
0010 
0011 #include <cstdint>
0012 #include <ostream>
0013 
0014 #include "DataFormats/OnlineMetaData/interface/OnlineMetaDataRaw.h"
0015 #include "DataFormats/Provenance/interface/Timestamp.h"
0016 
0017 class OnlineLuminosityRecord {
0018 public:
0019   OnlineLuminosityRecord();
0020   OnlineLuminosityRecord(const online::Luminosity_v1&);
0021   virtual ~OnlineLuminosityRecord();
0022 
0023   /// Return the time when the lumi was recorded
0024   const edm::Timestamp& timestamp() const { return timestamp_; }
0025 
0026   /// Return the lumi-section number
0027   uint16_t lumiSection() const { return lumiSection_; }
0028 
0029   /// Return the lumi-nibble number
0030   uint16_t lumiNibble() const { return lumiNibble_; }
0031 
0032   /// Return the luminosity for the current nibble
0033   float instLumi() const { return instLumi_; }
0034 
0035   /// Return the average pileup for th current nibble
0036   float avgPileUp() const { return avgPileUp_; }
0037 
0038 private:
0039   edm::Timestamp timestamp_;
0040   float instLumi_;
0041   float avgPileUp_;
0042   uint16_t lumiSection_;
0043   uint16_t lumiNibble_;
0044 };
0045 
0046 /// Pretty-print operator for OnlineLuminosityRecord
0047 std::ostream& operator<<(std::ostream&, const OnlineLuminosityRecord&);
0048 
0049 #endif  // DATAFORMATS_ONLINEMETADATA_ONLINELUMINOSITYRECORD_H