Belle II Software  release-05-02-19
Time.h
1 #ifndef Time_hh
2 #define Time_hh
3 
4 #include "daq/slc/base/Serializable.h"
5 
6 #include <string>
7 
8 namespace Belle2 {
14  class Time : public Serializable {
15 
16  // constructors & destructors
17  public:
18  explicit Time();
19  Time(const double);
20  Time(const long, const long);
21  ~Time();
22 
23  // member methods
24  private:
25  void adjust();
26 
27  public:
28  void clear();
29  void set();
30  void set(const double);
31  void set(const long, const long);
32  double get() const;
33  long getSecond() const;
34  long getMicroSecond() const;
35  std::string toString() const;
36 
37  // for serialization
38  public:
39  virtual void readObject(Reader&);
40  virtual void writeObject(Writer&) const;
41 
42  // operators
43  public:
44  Time& operator = (const Time&);
45  bool operator == (const Time&) const;
46  Time operator + (const Time&) const;
47  Time operator - (const Time&) const;
48 
49  // member data
50  private:
51  long m_s;
52  long m_us;
53 
54  };
55 
57 }
58 
59 #endif
Belle2::Reader
Definition: Reader.h:15
Belle2::Serializable
Definition: Serializable.h:13
Belle2::Writer
Definition: Writer.h:15
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::Time
Definition: Time.h:14