00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __TGRLCollection__
00010 #define __TGRLCollection__
00011
00012 #include "GoodRunsLists/TGoodRunsList.h"
00013 #include "TObject.h"
00014 #include <vector>
00015
00016 namespace Root {
00017
00018 enum BoolOperation { OR, AND };
00019
00020 class TGRLCollection : public std::vector< TGoodRunsList >, public TObject {
00021
00022 public:
00023
00024 TGRLCollection( Bool_t checkGRLInfo=kFALSE ) ;
00025 virtual ~TGRLCollection();
00026
00027 TGRLCollection(const Root::TGRLCollection& other) ;
00028 TGRLCollection& operator=(const TGRLCollection& other) ;
00029
00030 void SetVersion( const TString& version );
00031 void SetMetaData( const std::map<TString,TString>& metadata );
00032 inline void SetCheckGRLInfo( Bool_t check=kTRUE ) { m_checkGRLInfo=check; }
00033
00034 Bool_t HasRun( const Int_t& runnr ) const;
00035 Bool_t HasRunLumiBlock( const Int_t& runnr, const Int_t& lumiblocknr ) const ;
00036 Bool_t IsEmpty() const;
00037 Bool_t HasGoodRunsList( const TString& name ) const;
00038
00039 const TGoodRunsList GetMergedGoodRunsList( const Root::BoolOperation& operation = OR ) const ;
00040 const TGoodRunsList GetGoodRunsList( unsigned int idx ) const ;
00041 std::vector<TGoodRunsList>::iterator find( const TString& name );
00042 std::vector<TGoodRunsList>::const_iterator find( const TString& name ) const ;
00043 const Root::TGRLCollection GetMergedGRLCollection( const Root::BoolOperation& operation = OR) const ;
00044 const Root::TGRLCollection GetOverlapWith(const TGoodRunsList& other) const ;
00045
00046 void Reset() ;
00047 void Summary(Bool_t verbose=kFALSE) const ;
00048
00049 private:
00050
00051 Bool_t m_checkGRLInfo;
00052
00053 ClassDef(TGRLCollection,1)
00054 };
00055 }
00056
00057 #endif
00058