File indexing completed on 2026-04-02 08:12:37
0001 #ifndef BCOLUMICOUNT_BCOLUMIRECO_H
0002 #define BCOLUMICOUNT_BCOLUMIRECO_H
0003
0004 #include <fun4all/SubsysReco.h>
0005
0006 #include <array>
0007 #include <cstdint>
0008 #include <string>
0009
0010 class PHCompositeNode;
0011 class SyncObject;
0012
0013 class BcoLumiReco : public SubsysReco
0014 {
0015 public:
0016 BcoLumiReco(const std::string &name = "BCOLUMIRECO");
0017 ~BcoLumiReco() override;
0018
0019 int Init(PHCompositeNode *topNode) override;
0020 int process_event(PHCompositeNode *topNode) override;
0021
0022 void push_bco(uint64_t value);
0023 uint64_t get_previous_bco() { return m_bco[0]; }
0024 uint64_t get_current_bco() const { return m_bco[1]; }
0025 uint64_t get_future_bco() const { return m_bco[2]; }
0026
0027 void push_evtno(int value);
0028 int get_previous_evtno() { return m_evtno[0]; }
0029 int get_current_evtno() const { return m_evtno[1]; }
0030 int get_future_evtno() const { return m_evtno[2]; }
0031
0032 private:
0033 static int CreateNodeTree(PHCompositeNode *topNode);
0034 SyncObject *m_synccopy{nullptr};
0035 SyncObject *m_tmpsync{nullptr};
0036 std::array<uint64_t, 3> m_bco{0};
0037 std::array<int, 3> m_evtno{0};
0038 };
0039
0040 #endif