ATLAS-D Tutorial 2010: Good Runs Lists Tutorial
Links
Exercises
GRL Generation
go to the ATLAS Good Run List Generator page and create a GRL xml file for:
- StandardGRL.eg_standard_7TeV
- period E
- LBSUM
DetStatus-v03-pass1-analysis-2010E
- save the xml file and examine the contents
- try different GLR configurations and see the differences, for example
- use period F
- use StandardGRL.susy_7TeV
use the ATLAS Run Query to create the same GRL xml file
- look for 'Query' in the xml file
- in which formats is the GRL provided? (check at the bottom of the page)
- how can you run the same query on the command line? (search for 'Query command')
- how many events are there per run?
- add '/ show dq l1,tr' to the query to see the status of the trigger DQ flags
- play around with the run query
GRL Application
In the following we will demonstrate that it is quite easy to use GRL in non athena applications. For simplicity we will use PyRoot.
You need to setup athena version 15.6.12:
cd atlas/testarea/15.6.12 asetup 15.6.12 mkdir run.GRL cd run.GRL
The following python script will load the GRL package, your generated GRL xml file and print out some summary information:
#!/bin/env python # import ROOT import ROOT ## Import the ROOT library for reading GRL ROOT.gSystem.Load('libGoodRunsListsLib') ## read the goodrunslist xml file(s) reader = ROOT.Root.TGoodRunsListReader('data10_7TeV.periodE.160387-161948_LBSUMM_DetStatus-v03-pass1-analysis-2010E_data_eg_standard_7TeV.xml') reader.Interpret() goodrunslist = reader.GetMergedGRLCollection() ## show summary of content goodrunslist.Summary() ## Detailed: Summary(True) ## constains run and/or lumiblock ? if goodrunslist.HasRun (90210) : print "Foo!" # contains run 90210 ? if goodrunslist.HasRunLumiBlock (90210,7) : print "Bar!" # run 90210, lb 7 ?
Copy and paste this code into a file called 'grl.py'. Also, copy a GRL file into the same directory and adjust the GRL name accordingly. You can get an example GRL with the following command:
cp /afs/naf.desy.de/user/e/efeld/public/ADT10/data10_7TeV.periodE.160387-161948_LBSUMM_DetStatus-v03-pass1-analysis-2010E_data_eg_standard_7TeV.xml .
Execute the script in python and keep it in interpreter mode:
python -i example.py
Test a few lumi blocks of run 161948:
goodrunslist.HasRunLumiBlock(161948, 410) goodrunslist.HasRunLumiBlock(161948, 411) goodrunslist.HasRunLumiBlock(161948, 412)
The C++ code will look very similar. If you do not want to setup the atlas environment, you can also checkout the GoodRunsLists package and compile a standalone library. For more details see the ATLAS Good Runs Lists tutorial.