File indexing completed on 2026-07-16 08:13:57
0001 #ifndef BCOLUMICOUNT_STREAMINGBCORECO_H
0002 #define BCOLUMICOUNT_STREAMINGBCORECO_H
0003
0004 #include <fun4all/SubsysReco.h>
0005 #include <fun4all/Fun4AllHistoManager.h>
0006
0007 #include <string>
0008 #include <utility>
0009 #include <array>
0010
0011 class TH1;
0012
0013 class StreamingBcoReco : public SubsysReco
0014 {
0015 public:
0016 StreamingBcoReco(const std::string &name = "STREAMINGBCOLUMIRECO");
0017 ~StreamingBcoReco() override = default;
0018
0019 int Init(PHCompositeNode *topNode) override;
0020 int process_event(PHCompositeNode *topNode) override;
0021
0022 virtual int get_evtno() const { return m_evtno; }
0023
0024 virtual uint64_t get_bco() const { return m_bco; }
0025
0026 virtual bool get_usable_bco_tag() const { return m_usable_bco_tag; }
0027
0028 virtual std::pair<uint64_t, uint64_t> get_bco_streaming_window() const { return m_bco_streaming_window; }
0029
0030 virtual void set_default_positive_window_length(int val) { m_default_positive_window_length = val; }
0031 virtual void set_default_negative_window_length(int val) { m_default_negative_window_length = val; }
0032
0033
0034
0035 private:
0036 static int CreateNodeTree(PHCompositeNode *topNode);
0037
0038 Fun4AllHistoManager *hm = nullptr;
0039 TH1 *h_bco_diff = nullptr;
0040
0041 TH1 *h_bco_tag = nullptr;
0042
0043 uint64_t m_bco{0};
0044 int m_evtno{0};
0045 bool m_usable_bco_tag = false;
0046 std::pair<uint64_t, uint64_t> m_bco_streaming_window;
0047 unsigned int m_default_positive_window_length{340};
0048 unsigned int m_default_negative_window_length{20};
0049 };
0050
0051 #endif