ATLAS Offline Software
LumiBlockCollectionConverter.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 : LumiBlockCollectionConverter *
8  * *
9  * Authors (alphabetical): *
10  * Max Baak <mbaak@cern.ch> - CERN, Switzerland *
11  **********************************************************************************/
12 
13 #ifndef LUMICALC_LUMIBLOCKCOLLECTIONCONVERTER_H
14 #define LUMICALC_LUMIBLOCKCOLLECTIONCONVERTER_H
15 
16 #include <map>
17 #include <vector>
18 #include "TString.h"
19 
21 
22 namespace Root {
23  class TGoodRunsList;
24  class TGRLCollection;
25  class TGoodRunsListReader;
26  class TGoodRunsListWriter;
27 }
28 
30 
31 typedef std::map<TString,TString> grlmetadatamap;
32 
34 
35  public:
36 
39 
42 
43  LumiBlockCollection* GetLumiBlockCollection(const Root::TGoodRunsList& grl, std::map<TString,TString>& metadata, TString& version) ;
44  LumiBlockCollection* GetLumiBlockCollection(const Root::TGoodRunsList& grl) const;
45  LumiBlockCollection* GetLumiBlockCollection(const char* xmlfile);
46  LumiBlockCollection* GetLumiBlockCollectionFromString( const TString& xmlstring );
47 
48  void CreateXMLFile(const Root::TGoodRunsList& grl, const TString& xmlfilename="", const TString& prefix="" );
49  void CreateXMLFile(const Root::TGRLCollection& grlcollection, const char* xmlfilename);
50  void CreateXMLFile(const LumiBlockCollection& lbc, const grlmetadatamap& metadata = grlmetadatamap(), const char* version="",
51  const TString& xmlfilename="", const TString& prefix="" );
52  void CreateXMLFiles(const Root::TGRLCollection& grlcollection, const char* prefix);
53 
54  const TString GetXMLString(const Root::TGoodRunsList& grl);
55  const TString GetXMLString(const Root::TGRLCollection& grlcollection);
56  const TString GetXMLString(const LumiBlockCollection& lbc, const grlmetadatamap& metadata = grlmetadatamap(), const char* version="" );
57  const std::vector<TString> GetXMLStrings(const Root::TGRLCollection& grlcollection);
58 
59  Root::TGoodRunsList* GetGRLObject( const LumiBlockCollection& lbc, const grlmetadatamap& metadata = grlmetadatamap(), const char* version="" ) const;
60  Root::TGoodRunsList* GetGRLObject( const char* xmlfile );
61  Root::TGoodRunsList* GetGRLObjectFromString( const TString& xmlstring );
62 
63  Root::TGRLCollection* GetGRLCollection( const char* xmlfile );
64  Root::TGRLCollection* GetGRLCollectionFromString( const TString& xmlstring );
65 
66  const TString GetSuggestedName( const LumiBlockCollection& lbc ) const ;
67 
68  private:
69 
72 
73 };
74 
75 #endif
76 
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
LumiBlockCollectionConverter::LumiBlockCollectionConverter
LumiBlockCollectionConverter(const LumiBlockCollectionConverter &)=delete
python.checkMetadata.metadata
metadata
Definition: checkMetadata.py:175
grl
Definition: ZLumiScripts/grid/grl.py:1
LumiBlockCollectionConverter::m_reader
Root::TGoodRunsListReader * m_reader
Definition: LumiBlockCollectionConverter.h:70
LumiBlockCollection
Definition: LumiBlockCollection.h:21
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
Root::TGRLCollection
Definition: TGRLCollection.h:29
LumiBlockCollectionConverter::m_writer
Root::TGoodRunsListWriter * m_writer
Definition: LumiBlockCollectionConverter.h:71
Root::TGoodRunsList
Definition: TGoodRunsList.h:31
get_generator_info.version
version
Definition: get_generator_info.py:33
grlmetadatamap
std::map< TString, TString > grlmetadatamap
Definition: LumiBlockCollectionConverter.h:29
LumiBlockCollectionConverter
Definition: LumiBlockCollectionConverter.h:33
checker_macros.h
Define macros for attributes used to control the static checker.