Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MvtxEventInfo.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MvtxEventInfo.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef MVTXEVENTINFO_H
4 #define MVTXEVENTINFO_H
5 
6  /********************************/
7  /* Subsystem event header class */
8  /* Cameron Dean */
9  /* MIT (ctdean@mit.edu) */
10  /* 29/09/2023 */
11 /********************************/
12 
13 #include <phool/PHObject.h>
14 
15 #include <cmath>
16 #include <iostream>
17 #include <map>
18 #include <set>
19 #include <string> // for string
20 
22 class MvtxEventInfo : public PHObject
23 {
24  public:
25  MvtxEventInfo() = default;
26 
28  virtual ~MvtxEventInfo() = default;
29 
30  PHObject *CloneMe() const override;
31 
33  void Reset() override;
34 
38  void identify(std::ostream &os = std::cout) const override;
39 
41  int isValid() const override;
42 
43  void set_floatval(const std::string & /*name*/, const float /*fval*/);
44  float get_floatval(const std::string & /*name*/) const;
45 
46  void set_intval(const std::string & /*name*/, const int32_t /*ival*/);
47  int get_intval(const std::string & /*name*/) const;
48 
49  void set_int64val(const std::string & /*name*/, const int64_t /*ival*/);
50  int get_int64val(const std::string & /*name*/) const;
51 
52  void set_uintval(const std::string & /*name*/, const uint32_t /*ival*/);
53  int get_uintval(const std::string & /*name*/) const;
54 
55  void set_uint64val(const std::string & /*name*/, const uint64_t /*ival*/);
56  int get_uint64val(const std::string & /*name*/) const;
57 
58  void set_stringval(const std::string & /*name*/, const std::string & /*ival*/);
59  std::string get_stringval(const std::string & /*name*/) const;
60 
61  virtual void set_number_HB(const int /*ival*/) {};
62  virtual int get_number_HB() const { return 0; };
63 
64  virtual void set_strobe_BCO(const uint64_t /*strobe_BCO*/) {};
65 
66  virtual void set_strobe_BCO_L1_BCO(const uint64_t /*strobe_BCO*/, const uint64_t /*L1_BCO*/) {};
67 
68  virtual unsigned int get_number_strobes() const { return 0; };
69  virtual unsigned int get_number_L1s() const { return 0; };
70 
71  virtual std::set<uint64_t> get_strobe_BCOs() const { return dummySet; };
72  virtual std::set<uint64_t> get_L1_BCOs() const { return dummySet; };
73 
74  virtual std::set<uint64_t> get_strobe_BCO_from_L1_BCO(const uint64_t /*ival*/) const { return dummySet; };
75  virtual std::set<uint64_t> get_L1_BCO_from_strobe_BCO(const uint64_t /*ival*/) const { return dummySet; };
76 
77  protected:
78  std::map<std::string, int32_t> m_IntEventProperties;
79  std::map<std::string, int64_t> m_Int64EventProperties;
80  std::map<std::string, uint32_t> m_UintEventProperties;
81  std::map<std::string, uint64_t> m_Uint64EventProperties;
82  std::map<std::string, float> m_FloatEventProperties;
83  std::map<std::string, std::string> m_StringEventProperties;
84 
85  private:
86  void warning(const std::string &func) const;
87 
88  std::set<uint64_t> dummySet;
89 
90  ClassDefOverride(MvtxEventInfo, 1)
91 };
92 
93 #endif