LCOV - code coverage report
Current view: top level - STEER/CDB - AliCDBRunRange.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 8 9 88.9 %
Date: 2016-06-14 17:26:59 Functions: 11 15 73.3 %

          Line data    Source code
       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             : 
      17       13544 : class AliCDBRunRange: public TObject {
      18             : 
      19             :   public:
      20             :     AliCDBRunRange();
      21             :     AliCDBRunRange(Int_t firstRun, Int_t lastRun);
      22             : 
      23             :     virtual ~AliCDBRunRange();
      24             : 
      25             : 
      26       14952 :     Int_t       GetFirstRun() const {return fFirstRun;};
      27       11918 :     Int_t       GetLastRun() const {return fLastRun;};
      28             : 
      29        8392 :     void        SetFirstRun(Int_t firstRun) {fFirstRun = firstRun;};
      30        8392 :     void        SetLastRun(Int_t lastRun) {fLastRun = lastRun;};
      31             : 
      32             :     void        SetRunRange(Int_t firstRun, Int_t lastRun) 
      33           0 :     {fFirstRun=firstRun; fLastRun = lastRun;};
      34             : 
      35             : 
      36             :     Bool_t IsValid() const;
      37             : 
      38       16147 :     Bool_t IsAnyRange() const {return fFirstRun < 0 && fLastRun < 0;};
      39             : 
      40             :     Bool_t Overlaps(const AliCDBRunRange& other) const;
      41             : 
      42             :     Bool_t Comprises(const AliCDBRunRange& other) const;
      43             : 
      44             :     virtual Bool_t IsEqual(const TObject *obj) const;
      45             : 
      46          12 :     static Int_t Infinity() {return fgkInfinity;}
      47             : 
      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        6034 :     ClassDef(AliCDBRunRange, 1);        
      56             : };
      57             : 
      58             : 
      59             : #endif

Generated by: LCOV version 1.11