Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #ifndef FUN4ALLRAW_SINGLETPCPOOLINPUT_H
0002 #define FUN4ALLRAW_SINGLETPCPOOLINPUT_H
0003 
0004 #include "SingleStreamingInput.h"
0005 
0006 #include <array>
0007 #include <list>
0008 #include <map>
0009 #include <set>
0010 #include <string>
0011 #include <vector>
0012 
0013 class TpcRawHit;
0014 class Packet;
0015 
0016 class SingleTpcPoolInput : public SingleStreamingInput
0017 {
0018  public:
0019   explicit SingleTpcPoolInput(const std::string &name);
0020   ~SingleTpcPoolInput() override = default;
0021   void FillPool(const uint64_t) override;
0022   void CleanupUsedPackets(const uint64_t bclk) override;
0023   bool CheckPoolDepth(const uint64_t bclk) override;
0024   void ClearCurrentEvent() override;
0025   bool GetSomeMoreEvents(const uint64_t bclk);
0026 
0027   void Print(const std::string &what = "ALL") const override;
0028   void CreateDSTNode(PHCompositeNode *topNode) override;
0029   void SetBcoRange(const unsigned int i) { m_BcoRange = i; }
0030   void SetMaxTpcTimeSamples(const unsigned int i) { m_max_tpc_time_samples = i; }
0031   void ConfigureStreamingInputManager() override;
0032   void SetNegativeBco(const unsigned int value) { m_NegativeBco = value; }
0033   const std::map<int, std::set<uint64_t>> &BclkStackMap() const override { return m_BclkStackPacketMap; }
0034 
0035  private:
0036   unsigned int m_NumSpecialEvents{0};
0037   unsigned int m_BcoRange{0};
0038   unsigned int m_NegativeBco{0};
0039   unsigned int m_max_tpc_time_samples{425};
0040   bool m_skipEarlyEvents{true};
0041   //! map bco to packet
0042   std::map<unsigned int, uint64_t> m_packet_bco;
0043 
0044   std::map<uint64_t, std::set<int>> m_BeamClockFEE;
0045   std::map<uint64_t, std::vector<TpcRawHit *>> m_TpcRawHitMap;
0046   std::map<int, uint64_t> m_FEEBclkMap;
0047   std::set<uint64_t> m_BclkStack;
0048 };
0049 
0050 #endif