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 13 of file presentation.py.

Constructor & Destructor Documentation

def presentation.ValidationPlots.__init__ (   self,
  path 
)

Definition at line 14 of file presentation.py.

References cmsRelvalreport.exit, and edm.print().

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

Member Function Documentation

def presentation.ValidationPlots.validationclass (   self)

Definition at line 27 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().

27  def validationclass(self):
28  possiblenames = []
29  for cls in recursivesubclasses(ValidationForPresentation):
30  if cls.__abstractmethods__: continue
31  if cls.plotsdirname() == os.path.basename(os.path.realpath(self.path.rstrip("/"))):
32  return cls
33  possiblenames.append(cls.plotsdirname())
34  raise AllInOneError("{} does not match any of the possible folder names:\n{}".format(self.path, ", ".join(possiblenames)))
35 
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 23 of file presentation.py.