CMS 3D CMS Logo

recoTauConfTools.py
Go to the documentation of this file.
1 #import FWCore.ParameterSet.Config as cms
2 import os
3 
4 '''
5 
6 Helper functions for modifying the tau sequences.
7 
8 
9 Author: Evan K. Friis, UC Davis
10 
11 '''
12 
13 def represents_int(value):
14  try:
15  int(value)
16  return True
17  except ValueError:
18  return False
19 
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])
def replace(string, replacements)
def represents_int(value)