ATLAS Offline Software
TGoodRunsList.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 /**********************************************************************************
7  * Class : TGoodRunsList *
8  * *
9  * Authors (alphabetical): *
10  * Max Baak <mbaak@cern.ch> - CERN, Switzerland *
11  **********************************************************************************/
12 
13 #ifndef __TGoodRunsList__
14 #define __TGoodRunsList__
15 
16 #include "GoodRunsLists/TGoodRun.h"
18 #include "TNamed.h"
19 #include "TString.h"
20 #include <map>
21 #include <vector>
22 #include <string>
23 
24 namespace Root {
25 
26  class TGoodRunsList : public std::map< Int_t, TGoodRun >, public TNamed {
27 
28  public:
29 
30  TGoodRunsList();
31  TGoodRunsList(const char* name);
32  virtual ~TGoodRunsList();
33 
34  void AddGRL(const TGoodRunsList& other);
39 
40  Bool_t HasTriggerInfo() const;
41  Bool_t HasRun( Int_t runnr ) const;
42  Bool_t HasRunLumiBlock( Int_t runnr, Int_t lumiblocknr ) const ;
43  Bool_t HasSameGRLInfo( const TGoodRunsList& other ) const;
44  Bool_t HasOverlapWith( const TGoodRunsList& other, bool verb=false ) const;
45 
46  void AddRunLumiBlock( Int_t runnr, Int_t lumiblocknr );
47  inline void SetVersion(const TString& version) { m_version = version; }
48  inline void AddMetaData(const TString& key, const TString& value) { m_metadata[key] = value; }
49  inline void SetMetaData(const std::map<TString,TString>& metadata) { m_metadata = metadata; }
50  inline void SetCheckGRLInfo(Bool_t check=kTRUE) { m_checkGRLInfo=check; }
51 
52  inline const Bool_t& GetCheckGRLInfo() const { return m_checkGRLInfo; }
53  inline const TString& GetVersion() const { return m_version; }
54  inline const std::map<TString,TString>& GetMetaData() const { return m_metadata; }
55  inline unsigned int GetMetaDataSize() const { return m_metadata.size(); }
56 
57  void Summary(Bool_t verbose = kFALSE) const;
58  Bool_t IsEmpty() const;
59 
60  std::vector<int> GetRunlist() const;
61  std::vector<Root::TGoodRun> GetGoodRuns() const;
62  std::vector<std::string> GetTriggerList() const;
63  std::vector<std::string> GetStreamList() const;
64 
65  TString GetSuggestedName() const;
66  void Compress();
67 
68  private:
69 
70  TString m_version;
71  std::map<TString,TString> m_metadata;
72  bool m_checkGRLInfo{false};
73 
74  ClassDef(TGoodRunsList,1)
75  };
76 }
77 
78 #endif
79 
Root::TGoodRunsList::AddMetaData
void AddMetaData(const TString &key, const TString &value)
Definition: TGoodRunsList.h:58
Root
Definition: GoodRunsListSelectorTool.h:30
Root::TGoodRunsList::SetCheckGRLInfo
void SetCheckGRLInfo(Bool_t check=kTRUE)
Definition: TGoodRunsList.h:60
Root::TGoodRunsList::GetGoodRuns
std::vector< Root::TGoodRun > GetGoodRuns() const
Definition: TGoodRunsList.cxx:287
Root::TGoodRunsList::HasSameGRLInfo
Bool_t HasSameGRLInfo(const TGoodRunsList &other) const
Definition: TGoodRunsList.cxx:325
Root::TGoodRunsList::AddRunLumiBlock
void AddRunLumiBlock(Int_t runnr, Int_t lumiblocknr)
Definition: TGoodRunsList.cxx:413
athena.value
value
Definition: athena.py:124
Root::TGoodRunsList::GetMetaDataSize
unsigned int GetMetaDataSize() const
Definition: TGoodRunsList.h:65
Root::TGoodRunsList::GetMetaData
const std::map< TString, TString > & GetMetaData() const
Definition: TGoodRunsList.h:64
python.checkMetadata.metadata
metadata
Definition: checkMetadata.py:175
Root::TGoodRunsList::GetSumWith
const Root::TGoodRunsList GetSumWith(const TGoodRunsList &other) const
Definition: TGoodRunsList.cxx:123
verb
#define verb
Definition: TileRawChannel2Bytes5.cxx:15
Root::TGoodRunsList::GetPartNotIn
const Root::TGoodRunsList GetPartNotIn(const TGoodRunsList &other) const
Definition: TGoodRunsList.cxx:175
Root::TGoodRunsList::TGoodRunsList
TGoodRunsList()
Root::TGoodRunsList::GetVersion
const TString & GetVersion() const
Definition: TGoodRunsList.h:63
Root::TGoodRunsList::IsEmpty
Bool_t IsEmpty() const
Definition: TGoodRunsList.cxx:376
TGoodRun.h
Root::TGoodRunsList::Compress
void Compress()
Definition: TGoodRunsList.cxx:429
Root::TGoodRunsList::m_metadata
std::map< TString, TString > m_metadata
Definition: TGoodRunsList.h:81
Root::TGoodRunsList::SetMetaData
void SetMetaData(const std::map< TString, TString > &metadata)
Definition: TGoodRunsList.h:59
Root::TGoodRunsList::GetTriggerList
std::vector< std::string > GetTriggerList() const
Definition: TGoodRunsList.cxx:297
Root::TGoodRunsList::SetVersion
void SetVersion(const TString &version)
Definition: TGoodRunsList.h:57
beamspotman.runnr
runnr
Definition: beamspotman.py:724
Root::TGoodRunsList::HasRun
Bool_t HasRun(Int_t runnr) const
Definition: TGoodRunsList.cxx:214
Root::TGoodRunsList::GetPartOnlyIn
const Root::TGoodRunsList GetPartOnlyIn(const TGoodRunsList &other) const
Definition: TGoodRunsList.cxx:168
Root::TGoodRunsList::Summary
void Summary(Bool_t verbose=kFALSE) const
Definition: TGoodRunsList.cxx:253
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Root::TGoodRunsList::GetRunlist
std::vector< int > GetRunlist() const
Definition: TGoodRunsList.cxx:277
Root::TGoodRunsList
Definition: TGoodRunsList.h:31
LArNewCalib_Delay_OFC_Cali.check
check
Definition: LArNewCalib_Delay_OFC_Cali.py:258
Root::TGoodRunsList::~TGoodRunsList
virtual ~TGoodRunsList()
Definition: TGoodRunsList.cxx:27
get_generator_info.version
version
Definition: get_generator_info.py:33
Root::TGoodRunsList::GetCheckGRLInfo
const Bool_t & GetCheckGRLInfo() const
Definition: TGoodRunsList.h:62
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
python.TriggerHandler.verbose
verbose
Definition: TriggerHandler.py:297
Root::TGoodRunsList::m_checkGRLInfo
bool m_checkGRLInfo
Definition: TGoodRunsList.h:82
Root::TGoodRunsList::AddGRL
void AddGRL(const TGoodRunsList &other)
Definition: TGoodRunsList.cxx:32
Root::TGoodRunsList::HasTriggerInfo
Bool_t HasTriggerInfo() const
Definition: TGoodRunsList.cxx:229
Root::TGoodRunsList::HasOverlapWith
Bool_t HasOverlapWith(const TGoodRunsList &other, bool verb=false) const
Definition: TGoodRunsList.cxx:242
Root::TGoodRunsList::m_version
TString m_version
Definition: TGoodRunsList.h:80
Root::TGoodRunsList::GetStreamList
std::vector< std::string > GetStreamList() const
Definition: TGoodRunsList.cxx:311
checker_macros.h
Define macros for attributes used to control the static checker.
Root::TGoodRunsList::HasRunLumiBlock
Bool_t HasRunLumiBlock(Int_t runnr, Int_t lumiblocknr) const
Definition: TGoodRunsList.cxx:221
Root::TGoodRunsList::GetSuggestedName
TString GetSuggestedName() const
Definition: TGoodRunsList.cxx:390
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
Root::TGoodRunsList::GetOverlapWith
const Root::TGoodRunsList GetOverlapWith(const TGoodRunsList &other) const
Definition: TGoodRunsList.cxx:83