CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
reference_db Namespace Reference

Classes

class  ReferenceDB
 

Functions

def ExtractID
 

Function Documentation

def reference_db.ExtractID (   release)

Definition at line 7 of file reference_db.py.

References if().

Referenced by run_regression.RegressionTest.runOnReference().

7 
8 def ExtractID(release):
9  pattern = re.compile("^CMSSW_(\d+)_(\d+)_(\d+|\D)(_pre(\d+)|_patch(\d+))?")
10  matching = pattern.match(release)
11  version = 0
12  if matching:
13  g = matching.groups()
14  if(g[2].isdigit()):
15  if(g[4] is not None and g[4].isdigit()):
16  version = int(g[0]) * 1000000 + int(g[1]) * 10000 + int(g[2]) * 100 + int(g[4])
17  else:
18  version = int(g[0]) * 1000000 + int(g[1]) * 10000 + int(g[2]) * 100
19  else:
20  version = int(g[0]) * 1000000 + int(g[1]) * 10000 +9999
21  if(version is not None):
22  return version
perl if(1 lt scalar(@::datatypes))
Definition: edlooper.cc:31