CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
presentation.ValidationPlots Class Reference
Inheritance diagram for presentation.ValidationPlots:

Public Member Functions

def __init__ (self, path)
 
def validationclass (self)
 

Public Attributes

 path
 
 plots
 

Detailed Description

Definition at line 12 of file presentation.py.

Constructor & Destructor Documentation

def presentation.ValidationPlots.__init__ (   self,
  path 
)

Definition at line 13 of file presentation.py.

References cmsRelvalreport.exit.

13  def __init__(self, path):
14  if not os.path.isdir(path):
15  print "Error: Directory "+path+" not found!"
16  exit(1)
17  if not path.endswith('/'):
18  path += '/'
19  path = path.replace('\\', '/') # Beacause LaTeX has issues with '\'.
20  self.path = path
21  # List of plot files in given directory:
22  self.plots = [file for file in os.listdir(path)
23  if file.endswith('.eps')]
24 

Member Function Documentation

def presentation.ValidationPlots.validationclass (   self)

Definition at line 26 of file presentation.py.

References join(), presentation.ValidationPlots.path, trackSplittingValidation.TrackSplittingValidation.plotsdirname(), primaryVertexValidation.PrimaryVertexValidation.plotsdirname(), offlineValidation.OfflineValidation.plotsdirname(), zMuMuValidation.ZMuMuValidation.plotsdirname(), genericValidation.ValidationWithPlots.plotsdirname(), and helperFunctions.recursivesubclasses().

Referenced by plottingOptions.BasePlottingOptions.getRepMap().

26  def validationclass(self):
27  possiblenames = []
28  for cls in recursivesubclasses(ValidationForPresentation):
29  if cls.__abstractmethods__: continue
30  if cls.plotsdirname() == os.path.basename(os.path.realpath(self.path.rstrip("/"))):
31  return cls
32  possiblenames.append(cls.plotsdirname())
33  raise AllInOneError("{} does not match any of the possible folder names:\n{}".format(self.path, ", ".join(possiblenames)))
34 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def recursivesubclasses(cls)

Member Data Documentation

presentation.ValidationPlots.path
presentation.ValidationPlots.plots

Definition at line 22 of file presentation.py.