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 | Private Attributes
genericValidation.ValidationWithPlotsSummaryBase.SummaryItem Class Reference
Inheritance diagram for genericValidation.ValidationWithPlotsSummaryBase.SummaryItem:

Public Member Functions

def __init__
 
def format
 
def name
 
def value
 
def values
 

Private Attributes

 __format
 
 __latexformat
 
 __latexname
 
 __name
 
 __values
 

Detailed Description

Definition at line 638 of file genericValidation.py.

Constructor & Destructor Documentation

def genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__init__ (   self,
  name,
  values,
  format = None,
  latexname = None,
  latexformat = None 
)
name:        name of the summary item, goes on top of the column
values:      value for each alignment (in order of rows)
format:      python format string (default: {:.3g}, meaning up to 3 significant digits)
latexname:   name in latex form, e.g. if name=sigma you might want latexname=\sigma (default: name)
latexformat: format for latex (default: format)

Definition at line 639 of file genericValidation.py.

640  def __init__(self, name, values, format=None, latexname=None, latexformat=None):
641  """
642  name: name of the summary item, goes on top of the column
643  values: value for each alignment (in order of rows)
644  format: python format string (default: {:.3g}, meaning up to 3 significant digits)
645  latexname: name in latex form, e.g. if name=sigma you might want latexname=\sigma (default: name)
646  latexformat: format for latex (default: format)
647  """
648  if format is None: format = "{:.3g}"
649  if latexname is None: latexname = name
650  if latexformat is None: latexformat = format
652  self.__name = name
653  self.__values = values
654  self.__format = format
655  self.__latexname = latexname
656  self.__latexformat = latexformat

Member Function Documentation

def genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.format (   self,
  value,
  latex = False 
)

Definition at line 663 of file genericValidation.py.

References genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__format, and genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__latexformat.

Referenced by genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.values().

664  def format(self, value, latex=False):
665  if latex:
666  fmt = self.__latexformat
667  else:
668  fmt = self.__format
669  if re.match(".*[{][^}]*[fg][}].*", fmt):
670  value = float(value)
671  return fmt.format(value)
def genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.name (   self,
  latex = False 
)

Definition at line 657 of file genericValidation.py.

References genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__latexname, dataset.Dataset.__name, and genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__name.

Referenced by config.CFG.__str__(), geometryComparison.GeometryComparison.createScript(), validation.Sample.digest(), primaryVertexResolution.PrimaryVertexResolution.getRepMap(), primaryVertexValidation.PrimaryVertexValidation.getRepMap(), zMuMuValidation.ZMuMuValidation.getRepMap(), and VIDSelectorBase.VIDSelectorBase.initialize().

658  def name(self, latex=False):
659  if latex:
660  return self.__latexname
661  else:
662  return self.__name
def genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.value (   self,
  i,
  latex 
)

Definition at line 676 of file genericValidation.py.

References EcalPulseCovariancesGPU::Product.values, EcalPulseShapesGPU::Product.values, HcalMahiPulseOffsetsGPU::Product.values, EcalIntercalibConstantsGPU::Product.values, EcalLaserAPDPNRatiosRefGPU::Product.values, HcalGainsGPU::Product.values, HcalPedestalsGPU::Product.values, HcalQIETypesGPU::Product.values, EcalLaserAlphasGPU::Product.values, HcalRespCorrsGPU::Product.values, EcalTimeCalibConstantsGPU::Product.values, HcalConvertedPedestalsGPU::Product.values, HGCalHistoSeedingImpl::Bin.values, HcalConvertedPedestalWidthsGPU::Product.values, AlpgenParTokens.values, BlobComplexData.values, UETable.values, SiStripNoises::ratioData.values, FWTriggerTableView::Column.values, MagFieldConfig.values, nanoaod::MergeableCounterTable::VectorColumn< T >.values, @19935::LeaderLookup.values, SiStripCorrelateNoise::Data.values, PhysicsTools::TreeReader.values, svgfig.SVG.values(), PhysicsTools::VarProcessor::ValueIterator.values, genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.values(), and Config.TestMakePSet.values.

Referenced by Types.int32.__nonzero__(), Types.uint32.__nonzero__(), Types.int64.__nonzero__(), Types.uint64.__nonzero__(), Types.double.__nonzero__(), Types.bool.__nonzero__(), Types.string.__nonzero__(), average.Average.average(), Types.string.configValue(), Types.FileInPath.configValue(), Mixins.UsingBlock.dumpPython(), Mixins.UsingBlock.insertInto(), Types.int32.insertInto(), Types.uint32.insertInto(), Types.int64.insertInto(), Types.uint64.insertInto(), Types.double.insertInto(), Types.bool.insertInto(), Types.string.insertInto(), Types.FileInPath.insertInto(), Types.vint32.insertInto(), Types.vuint32.insertInto(), Types.vint64.insertInto(), Types.vuint64.insertInto(), Types.vdouble.insertInto(), Types.vbool.insertInto(), and Types.vstring.insertInto().

677  def value(self, i, latex):
678  return self.values(latex)[i]
679 
@abstractmethod
def genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.values (   self,
  latex = False 
)

Definition at line 672 of file genericValidation.py.

References genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__values, Formatter.SimpleAsciiFormatter.format, progressbar.Timer.format, Formatter.SimpleHTMLFormatter.format, progressbar.FormatLabel.format, and genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.format().

Referenced by genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.value().

673  def values(self, latex=False):
674  result = [self.format(v, latex=latex) for v in self.__values]
675  return result

Member Data Documentation

genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__format
private

Definition at line 653 of file genericValidation.py.

Referenced by genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.format().

genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__latexformat
private

Definition at line 655 of file genericValidation.py.

Referenced by genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.format().

genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__latexname
private

Definition at line 654 of file genericValidation.py.

Referenced by genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.name().

genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__name
private

Definition at line 651 of file genericValidation.py.

Referenced by Config.Process.dumpConfig(), Config.Process.dumpPython(), genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.name(), Config.Process.name_(), and Config.Process.splitPython().

genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__values
private

Definition at line 652 of file genericValidation.py.

Referenced by genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.values().