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.

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])

References createfilelist.int, python.rootplot.root2matplotlib.replace(), represents_int(), and cms::dd.split().

◆ represents_int()

def recoTauConfTools.represents_int (   value)

Definition at line 13 of file recoTauConfTools.py.

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

References createfilelist.int.

Referenced by cmssw_version().

cms::dd::split
std::vector< std::string_view > split(std::string_view, const char *)
recoTauConfTools.represents_int
def represents_int(value)
Definition: recoTauConfTools.py:13
createfilelist.int
int
Definition: createfilelist.py:10
recoTauConfTools.cmssw_version
def cmssw_version()
Definition: recoTauConfTools.py:20
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444