CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
recoTauConfTools Namespace Reference

Functions

def cmssw_version
 
def represents_int
 

Function Documentation

def recoTauConfTools.cmssw_version ( )

Definition at line 20 of file recoTauConfTools.py.

References python.rootplot.root2matplotlib.replace(), represents_int(), and submitPVValidationJobs.split().

20 
21 def cmssw_version():
22  version_str = os.environ['CMSSW_VERSION'].replace('CMSSW_', '').split('_')
23  major_version = int(version_str[0])
24  minor_version = int(version_str[1])
25  subminor_version = None
26  # Correctly deal with IB releases, where the subminor version is X. Return it
27  # as a string, which is always larger than integers.
28  if represents_int(version_str[2]):
29  subminor_version = int(version_str[2])
30  else:
31  subminor_version = version_str[2]
32  return (version_str[0], version_str[1], version_str[2])
def recoTauConfTools.represents_int (   value)

Definition at line 13 of file recoTauConfTools.py.

Referenced by cmssw_version().

13 
14 def represents_int(value):
15  try:
16  int(value)
17  return True
18  except ValueError:
19  return False