CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
valtools.website Class Reference

Public Member Functions

def __init__ (self)
 
def __str__ (self)
 
def listBenchmarks (self, pattern, afs=False, url=False)
 
def listComparisons (self, benchmark)
 
def writeAccess (self)
 

Public Attributes

 url_
 
 website_
 

Detailed Description

Definition at line 86 of file valtools.py.

Constructor & Destructor Documentation

def valtools.website.__init__ (   self)

Definition at line 87 of file valtools.py.

87  def __init__(self):
88  self.website_ = '/afs/cern.ch/cms/Physics/particleflow/Validation/cms-project-pfvalidation/Releases'
89  self.url_ = 'http://cern.ch/pfvalidation/Releases'
90 
def __init__(self)
Definition: valtools.py:87

Member Function Documentation

def valtools.website.__str__ (   self)

Definition at line 91 of file valtools.py.

References valtools.website.website_.

91  def __str__(self):
92  return self.website_
93 
94 
def __str__(self)
Definition: valtools.py:91
def valtools.website.listBenchmarks (   self,
  pattern,
  afs = False,
  url = False 
)

Definition at line 100 of file valtools.py.

References valtools.decodePath(), and valtools.website.website_.

100  def listBenchmarks(self, pattern, afs=False, url=False):
101  for bench in glob.glob(self.website_ + '/' + pattern):
102  # strip off the root path of the website
103  p = re.compile('^%s/(\S+)$' % self.website_);
104  m = p.match( bench )
105  if m:
106  (release, benchName, extension) = decodePath( m.group(1) )
107  if release == None:
108  # this is a comparison
109  continue
110  print
111  bench = benchmark(m.group(1))
112  print bcolors.OKGREEN + m.group(1) + bcolors.ENDC
113  if afs or url:
114  if afs: print ' ',bench.benchmarkOnWebSite( self )
115  if url: print ' ',bench.benchmarkUrl( self )
116 
def decodePath(path)
Definition: valtools.py:274
def listBenchmarks(self, pattern, afs=False, url=False)
Definition: valtools.py:100
def valtools.website.listComparisons (   self,
  benchmark 
)

Definition at line 117 of file valtools.py.

References valtools.website.website_.

117  def listComparisons(self, benchmark):
118 
119  comparisons = []
120  find = 'find %s -type d' % self.website_
121  for dir in os.popen( find ):
122  dir = dir.rstrip()
123  #print dir
124  comp = '%s/\S+/\S+/%s' % (self.website_,
125  benchmark.fullName() )
126  #print "** ", comp
127  p = re.compile(comp)
128  m = p.match(dir)
129  if m:
130  comparisons.append(dir)
131  #print ' ',dir
132  return comparisons
133 
def listComparisons(self, benchmark)
Definition: valtools.py:117
def valtools.website.writeAccess (   self)

Definition at line 95 of file valtools.py.

References reco.if(), and valtools.website.website_.

95  def writeAccess(self):
96  if( os.access(self.website_, os.W_OK)==False ):
97  print 'cannot write to the website. Please ask Colin to give you access.'
98  sys.exit(1)
99 
def writeAccess(self)
Definition: valtools.py:95
if(dp >Float(M_PI)) dp-

Member Data Documentation

valtools.website.url_

Definition at line 89 of file valtools.py.

valtools.website.website_