ATLAS Offline Software
InnerDetector
InDetExample
InDetBeamSpotExample
bin
extractScanInfo.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
3
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
4
"""
5
Extract necessary info (pLB, tstart, tend, sep, acqFlag) from VdM ntuple.
6
Ntuples are usually found at /afs/cern.ch/atlas/project/LumiWG/CoolScanNtuple/
7
"""
8
9
import
sys
10
import
ROOT
11
12
if
len(sys.argv) != 2:
13
sys.exit(
'Usage: extractScanInfo.py <filename>'
)
14
15
filename = sys.argv[1]
16
f = ROOT.TFile(filename)
17
t = f.Get(
'vdMScanData'
)
18
19
run =
None
20
for
e
in
t:
21
if
e.ScanRun != 0:
22
run = e.ScanRun
23
break
24
25
fout =
open
(
'r%s_pLB.txt'
%run,
'w'
)
26
foutacq =
open
(
'r%s_pLB.acq.txt'
% run,
'w'
)
27
28
for
e
in
t:
29
fout.write(
'%s %s %s %s\n'
%(e.ScanLB, e.StartTime, e.EndTime, e.NominalSeparation))
30
foutacq.write(
'%s %s %s %s %s\n'
%(e.ScanLB, e.StartTime, e.EndTime, e.NominalSeparation, e.AcquisitionFlag))
31
32
fout.close()
33
foutacq.close()
Trk::open
@ open
Definition:
BinningType.h:40
Generated on Thu Nov 7 2024 21:15:08 for ATLAS Offline Software by
1.8.18