CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
valtools Namespace Reference

Classes

class  bcolors
 
class  benchmark
 
class  comparison
 
class  webpage
 
class  website
 

Functions

def decodePath
 
def processFile
 
def testFileType
 

Function Documentation

def valtools.decodePath (   path)

Definition at line 274 of file valtools.py.

Referenced by valtools.website.listBenchmarks(), and indexGenCompare.processBenchmark().

275 def decodePath( path ):
276  p = re.compile('^(\S+)/([^\s_]+)_(\S+)');
277  m = p.match(path)
278  if m:
279  release = m.group(1)
280  benchmarkname = m.group(2)
281  extension = m.group(3)
282  return (release, benchmarkname, extension )
283  else:
284  return (None, None, None)
285 
#test that a given file is a file with the correct extenstion, e.g. .root
def decodePath
Definition: valtools.py:274
def valtools.processFile (   file,
  outputDir 
)

Definition at line 304 of file valtools.py.

Referenced by cond::XMLAuthenticationService::XMLAuthenticationService.initialize().

305 def processFile( file, outputDir ):
306 
307  if file == "None":
308  return 'infoNotFound.html'
309  else:
310  if os.path.isfile(file):
311  shutil.copy(file, outputDir)
312  return os.path.basename(file)
313  else:
314  return file
def processFile
Definition: valtools.py:304
def valtools.testFileType (   file,
  ext 
)

Definition at line 286 of file valtools.py.

287 def testFileType( file, ext ):
288 
289  if file == "None":
290  return
291 
292  if os.path.isfile( file ) == False:
293  print '%s is not a file' % file
294  sys.exit(2)
295 
296  (fileroot, fileext) = os.path.splitext( file )
297  if fileext != ext:
298  print '%s does not end with %s' % (file, ext)
299  sys.exit(3)
300 
301 
302 # copy a file to a destination directory, and return the basename
303 # that is the filename without the path. that name is used
# to set a relative link in the html code
def testFileType
Definition: valtools.py:286