Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:18

0001 #ifndef DATAFORMATS_TCDS_L1AINFO_H
0002 #define DATAFORMATS_TCDS_L1AINFO_H
0003 
0004 //---------------------------------------------------------------------------
0005 //!  \class L1aInfo
0006 //!  \brief Class to contain L1 accept history information from TCDS FED
0007 //!
0008 //!  \author Remi Mommsen - Fermilab
0009 //---------------------------------------------------------------------------
0010 
0011 #include <cstdint>
0012 #include <ostream>
0013 
0014 #include "DataFormats/TCDS/interface/TCDSRaw.h"
0015 
0016 class L1aInfo {
0017 public:
0018   L1aInfo();
0019 
0020   L1aInfo(const tcds::L1aInfo_v1&);
0021 
0022   L1aInfo(int16_t index, uint64_t orbitNr, uint16_t bxid, uint8_t eventtype) {
0023     index_ = index;
0024     orbitNr_ = orbitNr;
0025     bxid_ = bxid;
0026     eventType_ = eventtype;
0027   };
0028 
0029   // The history index, where -1 means the previous L1 accept, -2 the one before that, etc.
0030   int16_t getIndex() const { return index_; }
0031 
0032   // The orbit number when the L1 accept occured
0033   uint64_t getOrbitNr() const { return orbitNr_; }
0034 
0035   // The bunch-crossing counter for the L1 accept
0036   uint16_t getBXID() const { return bxid_; }
0037 
0038   // The event type of the L1 accept corresponding to edm::EventAuxiliary::ExperimentType
0039   uint8_t getEventType() const { return eventType_; }
0040 
0041 private:
0042   uint64_t orbitNr_;
0043   uint16_t bxid_;
0044   int16_t index_;
0045   uint8_t eventType_;
0046 };
0047 
0048 /// Pretty-print operator for L1aInfo
0049 std::ostream& operator<<(std::ostream&, const L1aInfo&);
0050 
0051 #endif  // DATAFORMATS_TCDS_L1AINFO_H