FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairRecoEventHeader.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 // -------------------------------------------------------------------------
9 // ----- FairRecoEventHeader header file -----
10 // ----- Created 20/09/13 R.Karabowicz -----
11 // -------------------------------------------------------------------------
12 
13 #ifndef FAIRRECOEVENTHEADER_H
14 #define FAIRRECOEVENTHEADER_H
15 
16 #include <TNamed.h>
17 
24 class FairRecoEventHeader : public TNamed
25 {
26  public:
29 
31  UInt_t GetRunId() const { return fRunId; }
32 
34  Double_t GetEventTime() const { return fEventTime; }
35 
37  Double_t GetEventTimeError() const { return fEventTimeError; }
38 
40  Int_t GetIdentifier() const { return fIdentifier; }
41 
45  void SetRunId(UInt_t runid) { fRunId = runid; }
46 
51  void SetEventTime(Double_t time, Double_t terr)
52  {
53  fEventTime = time;
54  fEventTimeError = terr;
55  }
56 
60  void SetIdentifier(Int_t ident) { fIdentifier = ident; }
61 
62  virtual bool operator<(const FairRecoEventHeader& tempObj) const
63  {
64  if (fEventTime < tempObj.GetEventTime()) {
65  return true;
66  } else if (fEventTime > tempObj.GetEventTime()) {
67  return false;
68  }
69  return false;
70  }
71 
72  virtual bool operator>(const FairRecoEventHeader& tempObj) const
73  {
74  if (fEventTime > tempObj.GetEventTime()) {
75  return true;
76  } else if (fEventTime < tempObj.GetEventTime()) {
77  return false;
78  }
79  return false;
80  }
81 
82  virtual bool operator==(const FairRecoEventHeader& tempObj) const
83  {
84  if (fEventTime == tempObj.GetEventTime()) {
85  return true;
86  }
87  return false;
88  }
89 
93  virtual ~FairRecoEventHeader();
94 
95  protected:
97  UInt_t fRunId;
99  Int_t fIdentifier;
101  Double_t fEventTime;
103  Double_t fEventTimeError;
104 
106 };
107 
108 #endif
virtual bool operator>(const FairRecoEventHeader &tempObj) const
Double_t GetEventTimeError() const
void SetRunId(UInt_t runid)
virtual bool operator==(const FairRecoEventHeader &tempObj) const
ClassDef(FairRecoEventHeader, 1)
UInt_t GetRunId() const
virtual bool operator<(const FairRecoEventHeader &tempObj) const
void SetEventTime(Double_t time, Double_t terr)
Double_t GetEventTime() const
void SetIdentifier(Int_t ident)
Int_t GetIdentifier() const