00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __TGoodRun__
00010 #define __TGoodRun__
00011
00012 #include "GoodRunsLists/TLumiBlockRange.h"
00013 #include "TObject.h"
00014 #include <vector>
00015
00016 namespace Root {
00017
00018 class TGoodRun : public std::vector< TLumiBlockRange >, public TObject {
00019
00020 public:
00021
00022 TGoodRun() ;
00023 TGoodRun( const Int_t& runnr );
00024 virtual ~TGoodRun();
00025
00026 TGoodRun(const Root::TGoodRun& other) ;
00027 TGoodRun& operator=(const TGoodRun& other) ;
00028
00029 const Root::TGoodRun GetOverlapWith(const TGoodRun& other) const ;
00030 const Root::TGoodRun GetSumWith(const TGoodRun& other) const ;
00031 const Root::TGoodRun GetPartOnlyIn(const TGoodRun& other) const ;
00032 const Root::TGoodRun GetPartNotIn(const TGoodRun& other) const ;
00033
00034 Bool_t IsEmpty() const;
00035 Bool_t HasLB( const Int_t& lumiblocknr ) const;
00036 std::vector<Root::TLumiBlockRange>::iterator Find( const Int_t& lumiblocknr );
00037 std::vector< Root::TLumiBlockRange >::const_iterator Find( const Int_t& lumiblocknr ) const;
00038 inline Int_t GetRunNumber() const { return m_runnr; }
00039 inline void SetRunNumber( const Int_t& runnr ) { m_runnr=runnr; }
00040
00041 void Summary() const ;
00042
00043 void Sort();
00044 void Compress();
00045 void AddLB( const Int_t& lumiblocknr );
00046
00047 private:
00048
00049 Int_t m_runnr;
00050
00051
00052 struct SorterL2H {
00053 SorterL2H () {}
00054 bool operator() (const TLumiBlockRange& p1, const TLumiBlockRange& p2) {
00055 return (p1.Begin()<p2.Begin());
00056 }
00057 };
00058
00059 ClassDef(TGoodRun,1)
00060 };
00061 }
00062
00063 #endif
00064