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

◆ __init__()

def presentation.ValidationPlots.__init__ (   self,
  path 
)

Definition at line 16 of file presentation.py.

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 

References beamvalidation.exit(), and print().

Member Function Documentation

◆ validationclass()

def presentation.ValidationPlots.validationclass (   self)

Definition at line 29 of file presentation.py.

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 

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

Referenced by plottingOptions.BasePlottingOptions.getRepMap().

Member Data Documentation

◆ path

presentation.ValidationPlots.path

◆ plots

presentation.ValidationPlots.plots

Definition at line 25 of file presentation.py.

join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
helperFunctions.recursivesubclasses
def recursivesubclasses(cls)
Definition: helperFunctions.py:150
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
format
beamvalidation.exit
def exit(msg="")
Definition: beamvalidation.py:53