CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes
plottingOptions.PlottingOptionsTrackSplitting Class Reference
Inheritance diagram for plottingOptions.PlottingOptionsTrackSplitting:
plottingOptions.BasePlottingOptions genericValidation.ValidationMetaClass

Public Member Functions

def __init__ (self, config)
 
def validsubdets (self)
 
- Public Member Functions inherited from plottingOptions.BasePlottingOptions
def __init__ (self, config, valType)
 
def getRepMap (self)
 
- Public Member Functions inherited from genericValidation.ValidationMetaClass
def __new__ (cls, clsname, bases, dct)
 

Static Public Attributes

dictionary defaults
 
dictionary needpackages = {"Alignment/CommonAlignmentProducer"}
 
 validationclass = TrackSplittingValidation
 
- Static Public Attributes inherited from plottingOptions.BasePlottingOptions
dictionary defaults
 
 mandatories = set()
 
dictionary needpackages = {"Alignment/OfflineValidation"}
 
- Static Public Attributes inherited from genericValidation.ValidationMetaClass
list dicts = ["defaults"]
 
list sets = ["mandatories", "optionals", "needpackages"]
 

Additional Inherited Members

- Public Attributes inherited from plottingOptions.BasePlottingOptions
 cmssw
 
 cmsswreleasebase
 
 config
 
 general
 
 randomWorkdirPart
 
 scramarch
 
 type
 

Detailed Description

Definition at line 126 of file plottingOptions.py.

Constructor & Destructor Documentation

◆ __init__()

def plottingOptions.PlottingOptionsTrackSplitting.__init__ (   self,
  config 
)

Definition at line 133 of file plottingOptions.py.

133  def __init__(self, config):
134  super(PlottingOptionsTrackSplitting, self).__init__(config, "split")
135  validsubdets = self.validsubdets()
136  if self.general["subdetector"] not in validsubdets:
137  raise AllInOneError("'%s' is not a valid subdetector!\n" % self.general["subdetector"] + "The options are: " + ", ".join(validsubdets))
138 

References plottingOptions.BasePlottingOptions.general, genericValidation.GenericValidation.general, join(), and plottingOptions.PlottingOptionsTrackSplitting.validsubdets().

Member Function Documentation

◆ validsubdets()

def plottingOptions.PlottingOptionsTrackSplitting.validsubdets (   self)

Definition at line 139 of file plottingOptions.py.

139  def validsubdets(self):
140  filename = replaceByMap(".oO[Alignment/CommonAlignmentProducer]Oo./python/AlignmentTrackSelector_cfi.py", self.getRepMap())
141  with open(filename) as f:
142  trackselector = f.read()
143 
144  minhitspersubdet = trackselector.split("minHitsPerSubDet")[1].split("(",1)[1]
145 
146  parenthesesdepth = 0
147  i = 0
148  for character in minhitspersubdet:
149  if character == "(":
150  parenthesesdepth += 1
151  if character == ")":
152  parenthesesdepth -= 1
153  if parenthesesdepth < 0:
154  break
155  i += 1
156  minhitspersubdet = minhitspersubdet[0:i]
157 
158  results = minhitspersubdet.split(",")
159  empty = []
160  for i in range(len(results)):
161  results[i] = results[i].split("=")[0].strip().replace("in", "", 1)
162 
163  results.append("none")
164 
165  return [a for a in results if a]
166 

References overlapValidation.OverlapValidation.getRepMap(), monteCarloValidation.MonteCarloValidation.getRepMap(), geometryComparison.GeometryComparison.getRepMap(), offlineValidation.OfflineValidation.getRepMap(), plottingOptions.BasePlottingOptions.getRepMap(), genericValidation.GenericValidation.getRepMap(), offlineValidation.OfflineValidationDQM.getRepMap(), alignment.Alignment.getRepMap(), genericValidation.GenericValidationData.getRepMap(), genericValidation.GenericValidationData_CTSR.getRepMap(), FastTimerService_cff.range, python.rootplot.root2matplotlib.replace(), helperFunctions.replaceByMap(), submitPVValidationJobs.split(), and digitizers_cfi.strip.

Referenced by plottingOptions.PlottingOptionsTrackSplitting.__init__().

Member Data Documentation

◆ defaults

dictionary plottingOptions.PlottingOptionsTrackSplitting.defaults
static
Initial value:
= {
"outliercut": "-1.0",
"subdetector": "none",
}

Definition at line 127 of file plottingOptions.py.

Referenced by tree.Tree.reset(), and tree.Tree.var().

◆ needpackages

dictionary plottingOptions.PlottingOptionsTrackSplitting.needpackages = {"Alignment/CommonAlignmentProducer"}
static

Definition at line 131 of file plottingOptions.py.

◆ validationclass

plottingOptions.PlottingOptionsTrackSplitting.validationclass = TrackSplittingValidation
static

Definition at line 132 of file plottingOptions.py.

Referenced by plottingOptions.BasePlottingOptions.getRepMap().

FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
helperFunctions.replaceByMap
def replaceByMap(target, the_map)
— Helpers —############################
Definition: helperFunctions.py:13
submitPVValidationJobs.split
def split(sequence, size)
Definition: submitPVValidationJobs.py:352
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444