ATLAS Offline Software
Loading...
Searching...
No Matches
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
25class TXMLNode;
26
27namespace 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
std::vector< TString > m_dataCardList
void SetXMLFile(const TString &xmlfile)
const TString & GetXMLFilename() const
const TGRLCollection GetGRLCollection() const
std::vector< TString > m_xmlstringList
const TGoodRunsList GetGoodRunsList(unsigned int idx) const
void SetXMLString(const TString &xmlstring)
TGoodRunsListReader(Bool_t checkGRLInfo=kFALSE)
void AddXMLFile(const TString &xmlfile)
void SetCheckGRLInfo(Bool_t check=kTRUE)
const TGoodRunsList GetMergedGoodRunsList(const Root::BoolOperation &operation=OR) const
TGoodRun GetLumiBlockCollection(TXMLNode *dataNode)
const TString & GetXMLString() const
const TGRLCollection GetMergedGRLCollection(const Root::BoolOperation &operation=OR) const
void AddXMLString(const TString &xmlstring)
static std::vector< std::string > xmlfile
Definition iLumiCalc.h:29