Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:16:07

0001 #ifndef FUN4ALLRAW_GL1PACKETV1_H
0002 #define FUN4ALLRAW_GL1PACKETV1_H
0003 
0004 #include "Gl1Packet.h"
0005 
0006 #include <array>
0007 #include <limits>
0008 
0009 class Gl1Packetv1 : public Gl1Packet
0010 {
0011  public:
0012   Gl1Packetv1() = default;
0013   ~Gl1Packetv1() override = default;
0014 
0015   void Reset() override;
0016   void identify(std::ostream &os = std::cout) const override;
0017   void FillFrom(const Gl1Packet *pkt) override;
0018 
0019   void setPacketNumber(const unsigned int i) override { packet_nr = i; }
0020   unsigned int getPacketNumber() const override { return packet_nr; }
0021 
0022   void setBunchNumber(const uint64_t i) override { BunchNumber = i; }
0023   uint64_t getBunchNumber() const override { return BunchNumber; }
0024   void setTriggerInput(const uint64_t i) override { TriggerInput = i; }
0025   uint64_t getTriggerInput() const override { return TriggerInput; }
0026   void setTriggerVector(const uint64_t i) override { TriggerVector = i; }
0027   uint64_t getTriggerVector() const override { return TriggerVector; }
0028   void setScaler(int iscal, int index, uint64_t lval) override { scaler.at(iscal).at(index) = lval; }
0029 
0030   int iValue(const int i) const override;
0031   long long lValue(const int /*i*/, const std::string &what) const override;
0032   long long lValue(const int i, const int j) const override;
0033 
0034   void dump(std::ostream &os = std::cout) const override;
0035 
0036  protected:
0037   unsigned int packet_nr{0};
0038   uint64_t BunchNumber{std::numeric_limits<uint64_t>::max()};
0039   uint64_t TriggerInput{0};
0040   uint64_t TriggerVector{0};
0041   std::array<std::array<uint64_t, 3>, 64> scaler{{{0}}};
0042 
0043  private:
0044   ClassDefOverride(Gl1Packetv1, 1)
0045 };
0046 
0047 #endif