File indexing completed on 2025-08-05 08:16:15
0001 #ifndef FUN4ALLRAW_SINGLEHCALTRIGGERINPUT_H
0002 #define FUN4ALLRAW_SINGLEHCALTRIGGERINPUT_H
0003
0004 #include "SingleTriggerInput.h"
0005
0006 #include <cstdint>
0007 #include <list>
0008 #include <map>
0009 #include <set>
0010 #include <string>
0011 #include <vector>
0012
0013 class OfflinePacket;
0014 class Packet;
0015 class PHCompositeNode;
0016
0017 class SingleHcalTriggerInput : public SingleTriggerInput
0018 {
0019 public:
0020 explicit SingleHcalTriggerInput(const std::string &name);
0021 ~SingleHcalTriggerInput() override;
0022 void FillPool(const unsigned int keep) override;
0023 void CleanupUsedPackets(const int eventno) override;
0024 void ClearCurrentEvent() override;
0025 void Print(const std::string &what = "ALL") const override;
0026 void CreateDSTNode(PHCompositeNode *topNode) override;
0027 void CleanupUsedLocalPackets(const int eventno);
0028 void SetFEMClockProblemFlag(bool b = true) { m_FEMClockProblemFlag = b; }
0029 bool FEMClockProblemFlag() const { return m_FEMClockProblemFlag; }
0030 void SetClockReferencePacket(const int i) { m_ClockReferencePacket = i; }
0031 int ClockReferencePacket() const { return m_ClockReferencePacket; }
0032
0033 private:
0034 void CheckFEMClock();
0035 void CheckFEMEventNumber();
0036 int ShiftEvents(int pktid, int offset);
0037 int m_ClockReferencePacket{0};
0038 bool m_FEMClockProblemFlag{false};
0039 std::set<int> m_BadBCOPacketSet;
0040 std::map<int, std::vector<OfflinePacket *>> m_LocalPacketMap;
0041 std::map<int, uint64_t> m_EventRefBCO;
0042 };
0043
0044 #endif