Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SingleStreamingInput.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SingleStreamingInput.h
1 #ifndef FUN4ALLRAW_SINGLESTREAMINGINPUT_H
2 #define FUN4ALLRAW_SINGLESTREAMINGINPUT_H
3 
4 #include <fun4all/Fun4AllBase.h>
6 
7 #include <cstdint> // for uint64_t
8 #include <map>
9 #include <set>
10 #include <string>
11 
12 class Eventiterator;
13 class Fun4AllEvtInputPoolManager;
15 class PHCompositeNode;
16 
18 {
19  public:
20  explicit SingleStreamingInput(const std::string &name, Fun4AllEvtInputPoolManager *inman);
21  explicit SingleStreamingInput(const std::string &name);
22  ~SingleStreamingInput() override;
24  virtual void FillPool(const uint64_t) { return; }
25  virtual void FillPool(const unsigned int = 1) { return; }
26  virtual void RunNumber(const int runno) { m_RunNumber = runno; }
27  virtual int RunNumber() const { return m_RunNumber; }
28  virtual int fileopen(const std::string &filename) override;
29  virtual int fileclose() override;
30  virtual int AllDone() const { return m_AllDone; }
31  virtual void AllDone(const int i) { m_AllDone = i; }
32  virtual void EventNumberOffset(const int i) { m_EventNumberOffset = i; }
33  virtual void Print(const std::string &what = "ALL") const override;
34  virtual void CleanupUsedPackets(const uint64_t) { return; }
35  virtual bool CheckPoolDepth(const uint64_t bclk);
36  virtual void ClearCurrentEvent();
37  virtual Eventiterator *GetEventiterator() const { return m_EventIterator; }
38  virtual Fun4AllEvtInputPoolManager *InputManager() { return m_InputMgr; }
39  virtual void InputManager(Fun4AllEvtInputPoolManager *in) { m_InputMgr = in; }
42  virtual void CreateDSTNode(PHCompositeNode *) { return; }
43  virtual void ConfigureStreamingInputManager() {return;}
44  virtual void SubsystemEnum(const int id) {m_SubsystemEnum = id;}
45  virtual int SubsystemEnum() const {return m_SubsystemEnum;}
46 
47  private:
49  Fun4AllEvtInputPoolManager *m_InputMgr = nullptr;
51  unsigned int m_EventNumberOffset = 1; // packet event counters start at 0 but we start with event number 1
52  int m_RunNumber = 0;
54  int m_AllDone = 0;
55  int m_SubsystemEnum {0};
56  std::map<uint64_t, std::set<int>> m_BeamClockFEE;
57  std::map<int, uint64_t> m_FEEBclkMap;
58  std::set<uint64_t> m_BclkStack;
59 };
60 
61 #endif