ATLAS Offline Software
TGoodRunsListReader.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /**********************************************************************************
6  * Class : TGoodRun *
7  * *
8  * Authors (alphabetical): *
9  * Max Baak <mbaak@cern.ch> - CERN, Switzerland *
10  **********************************************************************************/
11 
12 #ifndef _TGoodRunsListReader
13 #define _TGoodRunsListReader
14 
15 #include <vector>
16 
17 #include "TROOT.h"
18 #include "TList.h"
19 #include "TObject.h"
20 #include "TString.h"
21 
24 
25 class TXMLNode;
26 
27 namespace Root {
28 
29  class TStringList;
30  class TLumiBlockRange;
31  class TGoodRun;
32  class TGoodRunsList;
33 
34  class TGoodRunsListReader : public TObject {
35 
36  public:
37 
38  TGoodRunsListReader( Bool_t checkGRLInfo=kFALSE );
39  TGoodRunsListReader( const TString& dataCardName, Bool_t checkGRLInfo=kFALSE );
41 
42  Bool_t Interpret();
43 
44  // accessor
45  inline const TString& GetXMLString() const { return m_xmlstring; }
46  inline const TString& GetXMLFilename() const { return m_dataCardName; }
47 
48  inline void AddXMLFile( const TString& xmlfile ) { m_dataCardList.push_back(xmlfile); }
49  inline void AddXMLString( const TString& xmlstring ) { m_xmlstringList.push_back(xmlstring); }
50  inline void SetXMLString( const TString& xmlstring ) { Reset(); m_xmlstringList.push_back(xmlstring); }
51  inline void SetXMLFile( const TString& xmlfile ) { Reset(); m_dataCardList.push_back(xmlfile); }
52  inline void SetCheckGRLInfo( Bool_t check=kTRUE ) { m_grlvec.SetCheckGRLInfo( check ); }
53 
54  const TGoodRunsList GetMergedGoodRunsList( const Root::BoolOperation& operation = OR ) const ;
55  const TGoodRunsList GetGoodRunsList( unsigned int idx ) const ;
56  inline const TGRLCollection GetGRLCollection() const { return m_grlvec; }
57  const TGRLCollection GetMergedGRLCollection( const Root::BoolOperation& operation = OR ) const ;
58 
59  void Reset();
60 
61  private:
62 
63  void ReadNamedLumiRange ( TXMLNode* );
64  void ReadLumiBlockCollection ( TXMLNode* );
65  void ReadAttribs ( TXMLNode* );
66 
67  TGoodRun GetLumiBlockCollection( TXMLNode* dataNode ) ;
68 
69  TString m_xmlstring;
70  TString m_dataCardName; // current xmlfile processed
71  std::vector<TString> m_dataCardList;
72  std::vector<TString> m_xmlstringList;
75 
76  ClassDef(TGoodRunsListReader,0)
77  };
78 }
79 
80 #endif
Root::TGoodRunsListReader
Definition: TGoodRunsListReader.h:34
Root::TGoodRun
Definition: TGoodRun.h:27
Root
Definition: GoodRunsListSelectorTool.h:30
Root::TGRLCollection::SetCheckGRLInfo
void SetCheckGRLInfo(Bool_t check=kTRUE)
Definition: TGRLCollection.h:41
TGRLCollection.h
Root::TGoodRunsListReader::TGoodRunsListReader
TGoodRunsListReader(Bool_t checkGRLInfo=kFALSE)
Definition: TGoodRunsListReader.cxx:36
Root::TGoodRunsListReader::SetXMLString
void SetXMLString(const TString &xmlstring)
Definition: TGoodRunsListReader.h:50
Root::TGoodRunsListReader::SetCheckGRLInfo
void SetCheckGRLInfo(Bool_t check=kTRUE)
Definition: TGoodRunsListReader.h:52
Root::TGoodRunsListReader::m_grlvec
TGRLCollection m_grlvec
Definition: TGoodRunsListReader.h:74
Root::TGoodRunsListReader::m_xmlstring
TString m_xmlstring
Definition: TGoodRunsListReader.h:69
Root::TGoodRunsListReader::~TGoodRunsListReader
~TGoodRunsListReader()
Definition: TGoodRunsListReader.cxx:53
Root::TGoodRunsListReader::AddXMLString
void AddXMLString(const TString &xmlstring)
Definition: TGoodRunsListReader.h:49
Root::TGoodRunsListReader::ReadNamedLumiRange
void ReadNamedLumiRange(TXMLNode *)
Definition: TGoodRunsListReader.cxx:258
Root::TGRLCollection
Definition: TGRLCollection.h:29
Root::TGoodRunsListReader::ReadAttribs
void ReadAttribs(TXMLNode *)
Definition: TGoodRunsListReader.cxx:166
Root::TGoodRunsListReader::GetLumiBlockCollection
TGoodRun GetLumiBlockCollection(TXMLNode *dataNode)
Definition: TGoodRunsListReader.cxx:212
Root::TGoodRunsListReader::GetXMLString
const TString & GetXMLString() const
Definition: TGoodRunsListReader.h:45
Root::TGoodRunsListReader::m_dataCardName
TString m_dataCardName
Definition: TGoodRunsListReader.h:70
Root::TGoodRunsList
Definition: TGoodRunsList.h:31
LArNewCalib_Delay_OFC_Cali.check
check
Definition: LArNewCalib_Delay_OFC_Cali.py:258
Root::TGoodRunsListReader::m_logger
TMsgLogger m_logger
Definition: TGoodRunsListReader.h:73
Root::TGoodRunsListReader::GetXMLFilename
const TString & GetXMLFilename() const
Definition: TGoodRunsListReader.h:46
Root::TGoodRunsListReader::GetGRLCollection
const TGRLCollection GetGRLCollection() const
Definition: TGoodRunsListReader.h:56
Root::TGoodRunsListReader::ReadLumiBlockCollection
void ReadLumiBlockCollection(TXMLNode *)
Definition: TGoodRunsListReader.cxx:181
Root::TGoodRunsListReader::Interpret
Bool_t Interpret()
Definition: TGoodRunsListReader.cxx:71
Root::TGoodRunsListReader::m_dataCardList
std::vector< TString > m_dataCardList
Definition: TGoodRunsListReader.h:71
Root::TGoodRunsListReader::GetMergedGRLCollection
const TGRLCollection GetMergedGRLCollection(const Root::BoolOperation &operation=OR) const
Definition: TGoodRunsListReader.cxx:332
Root::OR
@ OR
Definition: TGRLCollection.h:32
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
TMsgLogger.h
Root::TGoodRunsListReader::m_xmlstringList
std::vector< TString > m_xmlstringList
Definition: TGoodRunsListReader.h:72
Root::TMsgLogger
Definition: TMsgLogger.h:52
Root::TGoodRunsListReader::Reset
void Reset()
Definition: TGoodRunsListReader.cxx:60
Root::BoolOperation
BoolOperation
Definition: TGRLCollection.h:27
Root::TGoodRunsListReader::GetMergedGoodRunsList
const TGoodRunsList GetMergedGoodRunsList(const Root::BoolOperation &operation=OR) const
Definition: TGoodRunsListReader.cxx:318
Root::TGoodRunsListReader::AddXMLFile
void AddXMLFile(const TString &xmlfile)
Definition: TGoodRunsListReader.h:48
Root::TGoodRunsListReader::SetXMLFile
void SetXMLFile(const TString &xmlfile)
Definition: TGoodRunsListReader.h:51
Root::TGoodRunsListReader::GetGoodRunsList
const TGoodRunsList GetGoodRunsList(unsigned int idx) const
Definition: TGoodRunsListReader.cxx:325