CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
valtools.comparison Class Reference

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.

232  def __init__(self, benchmark, comparisonPath):
233  self.benchmark_ = benchmark
234  self.path_ = comparisonPath

Member Function Documentation

def valtools.comparison.comparisonOnWebSite (   self,
  website 
)

Definition at line 235 of file valtools.py.

References pos::PixelVersionAlias.path_, trigger::TriggerFilterObjectWithRefs.path_, edmplugin::SharedLibrary.path_, HLTInclusiveVBFSource.path_, SteppingHelixStateInfo.path_, SiStripKey.path_, SiStripDbParams.path_, edm::messagedrop::StringProducerPath.path_, edmplugin::Sentry.path_, valtools.comparison.path_, and TFileDirectory.path_.

Referenced by valtools.comparison.submit().

236  def comparisonOnWebSite(self, website):
237  return '%s/%s' % ( self.benchmark_.benchmarkOnWebSite(website),
238  self.path_ )
def valtools.comparison.comparisonUrl (   self,
  website 
)

Definition at line 239 of file valtools.py.

References pos::PixelVersionAlias.path_, trigger::TriggerFilterObjectWithRefs.path_, edmplugin::SharedLibrary.path_, HLTInclusiveVBFSource.path_, SteppingHelixStateInfo.path_, SiStripKey.path_, SiStripDbParams.path_, edm::messagedrop::StringProducerPath.path_, edmplugin::Sentry.path_, valtools.comparison.path_, and TFileDirectory.path_.

Referenced by valtools.comparison.submit().

240  def comparisonUrl(self, website):
241  return '%s/%s' % ( self.benchmark_.benchmarkUrl(website),
242  self.path_ )
def valtools.comparison.submit (   self,
  website,
  force = False 
)

Definition at line 243 of file valtools.py.

References valtools.comparison.comparisonOnWebSite(), valtools.comparison.comparisonUrl(), if(), pos::PixelVersionAlias.path_, trigger::TriggerFilterObjectWithRefs.path_, edmplugin::SharedLibrary.path_, HLTInclusiveVBFSource.path_, SteppingHelixStateInfo.path_, SiStripKey.path_, SiStripDbParams.path_, edm::messagedrop::StringProducerPath.path_, edmplugin::Sentry.path_, valtools.comparison.path_, and TFileDirectory.path_.

244  def submit(self, website, force=False):
245  print 'Submitting comparison:'
246  print ' from: ',self.path_
247  print ' to : ',self.comparisonOnWebSite(website)
248 
249  if( os.path.isdir(self.comparisonOnWebSite(website) ) ):
250  print 'comparison already exists'
251  if force:
252  print 'overwriting comparison on the website...'
253  else:
254  print 'submission cancelled. run with -h for a solution.'
255  return False
256  else:
257  print 'comparison directory does not yet exist. creating it.'
258  mkdir = 'mkdir -p ' + self.comparisonOnWebSite(website)
259  print mkdir
260  if os.system( mkdir ):
261  print 'problem creating the output directory on the website. Aborting.'
262  return False
263  cp = 'cp %s %s' % (self.path_ + '/*',
264  self.comparisonOnWebSite(website))
265  if os.system(cp):
266  print 'problem copying the files to the website aborting'
267  return False
268 
269  print 'access your comparison here:'
270  print ' ', self.comparisonUrl(website)
271 
272 
273 
# pathname in the form: CMSSW_3_1_0_pre7/TauBenchmarkGeneric_Extension
perl if(1 lt scalar(@::datatypes))
Definition: edlooper.cc:31

Member Data Documentation

valtools.comparison.benchmark_

Definition at line 232 of file valtools.py.

valtools.comparison.path_

Definition at line 233 of file valtools.py.

Referenced by valtools.comparison.comparisonOnWebSite(), valtools.comparison.comparisonUrl(), and valtools.comparison.submit().