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.

References beamvalidation.exit(), and 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 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def exit(msg="")

Member Function Documentation

◆ validationclass()

def presentation.ValidationPlots.validationclass (   self)

Definition at line 29 of file presentation.py.

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().

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:19
def recursivesubclasses(cls)

Member Data Documentation

◆ path

presentation.ValidationPlots.path

◆ plots

presentation.ValidationPlots.plots

Definition at line 25 of file presentation.py.