CMS 3D CMS Logo

Public Member Functions | Public Attributes

valtools::comparison Class Reference

List of all members.

Public Member Functions

def __init__
def comparisonOnWebSite
def comparisonUrl
def submit

Public Attributes

 benchmark_
 path_

Detailed Description

Definition at line 229 of file valtools.py.


Constructor & Destructor Documentation

def valtools::comparison::__init__ (   self,
  benchmark,
  comparisonPath 
)

Definition at line 231 of file valtools.py.

00232                                                  :
00233         self.benchmark_ = benchmark
00234         self.path_ = comparisonPath


Member Function Documentation

def valtools::comparison::comparisonOnWebSite (   self,
  website 
)

Definition at line 235 of file valtools.py.

00236                                           :
00237         return  '%s/%s' % ( self.benchmark_.benchmarkOnWebSite(website),
00238                             self.path_ )

def valtools::comparison::comparisonUrl (   self,
  website 
)

Definition at line 239 of file valtools.py.

00240                                     :
00241         return '%s/%s'  % ( self.benchmark_.benchmarkUrl(website),
00242                             self.path_ )

def valtools::comparison::submit (   self,
  website,
  force = False 
)

Definition at line 243 of file valtools.py.

00244                                           :
00245         print 'Submitting comparison:'
00246         print '  from: ',self.path_
00247         print '  to  : ',self.comparisonOnWebSite(website)
00248 
00249         if( os.path.isdir(self.comparisonOnWebSite(website) ) ):
00250             print 'comparison already exists'
00251             if force:
00252                 print 'overwriting comparison on the website...'
00253             else:
00254                 print 'submission cancelled. run with -h for a solution.'
00255                 return False
00256         else:
00257             print 'comparison directory does not yet exist. creating it.'
00258             mkdir = 'mkdir -p ' + self.comparisonOnWebSite(website)
00259             print mkdir    
00260             if os.system( mkdir ):
00261                 print 'problem creating the output directory on the website. Aborting.'
00262                 return False
00263         cp = 'cp %s %s' % (self.path_ + '/*',
00264                            self.comparisonOnWebSite(website))
00265         if os.system(cp):
00266             print 'problem copying the files to the website aborting'
00267             return False
00268 
00269         print 'access your comparison here:'
00270         print '  ', self.comparisonUrl(website)
00271 
00272 
00273 
# pathname in the form: CMSSW_3_1_0_pre7/TauBenchmarkGeneric_Extension

Member Data Documentation

Definition at line 231 of file valtools.py.

Definition at line 231 of file valtools.py.