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

Constructor & Destructor Documentation

def presentation.ValidationPlots.__init__ (   self,
  path 
)

Definition at line 16 of file presentation.py.

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

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

Member Function Documentation

def presentation.ValidationPlots.validationclass (   self)

Definition at line 29 of file presentation.py.

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

Referenced by plottingOptions.BasePlottingOptions.getRepMap().

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