Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-04-02 08:12:37

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef BCOLUMICOUNT_BCOINFOV1_H
0004 #define BCOLUMICOUNT_BCOINFOV1_H
0005 
0006 #include "BcoInfo.h"
0007 
0008 #include <array>
0009 #include <iostream>
0010 
0011 class BcoInfov1 : public BcoInfo
0012 {
0013  public:
0014   /// ctor
0015   BcoInfov1() = default;
0016 
0017   /// dtor
0018   ~BcoInfov1() override = default;
0019 
0020   ///  Clear Event
0021   void Reset() override;
0022 
0023   /** identify Function from PHObject
0024       @param os Output Stream
0025    */
0026   void identify(std::ostream& out = std::cout) const override;
0027 
0028   /// isValid returns non zero if object contains valid data
0029   int isValid() const override;
0030 
0031   uint64_t get_previous_bco() const override { return bco[0]; }
0032   uint64_t get_current_bco() const override { return bco[1]; }
0033   uint64_t get_future_bco() const override { return bco[2]; }
0034 
0035   void set_previous_bco(uint64_t val) override { bco[0] = val; }
0036   void set_current_bco(uint64_t val) override { bco[1] = val; }
0037   void set_future_bco(uint64_t val) override { bco[2] = val; }
0038 
0039   int get_previous_evtno() const override { return evtno[0]; }
0040   int get_current_evtno() const override { return evtno[1]; }
0041   int get_future_evtno() const override { return evtno[2]; }
0042 
0043   void set_previous_evtno(int val) override { evtno[0] = val; }
0044   void set_current_evtno(int val) override { evtno[1] = val; }
0045   void set_future_evtno(int val) override { evtno[2] = val; }
0046 
0047  private:
0048   std::array<uint64_t, 3> bco{0};
0049   std::array<int, 3> evtno{0};
0050 
0051   ClassDefOverride(BcoInfov1, 1)
0052 };
0053 
0054 #endif