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 MVTXEVENTINFOV1_H
0004 #define MVTXEVENTINFOV1_H
0005 
0006 /***************************/
0007 /* MVTX event header class */
0008 /*       Cameron Dean      */
0009 /*   MIT (ctdean@mit.edu)  */
0010 /*          29/09/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 MvtxEventInfov1 : public MvtxEventInfo
0023 {
0024  public:
0025   MvtxEventInfov1() = default;
0026 
0027   /// dtor
0028   virtual ~MvtxEventInfov1() = 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_L1_BCO(const uint64_t strobe_BCO, const uint64_t L1_BCO) override;
0047 
0048   unsigned int get_number_strobes() const override;
0049   unsigned int get_number_L1s() const override;
0050 
0051   std::set<uint64_t> get_strobe_BCOs() const override;
0052   std::set<uint64_t> get_L1_BCOs() const override;
0053 
0054   std::set<uint64_t> get_strobe_BCO_from_L1_BCO(const uint64_t ival) const override;
0055   std::set<uint64_t> get_L1_BCO_from_strobe_BCO(const uint64_t ival) const override;
0056 
0057  protected:
0058   std::set<strobe_L1_pair> m_strobe_BCO_L1_BCO;
0059 
0060   std::string m_number_L1_name = "Number L1";
0061   std::string m_number_HB_name = "Number HB";
0062 
0063  private:
0064   void warning(const std::string &func) const;
0065 
0066   int m_number_HB = -1;
0067 
0068   ClassDefOverride(MvtxEventInfov1, 1)
0069 };
0070 
0071 #endif