CMS 3D CMS Logo

Functions
recoTauConfTools Namespace Reference

Functions

def cmssw_version ()
 
def represents_int (value)
 

Function Documentation

◆ cmssw_version()

def recoTauConfTools.cmssw_version ( )

Definition at line 20 of file recoTauConfTools.py.

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

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

◆ represents_int()

def recoTauConfTools.represents_int (   value)

Definition at line 13 of file recoTauConfTools.py.

References createfilelist.int.

Referenced by cmssw_version().

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