CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
presentation.ValidationPlots Class Reference
Inheritance diagram for presentation.ValidationPlots:

Public Member Functions

def __init__
 
def validationclass
 

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 beamvalidation.exit(), and print().

16 
17  def __init__(self, path):
18  if not os.path.isdir(path):
19  print("Error: Directory "+path+" not found!")
20  exit(1)
21  if not path.endswith('/'):
22  path += '/'
23  path = path.replace('\\', '/') # Beacause LaTeX has issues with '\'.
24  self.path = path
25  # List of plot files in given directory:
26  self.plots = [file for file in os.listdir(path)
27  if file.endswith('.eps')]
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

Member Function Documentation

def presentation.ValidationPlots.validationclass (   self)

Definition at line 29 of file presentation.py.

References join(), presentation.ValidationPlots.path, and helperFunctions.recursivesubclasses().

Referenced by plottingOptions.BasePlottingOptions.getRepMap().

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

Member Data Documentation

presentation.ValidationPlots.path

Definition at line 23 of file presentation.py.

Referenced by python.rootplot.rootmath.Target.__repr__(), and presentation.ValidationPlots.validationclass().

presentation.ValidationPlots.plots

Definition at line 25 of file presentation.py.