EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ValRange.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ValRange.h
1 
2 #ifndef VALRANGE_H
3 #define VALRANGE_H
4 
5 #include "TObject.h"
6 #include "TString.h"
7 #include "Detector.h"
8 #include "ValTimeStamp.h"
9 #include <iostream>
10 
11 using namespace std;
12 
13 class ValContext;
14 
15 class ValRange;
16 std::ostream& operator<<(std::ostream& os, const ValRange& vldr);
17 
18 
19 class ValRange : public TObject
20 {
21 
22  public:
23 
24  ValRange();
25  ValRange(const Int_t detMask, const Int_t simMask,
26  const ValTimeStamp& tstart, const ValTimeStamp& tend,
27  const TString& source);
28  virtual ~ValRange();
29 
42  const char* AsString(Option_t* option = "") const;
43 
46  Bool_t IsCompatible(const ValContext& vldc) const;
49  Bool_t IsCompatible(const ValContext* vldc) const;
50 
51  Int_t GetDetectorMask() const { return fDetectorMask; }
52  Int_t GetSimMask() const { return fSimMask; }
53  ValTimeStamp GetTimeStart() const { return fTimeStart; }
54  ValTimeStamp GetTimeEnd() const { return fTimeEnd; }
55  TString GetDataSource() const { return fDataSource; }
56 
58  void Print(Option_t* option = "") const;
59 
62  void TrimTo(const ValRange& vldr);
63  void SetTimeStart(const ValTimeStamp& tstart) { fTimeStart = tstart; }
64  void SetTimeEnd(const ValTimeStamp& tend) { fTimeEnd = tend; }
65 
66  protected:
67 
68  Int_t fDetectorMask;
69  Int_t fSimMask;
72  TString fDataSource;
73 
74  private:
75 
76  ClassDef(ValRange,1) // ValRange version 1
77 };
78 
79 #endif // VALRANGE_H