33 m = re.match(RXONLINE, path)
35 version = int(m.group(1))
36 runnr = int(m.group(3))
37 subsys = m.group(2)
and m.group(2)[1:]
39 return False,
"file version is not 1"
41 return False,
"online file has run number <= 10000"
44 return True, {
'class':
'online_data',
'version': version,
45 'subsystem': subsys,
'runnr': runnr,
46 'dataset':
"/Global/Online/ALL" }
48 m = re.match(RXOFFLINE, path)
50 version = int(m.group(1))
51 dataset = m.group(3).
replace(
"__",
"/")
52 if not re.match(RXDATASET, dataset):
53 return False,
"Invalid dataset name"
54 relvalmc = re.match(RXRELVALMC, dataset)
55 relvaldata = re.match(RXRELVALDATA, dataset)
56 relvalrundepmc = re.match(RXRELVALRUNDEPMC, dataset)
57 rundepmc = re.match(RXRUNDEPMC, dataset)
58 runnr = int(m.group(2))
60 return False,
"file version is not 1"
62 return False,
"file matches offline naming, but run number is < 1"
65 return False,
"file matches Run Dependent MonteCarlo naming, but run number is 1"
68 return True, {
'class':
'simulated_rundep',
'version': version,
69 'runnr': runnr,
'dataset': dataset }
72 return False,
"file matches Run Dependent MonteCarlo naming, but run number is 1"
75 return True, {
'class':
'relval_rundepmc',
'version': version,
76 'runnr': runnr,
'dataset': dataset,
77 'release': relvalrundepmc.group(1)}
80 return False,
"file matches relval mc naming, but run number != 1"
83 return True, {
'class':
'relval_mc',
'version': version,
84 'runnr': runnr,
'dataset': dataset,
85 'release': relvalmc.group(1) }
88 return False,
"file matches relval data naming, but run number = 1"
91 return True, {
'class':
'relval_data',
'version': version,
92 'runnr': runnr,
'dataset': dataset,
93 'release': relvaldata.group(1) }
94 elif dataset.find(
"CMSSW") >= 0:
95 return False,
"non-relval dataset name contains 'CMSSW'"
98 return True, {
'class':
'offline_data',
'version': version,
99 'runnr': runnr,
'dataset': dataset }
102 return True, {
'class':
'simulated',
'version': int(m.group(1)),
103 'runnr': runnr,
'dataset': dataset }
105 return False,
"file matches no known naming convention"
107 return False,
"error while classifying file name"
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)