Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TpcTpotEventInfov1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TpcTpotEventInfov1.h
1 
7 #ifndef TRACKBASE_TPCTPOTEVENTINFOV1_H
8 #define TRACKBASE_TPCTPOTEVENTINFOV1_H
9 
10 #include "TpcTpotEventInfo.h"
11 #include "TrkrDefs.h"
12 
13 #include <iostream>
14 
15 class PHObject;
16 
22 {
23  public:
26 
28  ~TpcTpotEventInfov1() override = default;
29  // PHObject virtual overloads
30  void identify(std::ostream& os = std::cout) const override;
31  void Reset() override
32  {
33  std::fill_n(&m_bco[0][0][0],100,UINT64_MAX);
34  std::fill_n(&m_lvl1_count[0][0][0],100,UINT32_MAX);
35  std::fill_n(&m_endat_count[0][0][0],100,UINT32_MAX);
36  std::fill_n(&m_last_bco[0][0][0],100,UINT64_MAX);
37  std::fill_n(&m_modebits[0][0][0],100,UINT8_MAX);
38  }
39  int isValid() const override;
40  PHObject* CloneMe() const override { return new TpcTpotEventInfov1(*this); }
41 
43  void CopyFrom( const TpcTpotEventInfo& ) override;
44 
46  void CopyFrom( TpcTpotEventInfo* source ) override
47  { CopyFrom( *source ); }
48 
49  //
50  // event tagger info
51  //
52 
54 
55  uint64_t getBCO(SectorID sector, PCIeEndPointID PCIe, TaggerID tagger) const override { return m_bco[sector][PCIe][tagger]; }
56  void setBCO(uint64_t bco, SectorID sector, PCIeEndPointID PCIe, TaggerID tagger) override { m_bco[sector][PCIe][tagger] = bco; }
57  uint32_t getLevel1Count(SectorID sector, PCIeEndPointID PCIe, TaggerID tagger) const override { return m_lvl1_count[sector][PCIe][tagger]; }
58  void setLevel1Count(uint32_t lvl1count, SectorID sector, PCIeEndPointID PCIe, TaggerID tagger) override { m_lvl1_count[sector][PCIe][tagger] = lvl1count; }
59  uint32_t getEnDatCount(SectorID sector, PCIeEndPointID PCIe, TaggerID tagger) const override { return m_endat_count[sector][PCIe][tagger]; }
60  void setEnDatCount(uint32_t endatcount, SectorID sector, PCIeEndPointID PCIe, TaggerID tagger) override { m_endat_count[sector][PCIe][tagger] = endatcount; }
61  uint64_t getLastBCO(SectorID sector, PCIeEndPointID PCIe, TaggerID tagger) const override { return m_last_bco[sector][PCIe][tagger]; }
62  void setLastBCO(uint64_t lastbco, SectorID sector, PCIeEndPointID PCIe, TaggerID tagger) override { m_last_bco[sector][PCIe][tagger] = lastbco; }
63  uint8_t getModebits(SectorID sector, PCIeEndPointID PCIe, TaggerID tagger) const override { return m_modebits[sector][PCIe][tagger]; }
64  void setModebits(uint8_t modebits, SectorID sector, PCIeEndPointID PCIe, TaggerID tagger) override { m_modebits[sector][PCIe][tagger] = modebits; }
65 
66  protected:
67 
68  uint64_t m_bco[25][2][2]{};
69  uint32_t m_lvl1_count[25][2][2]{};
70  uint32_t m_endat_count[25][2][2]{};
71  uint64_t m_last_bco[25][2][2]{};
72  uint8_t m_modebits[25][2][2]{};
73 
74  ClassDefOverride(TpcTpotEventInfov1, 1)
75 };
76 
77 #endif //TRACKBASE_TPCTPOTEVENTINFOV1_H