ATLAS Offline Software
Loading...
Searching...
No Matches
example.py
Go to the documentation of this file.
1#!/usr/bin/python
2
3# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
4
5import os
6
7
8CWD = os.getcwd()
9import ROOT
10
13from ROOT import gSystem
14os.chdir(CWD)
15
16from ROOT import Root
17
18
19
20reader = Root.TGoodRunsListReader('LumiRangeCollectionA.xml')
21#reader.AddXMLFile('LumiRangeCollectionB.xml')
22reader.Interpret()
23goodrunslist = reader.GetMergedGRLCollection()
24
25
26goodrunslist.Summary()
27
28
29if goodrunslist.HasRun (90210) : print ("Foo!") # contains run 90210 ?
30if goodrunslist.HasRunLumiBlock (90210,7) : print ("Bar!") # run 90210, lb 7 ?
31
32
34writer.SetGRLCollection(goodrunslist)
35writer.SetFilename('test2.xml')
36writer.WriteXMLFile()
37