10 JobNumber = sys.argv[1]
11 crabFiles = PSet.process.source.fileNames
13 firstInput = crabFiles[0]
16 print(
"--------- using edmFileUtil to convert PFN to LFN --------------")
17 for i
in range(0, len(crabFiles)):
18 if os.getenv(
"GLIDECLIENT_Group",
"") !=
"overflow" and os.getenv(
"GLIDECLIENT_Group",
"") !=
"overflow_conservative" and not forceaaa:
19 print(
"Data is local")
20 pfn = os.popen(
"edmFileUtil -d %s" % (crabFiles[i])).
read()
21 pfn = re.sub(
"\n",
"", pfn)
24 print(
"Testing file open")
26 testfile = ROOT.TFile.Open(pfn)
27 if testfile
and testfile.IsOpen():
33 print(
"Test open failed, forcing AAA")
34 crabFiles[i] =
"root://cms-xrd-global.cern.ch/" + \
41 print(
"Data is not local, using AAA/xrootd")
42 crabFiles[i] =
"root://cms-xrd-global.cern.ch/" + crabFiles[i]
47 if hasattr(PSet.process.source,
"lumisToProcess"):
48 lumis = PSet.process.source.lumisToProcess
52 start, stop = l.split(
"-")
53 rstart, lstart = start.split(
":")
54 rstop, lstop = stop.split(
":")
56 rstart, lstart = l.split(
":")
57 rstop, lstop = l.split(
":")
60 "Cannot convert '%s' to runs and lumis json format" % l)
61 if rstart
not in runsAndLumis:
62 runsAndLumis[rstart] = []
64 print(
"Runs and Lumis: " +
str(runsAndLumis))
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)