Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:09

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef MVTXEVENTINFOV2_H
0004 #define MVTXEVENTINFOV2_H
0005 
0006 /***************************/
0007 /* MVTX event header class */
0008 /*       Cameron Dean      */
0009 /*   MIT (ctdean@mit.edu)  */
0010 /*          09/11/2023     */
0011 /***************************/
0012 
0013 #include <iostream>
0014 
0015 #include <set>
0016 
0017 #include "MvtxEventInfo.h"
0018 
0019 typedef std::pair<uint64_t, uint64_t> strobe_L1_pair;
0020 
0021 ///
0022 class MvtxEventInfov2 : public MvtxEventInfo
0023 {
0024  public:
0025   MvtxEventInfov2() = default;
0026 
0027   /// dtor
0028   virtual ~MvtxEventInfov2() = default;
0029 
0030   PHObject *CloneMe() const override;
0031 
0032   /// Clear Event
0033   void Reset() override;
0034 
0035   /** identify Function from PHObject
0036       @param os Output Stream
0037    */
0038   void identify(std::ostream &os = std::cout) const override;
0039 
0040   /// isValid returns non zero if object contains valid data
0041   int isValid() const override;
0042 
0043   void set_number_HB(const int /*ival*/) override;
0044   int get_number_HB() const override;
0045 
0046   void set_strobe_BCO(const uint64_t strobe_BCO) override;
0047 
0048   void set_strobe_BCO_L1_BCO(const uint64_t strobe_BCO, const uint64_t L1_BCO) override;
0049 
0050   unsigned int get_number_strobes() const override;
0051   unsigned int get_number_L1s() const override;
0052 
0053   // std::set<uint64_t> get_strobe_BCOs() const;
0054   std::set<uint64_t> get_strobe_BCOs() const override;
0055   std::set<uint64_t> get_L1_BCOs() const override;
0056 
0057   std::set<uint64_t> get_strobe_BCO_from_L1_BCO(const uint64_t ival) const override;
0058   std::set<uint64_t> get_L1_BCO_from_strobe_BCO(const uint64_t ival) const override;
0059 
0060  protected:
0061   std::set<strobe_L1_pair> m_strobe_BCO_L1_BCO;
0062   std::set<uint64_t> m_strobe_BCOs;
0063 
0064   std::string m_number_L1_name = "Number L1";
0065   std::string m_number_HB_name = "Number HB";
0066 
0067  private:
0068   void warning(const std::string &func) const;
0069 
0070   int m_number_HB = -1;
0071 
0072   ClassDefOverride(MvtxEventInfov2, 1)
0073 };
0074 
0075 #endif