Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #ifndef FUN4ALLRAW_SINGLEINTTEVENTINPUT_H
0002 #define FUN4ALLRAW_SINGLEINTTEVENTINPUT_H
0003 
0004 #include "SingleStreamingInput.h"
0005 
0006 #include <array>
0007 #include <cstdint>  // for uint64_t
0008 #include <map>
0009 #include <set>
0010 #include <string>
0011 #include <vector>
0012 
0013 class InttRawHit;
0014 class Packet;
0015 class PHCompositeNode;
0016 class intt_pool;
0017 
0018 class SingleInttEventInput : public SingleStreamingInput
0019 {
0020  public:
0021   explicit SingleInttEventInput(const std::string &name);
0022   ~SingleInttEventInput() override;
0023   void FillPool(const uint64_t minBCO) override;
0024   void CleanupUsedPackets(const uint64_t bclk) override;
0025   bool CheckPoolDepth(const uint64_t bclk) override;
0026   void ClearCurrentEvent() override;
0027   bool GetSomeMoreEvents(const uint64_t ibclk);
0028   void Print(const std::string &what = "ALL") const override;
0029   void CreateDSTNode(PHCompositeNode *topNode) override;
0030 
0031   void SetBcoRange(const unsigned int value) { m_BcoRange = value; }
0032   void ConfigureStreamingInputManager() override;
0033   void SetNegativeBco(const unsigned int value) { m_NegativeBco = value; }
0034   const std::set<uint64_t>& BclkStack() const override { return m_BclkStack; }
0035   const std::map<uint64_t, std::set<int>>& BeamClockFEE() const override { return m_BeamClockFEE; }
0036 
0037  private:
0038   Packet **plist{nullptr};
0039   unsigned int m_NumSpecialEvents{0};
0040   unsigned int m_BcoRange{0};
0041   unsigned int m_NegativeBco{0};
0042   bool bfirst {true};
0043 
0044   std::array<uint64_t, 14> m_PreviousClock{};
0045   std::array<uint64_t, 14> m_Rollover{};
0046   std::map<uint64_t, std::set<int>> m_BeamClockFEE;
0047   std::map<uint64_t, std::vector<InttRawHit *>> m_InttRawHitMap;
0048   std::map<int, uint64_t> m_FEEBclkMap;
0049   std::set<uint64_t> m_BclkStack;
0050   std::map<int, intt_pool *> poolmap;
0051 };
0052 
0053 #endif