3 from __future__
import print_function
7 from ROOT
import TFile, gDirectory
9 samweb = samweb_cli.SAMWebClient(experiment=
'dune')
11 files = samweb.listFiles(
"defname: %s " % (sys.argv[1]))
18 loc = samweb.locateFile(file)
20 metadata = samweb.getMetadata(file)
22 if metadata[
'file_type'] !=
'mc':
24 run = metadata[
'runs'][0][0]
29 f =
open(
"input_run%s.txt" % run,
"w")
30 pnfs = loc[0][
'full_path'][8:]
31 stream = os.popen(
"pnfsToXRootD %s/%s" % (pnfs,file))
34 tfile = TFile.Open(xroot.strip())
35 mytree = gDirectory.Get(
'michelremoving2/Event')
36 totalevts += mytree.GetEntries()
int open(const char *, int)
Opens a file descriptor.