]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/CDB/AliCDBRunRange.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / STEER / CDB / AliCDBRunRange.h
CommitLineData
9e1ceb13 1#ifndef ALI_CDB_RUN_RANGE_H
2#define ALI_CDB_RUN_RANGE_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/////////////////////////////////////////////////////////////////////
8// //
9// class AliCDBRunRange //
10// defines the run validity range of the object: //
11// [fFirstRun, fLastRun] //
12// //
13/////////////////////////////////////////////////////////////////////
14
15#include <TObject.h>
16
17class AliCDBRunRange: public TObject {
18
5078a13f 19 public:
20 AliCDBRunRange();
21 AliCDBRunRange(Int_t firstRun, Int_t lastRun);
84090f85 22
5078a13f 23 virtual ~AliCDBRunRange();
9e1ceb13 24
9e1ceb13 25
5078a13f 26 Int_t GetFirstRun() const {return fFirstRun;};
27 Int_t GetLastRun() const {return fLastRun;};
9e1ceb13 28
5078a13f 29 void SetFirstRun(Int_t firstRun) {fFirstRun = firstRun;};
30 void SetLastRun(Int_t lastRun) {fLastRun = lastRun;};
9e1ceb13 31
5078a13f 32 void SetRunRange(Int_t firstRun, Int_t lastRun)
33 {fFirstRun=firstRun; fLastRun = lastRun;};
9e1ceb13 34
9e1ceb13 35
5078a13f 36 Bool_t IsValid() const;
9e1ceb13 37
5078a13f 38 Bool_t IsAnyRange() const {return fFirstRun < 0 && fLastRun < 0;};
9e1ceb13 39
5078a13f 40 Bool_t Overlaps(const AliCDBRunRange& other) const;
84090f85 41
5078a13f 42 Bool_t Comprises(const AliCDBRunRange& other) const;
9e1ceb13 43
5078a13f 44 virtual Bool_t IsEqual(const TObject *obj) const;
9e1ceb13 45
5078a13f 46 static Int_t Infinity() {return fgkInfinity;}
9e1ceb13 47
5078a13f 48 private:
49
50 Int_t fFirstRun; // first valid run
51 Int_t fLastRun; // last valid run
52
53 static const Int_t fgkInfinity = 999999999; //! Flag for "infinity"
54
55 ClassDef(AliCDBRunRange, 1);
9e1ceb13 56};
57
58
59#endif