Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EventHeaderv1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EventHeaderv1.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef FFAOBJECTS_EVENTHEADERV1_H
4 #define FFAOBJECTS_EVENTHEADERV1_H
5 
6 #include "EventHeader.h"
7 
8 #include <cstdint> // for int64_t
9 #include <iostream> // for cout, ostream
10 #include <map>
11 #include <string>
12 
13 class PHObject;
14 
16 class EventHeaderv1 : public EventHeader
17 {
18  public:
20  EventHeaderv1() = default;
22  ~EventHeaderv1() override = default;
23 
24  PHObject *CloneMe() const override { return new EventHeaderv1(*this); }
25 
27  void Reset() override;
28 
32  void identify(std::ostream &os = std::cout) const override;
33 
35  int isValid() const override;
36 
38  int get_RunNumber() const override { return RunNumber; }
40  void set_RunNumber(const int run) override { RunNumber = run; }
41 
43  int get_EvtSequence() const override { return EvtSequence; }
45  void set_EvtSequence(const int evtno) override { EvtSequence = evtno; }
46 
47  void set_floatval(const std::string &name, const float fval) override;
48  float get_floatval(const std::string &name) const override;
49 
50  void set_intval(const std::string &name, const int64_t ival) override;
51  int64_t get_intval(const std::string &name) const override;
52 
53  private:
54  int RunNumber = 0; // Run number
55  int EvtSequence = 0; // Event number
56  std::map<std::string, int64_t> m_IntEventProperties;
57  std::map<std::string, float> m_FloatEventProperties;
58 
59  ClassDefOverride(EventHeaderv1, 2)
60 };
61 
62 #endif