Go to the documentation of this file.00001
00002 import os
00003
00004 '''
00005
00006 Helper functions for modifying the tau sequences.
00007
00008
00009 Author: Evan K. Friis, UC Davis
00010
00011 '''
00012
00013 def represents_int(value):
00014 try:
00015 int(value)
00016 return True
00017 except ValueError:
00018 return False
00019
00020 def cmssw_version():
00021 version_str = os.environ['CMSSW_VERSION'].replace('CMSSW_', '').split('_')
00022 major_version = int(version_str[0])
00023 minor_version = int(version_str[1])
00024 subminor_version = None
00025
00026
00027 if represents_int(version_str[2]):
00028 subminor_version = int(version_str[2])
00029 else:
00030 subminor_version = version_str[2]
00031 return (version_str[0], version_str[1], version_str[2])