ATLAS Offline Software
Loading...
Searching...
No Matches
TGRLCollection.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6/**********************************************************************************
7 * Class : TGRLCollection *
8 * *
9 * Authors (alphabetical): *
10 * Max Baak <mbaak@cern.ch> - CERN, Switzerland *
11 **********************************************************************************/
12
13#ifndef GOODRUNSLISTS_TGRLCOLLECTION_H
14#define GOODRUNSLISTS_TGRLCOLLECTION_H
15
17#include "TObject.h"
18#include <vector>
19
20namespace Root {
21
22 enum BoolOperation { OR, AND };
23
24 class TGRLCollection : public std::vector< TGoodRunsList >, public TObject {
25
26 public:
27
28 TGRLCollection( Bool_t checkGRLInfo=kFALSE ) ;
29 virtual ~TGRLCollection();
30
31 TGRLCollection(const Root::TGRLCollection& other) = default;
32 TGRLCollection& operator=(const TGRLCollection& other) = default;
35
36 void SetVersion( const TString& version );
37 void SetMetaData( const std::map<TString,TString>& metadata );
38 inline void SetCheckGRLInfo( Bool_t check=kTRUE ) { m_checkGRLInfo=check; }
39
40 Bool_t HasRun( const Int_t& runnr ) const;
41 Bool_t HasRunLumiBlock( const Int_t& runnr, const Int_t& lumiblocknr ) const ;
42 Bool_t IsEmpty() const;
43 Bool_t HasGoodRunsList( const TString& name ) const;
44
45 const TGoodRunsList GetMergedGoodRunsList( const Root::BoolOperation& operation = OR ) const ;
46 const TGoodRunsList GetGoodRunsList( unsigned int idx ) const ;
47 std::vector<TGoodRunsList>::iterator find( const TString& name );
48 std::vector<TGoodRunsList>::const_iterator find( const TString& name ) const ;
49 const Root::TGRLCollection GetMergedGRLCollection( const Root::BoolOperation& operation = OR) const ;
50 const Root::TGRLCollection GetOverlapWith(const TGoodRunsList& other) const ;
51
52 void Reset() ;
53 void Summary(Bool_t verbose=kFALSE) const ;
54
55 private:
56
58
59 ClassDef(TGRLCollection,1)
60 };
61}
62
63#endif
64
TGRLCollection(Root::TGRLCollection &&)=default
const TGoodRunsList GetMergedGoodRunsList(const Root::BoolOperation &operation=OR) const
TGRLCollection(const Root::TGRLCollection &other)=default
const TGoodRunsList GetGoodRunsList(unsigned int idx) const
TGRLCollection & operator=(const TGRLCollection &other)=default
void SetVersion(const TString &version)
TGRLCollection & operator=(TGRLCollection &&other)=default
void SetMetaData(const std::map< TString, TString > &metadata)
Bool_t HasRun(const Int_t &runnr) const
Bool_t HasRunLumiBlock(const Int_t &runnr, const Int_t &lumiblocknr) const
const Root::TGRLCollection GetOverlapWith(const TGoodRunsList &other) const
void Summary(Bool_t verbose=kFALSE) const
const Root::TGRLCollection GetMergedGRLCollection(const Root::BoolOperation &operation=OR) const
TGRLCollection(Bool_t checkGRLInfo=kFALSE)
Bool_t HasGoodRunsList(const TString &name) const
std::vector< TGoodRunsList >::iterator find(const TString &name)
void SetCheckGRLInfo(Bool_t check=kTRUE)
bool verbose
Definition hcg.cxx:73