Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:20:48

0001 #ifndef __ONCSSUB_IDMVTXV3_H__
0002 #define __ONCSSUB_IDMVTXV3_H__
0003 
0004 #include "oncsSubevent.h"
0005 
0006 #include "mvtx_decoder/PayLoadCont.h"
0007 #include "mvtx_decoder/GBTLink.h"
0008 
0009 #include "mvtx_decoder/mvtx_utils.h"
0010 
0011 #include <map>
0012 #include <set>
0013 #include <vector>
0014 #include <bitset>
0015 #include <stdint.h>
0016 #include <unordered_map>
0017 
0018 #ifndef __CINT__
0019 class WINDOWSEXPORT oncsSub_idmvtxv3 : public  oncsSubevent_w1 {
0020 #else
0021 class  oncsSub_idmvtxv3 : public  oncsSubevent_w1 {
0022 #endif
0023 
0024  public:
0025   explicit oncsSub_idmvtxv3(subevtdata_ptr);
0026   ~oncsSub_idmvtxv3();
0027 
0028   int iValue(const int ,const char * what) final;
0029   int iValue(const int, const int, const char* what) final;
0030   int iValue(const int, const int, const int, const char* what) final;
0031 
0032   long long int lValue(const int, const char* what) final;
0033   long long int lValue(const int, const int, const char* what) final;
0034 
0035   void * pValue(const int) final;
0036 
0037   void gdump ( const int how=EVT_HEXADECIMAL, OSTREAM& os = COUT) const; // add this to override the generic gdump
0038   void dump(OSTREAM &os = COUT) final;
0039   int getStatus() const final {return (m_decoding_failed ? -1 : 0);};
0040 
0041  protected:
0042 
0043   int decode();
0044   bool m_is_decoded;
0045   bool m_decoding_failed;
0046 
0047 
0048   struct dumpEntry
0049   {
0050     int entry = -1;
0051   };
0052 
0053   void setupLinks();
0054 
0055   static size_t mEventId;
0056   static std::unordered_map<uint16_t, dumpEntry> mFeeId2LinkID; // link fee_id to GBTLinks
0057   static std::vector<mvtx::GBTLink> mGBTLinks;
0058 
0059   std::set<uint16_t> feeid_set;
0060   uint8_t *payload_start = nullptr;
0061   unsigned int payload_length = 0;
0062   unsigned int payload_position = 0;
0063 
0064  };
0065 
0066 #endif /* __ONCSSUB_IDMVTXV3_H__ */