ATLAS Offline Software
LumiBlockRangeContainerConverter.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 : LumiBlockRangeContainerConverter
8  * *
9  * Authors (alphabetical): *
10  * Max Baak <mbaak@cern.ch> - CERN, Switzerland *
11  * Marjorie Shapiro <mdshapiro@lbl.gov>
12  **********************************************************************************/
13 
14 #ifndef LUMICALC_LUMIBLOCKRANGECONTAINERCONVERTER_H
15 #define LUMICALC_LUMIBLOCKRANGECONTAINERCONVERTER_H
16 
17 #include <map>
18 #include <vector>
19 #include "TString.h"
20 
21 namespace Root {
22  class TGoodRunsList;
23  class TGRLCollection;
24  class TGoodRunsListReader;
25  class TGoodRunsListWriter;
26 }
27 
31 
32 typedef std::map<TString,TString> grlmetadatamap;
33 
35 
36  public:
37 
40 
43 
44  xAOD::LumiBlockRangeContainer* GetLumiBlockRangeContainer(const Root::TGoodRunsList& grl, std::map<TString,TString>& metadata, TString& version) ;
45  xAOD::LumiBlockRangeContainer* GetLumiBlockRangeContainer(const Root::TGoodRunsList& grl) const;
46  xAOD::LumiBlockRangeContainer* GetLumiBlockRangeContainer(const char* xmlfile);
47  xAOD::LumiBlockRangeContainer* GetLumiBlockRangeContainerFromString( const TString& xmlstring );
48 
49  void CreateXMLFile(const Root::TGoodRunsList& grl, const TString& xmlfilename="", const TString& prefix="" );
50  void CreateXMLFile(const Root::TGRLCollection& grlcollection, const char* xmlfilename);
51  void CreateXMLFile(const xAOD::LumiBlockRangeContainer& lbc, const grlmetadatamap& metadata = grlmetadatamap(), const char* version="",
52  const TString& xmlfilename="", const TString& prefix="" );
53  void CreateXMLFiles(const Root::TGRLCollection& grlcollection, const char* prefix);
54 
55  const TString GetXMLString(const Root::TGoodRunsList& grl);
56  const TString GetXMLString(const Root::TGRLCollection& grlcollection);
57  const TString GetXMLString(const xAOD::LumiBlockRangeContainer& lbc, const grlmetadatamap& metadata = grlmetadatamap(), const char* version="" );
58  const std::vector<TString> GetXMLStrings(const Root::TGRLCollection& grlcollection);
59 
60  Root::TGoodRunsList* GetGRLObject( const xAOD::LumiBlockRangeContainer& lbc, const grlmetadatamap& metadata = grlmetadatamap(), const char* version="" ) const;
61  Root::TGoodRunsList* GetGRLObject( const char* xmlfile );
62  Root::TGoodRunsList* GetGRLObjectFromString( const TString& xmlstring );
63 
64  Root::TGRLCollection* GetGRLCollection( const char* xmlfile );
65  Root::TGRLCollection* GetGRLCollectionFromString( const TString& xmlstring );
66 
67  const TString GetSuggestedName( const xAOD::LumiBlockRangeContainer& lbc ) const ;
68 
69  private:
70 
73 
74 };
75 
76 #endif
77 
Root::TGoodRunsListReader
Definition: TGoodRunsListReader.h:34
Root
Definition: GoodRunsListSelectorTool.h:30
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
LumiBlockRangeContainerConverter
Definition: LumiBlockRangeContainerConverter.h:34
LumiBlockRangeContainerConverter::m_reader
Root::TGoodRunsListReader * m_reader
Definition: LumiBlockRangeContainerConverter.h:71
LumiBlockRangeContainerConverter::m_writer
Root::TGoodRunsListWriter * m_writer
Definition: LumiBlockRangeContainerConverter.h:72
python.checkMetadata.metadata
metadata
Definition: checkMetadata.py:175
grl
Definition: ZLumiScripts/grid/grl.py:1
Root::TGoodRunsListWriter
Definition: TGoodRunsListWriter.h:38
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
python.output.AtlRunQueryXML.CreateXMLFile
def CreateXMLFile(runlist, options, origQuery, datapath, xmlfname, xmllabel, svnversion='Unknown')
Definition: AtlRunQueryXML.py:74
grlmetadatamap
std::map< TString, TString > grlmetadatamap
Definition: LumiBlockRangeContainerConverter.h:32
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
Root::TGRLCollection
Definition: TGRLCollection.h:29
LumiBlockRangeContainerConverter::LumiBlockRangeContainerConverter
LumiBlockRangeContainerConverter(const LumiBlockRangeContainerConverter &)=delete
Root::TGoodRunsList
Definition: TGoodRunsList.h:31
get_generator_info.version
version
Definition: get_generator_info.py:33
LumiBlockRangeContainer.h
grlmetadatamap
std::map< TString, TString > grlmetadatamap
Definition: LumiBlockCollectionConverter.h:29
checker_macros.h
Define macros for attributes used to control the static checker.
LumiBlockRangeAuxContainer.h