Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #ifndef RAWBCOLUMI_SINGLEGL1POOLINPUTV2_H
0002 #define RAWBCOLUMI_SINGLEGL1POOLINPUTV2_H
0003 
0004 #include "SingleStreamingInputv2.h"
0005 
0006 #include <cstdint>
0007 #include <list>
0008 #include <map>
0009 #include <set>
0010 #include <string>
0011 #include <vector>
0012 
0013 class Gl1Packet;
0014 class PHCompositeNode;
0015 
0016 class SingleGl1PoolInputv2 : public SingleStreamingInputv2
0017 {
0018  public:
0019   explicit SingleGl1PoolInputv2(const std::string &name);
0020   ~SingleGl1PoolInputv2() override;
0021   void FillPool(const unsigned int) override;
0022   void CleanupUsedPackets(const uint64_t bclk) override;
0023   bool CheckPoolDepth(const uint64_t bclk) override;
0024   void ClearCurrentEvent() override;
0025   bool GetSomeMoreEvents();
0026   void Print(const std::string &what = "ALL") const override;
0027   void CreateDSTNode(PHCompositeNode *topNode) override;
0028   void SetBcoRange(const unsigned int i) { m_BcoRange = i; }
0029   //  void ConfigureStreamingInputManager() override;
0030   void SetNegativeWindow(const unsigned int value) { m_negative_bco_window = value; }
0031   void SetPositiveWindow(const unsigned int value) { m_positive_bco_window = value; }
0032   void SetTotalEvent(const int value) { m_total_event = value; }
0033 
0034  private:
0035   unsigned int m_NumSpecialEvents{0};
0036   unsigned int m_BcoRange{0};
0037 
0038   //! map bco to packet
0039   std::map<unsigned int, uint64_t> m_packet_bco;
0040 
0041   std::map<uint64_t, std::vector<Gl1Packet *>> m_Gl1RawHitMap;
0042   std::map<uint64_t, std::pair<uint64_t, uint64_t>> m_BCOWindows;
0043   std::map<uint64_t, int> m_BCOBunchNumber;
0044   std::set<uint64_t> m_FEEBclkMap;
0045   std::set<uint64_t> m_BclkStack;
0046 
0047   unsigned int m_negative_bco_window = 20;
0048   unsigned int m_positive_bco_window = 325;
0049   bool m_alldone_flag = {false};
0050   bool m_lastevent_flag = {false};
0051   int m_total_event = std::numeric_limits<int>::max();
0052 };
0053 
0054 #endif