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
average.Average Class Reference
Inheritance diagram for average.Average:

Public Member Functions

def __add__
 
def __iadd__
 
def __init__
 
def __str__
 
def add
 
def average
 
def uncertainty
 
def value
 
def variance
 
def write
 

Public Attributes

 name
 
 sumw
 
 sumwx
 
 sumwx2
 

Detailed Description

Definition at line 8 of file average.py.

Constructor & Destructor Documentation

def average.Average.__init__ (   self,
  name 
)

Definition at line 10 of file average.py.

10 
11  def __init__(self, name):
12  self.name = name
13  self.sumw = 0
14  self.sumwx = 0
15  self.sumwx2 = 0

Member Function Documentation

def average.Average.__add__ (   self,
  other 
)
Add two averages, merging the two samples.

Definition at line 54 of file average.py.

References average.Average.sumw, average.Average.sumwx, and average.Average.sumwx2.

Referenced by counter.Counter.__iadd__(), and average.Average.__iadd__().

54 
55  def __add__(self, other):
56  '''Add two averages, merging the two samples.'''
57  self.sumw += other.sumw
58  self.sumwx += other.sumwx
59  self.sumwx2 += other.sumwx2
60  return self
def average.Average.__iadd__ (   self,
  other 
)
Add two averages.

Definition at line 61 of file average.py.

References rltinfo.MyInteger.__add__(), SequenceTypes._Sequenceable.__add__(), GlobalTag.GlobalTag.__add__(), average.Average.__add__(), SequenceTypes._SequenceCollection.__add__(), LumiList.LumiList.__add__(), and Mixins._ValidatingListBase.__add__().

61 
62  def __iadd__(self, other):
63  '''Add two averages.'''
64  return self.__add__(other)
def average.Average.__str__ (   self)

Definition at line 75 of file average.py.

References TSinglePedEntry.average(), Cluster1DCleaner< T >.average(), average.Average.average(), ElectronMVAID.ElectronMVAID.name, AlignableObjectId::entry.name, average.Average.name, cond::persistency::TAG::NAME.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, TmModule.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::RUN_INFO::START_TIME.name, cond::persistency::TAG::TIME_TYPE.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::RUN_INFO::END_TIME.name, core.autovars.NTupleVariable.name, cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::GLOBAL_TAG::RELEASE.name, cond::persistency::TAG::SYNCHRONIZATION.name, DQMRivetClient::NormOption.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cond::persistency::TAG::END_OF_VALIDITY.name, MEPSet.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::O2O_RUN::JOB_NAME.name, cond::persistency::TAG::DESCRIPTION.name, cms::dd::NameValuePair< T >.name, cond::persistency::O2O_RUN::START_TIME.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, cond::persistency::O2O_RUN::END_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, FWTGeoRecoGeometry::Info.name, cond::persistency::O2O_RUN::STATUS_CODE.name, cond::persistency::TAG::MODIFICATION_TIME.name, ParameterSet.name, cond::persistency::O2O_RUN::LOG.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::PROTECTION_CODE.name, OutputMEPSet.name, preexistingValidation.PreexistingValidation.name, AlignmentConstraint.name, PixelDCSObject< class >::Item.name, cms::dd::ValuePair< T, U >.name, personalPlayback.Applet.name, Types._Untracked.name, MagCylinder.name, analyzer.Analyzer.name, heppy::ParSet.name, DQMRivetClient::LumiOption.name, o2olib.O2OJob.name, cond::persistency::GTProxyData.name, SingleObjectCondition.name, EgHLTOfflineSummaryClient::SumHistBinData.name, edm::PathTimingSummary.name, DQMRivetClient::ScaleFactorOption.name, cms::DDAlgoArguments.name, Barrel.name, core.autovars.NTupleObjectType.name, cond::TimeTypeSpecs.name, perftools::EdmEventSize::BranchRecord.name, edm::PathSummary.name, EcalLogicID.name, alignment.Alignment.name, lumi::TriggerInfo.name, PixelEndcapLinkMaker::Item.name, XMLProcessor::_loaderBaseConfig.name, MEtoEDM< T >::MEtoEDMObject.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, ExpressionHisto< T >.name, DQMGenericClient::EfficOption.name, TreeCrawler.Package.name, Supermodule.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, genericValidation.GenericValidation.name, options.ConnectionHLTMenu.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, cms::DDParsingContext::CompositeMaterial.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, cond::Tag_t.name, dqmoffline::l1t::HistDefinition.name, DQMGenericClient::ProfileOption.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, FastHFShowerLibrary.name, magneticfield::BaseVolumeHandle.name, emtf::Node.name, h4DSegm.name, DQMGenericClient::NormOption.name, DQMGenericClient::CDOption.name, CounterChecker.name, PhysicsTools::Calibration::Variable.name, cond::TagInfo_t.name, TrackerSectorStruct.name, MuonGeometrySanityCheckPoint.name, DQMGenericClient::NoFlowOption.name, cond::persistency::PAYLOAD::HASH.name, looper.Looper.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, Mapper::definition< ScannerT >.name, cond::persistency::PAYLOAD::DATA.name, EDMtoMEConverter.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, cond::persistency::PAYLOAD::VERSION.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, classes.MonitorData.name, HistogramManager.name, classes.OutputData.name, Crystal.name, h2DSegm.name, options.HLTProcessOptions.name, cond::persistency::IOV::TAG_NAME.name, cond::persistency::IOV::SINCE.name, cond::persistency::IOV::PAYLOAD_HASH.name, cond::persistency::IOV::INSERTION_TIME.name, DQMNet::WaitObject.name, AlpgenParameterName.name, config.Analyzer.name, geometry.Structure.name, core.autovars.NTupleSubObject.name, Capsule.name, core.autovars.NTupleObject.name, Ceramic.name, SiStripMonitorDigi.name, BulkSilicon.name, config.Service.name, APD.name, core.autovars.NTupleCollection.name, nanoaod::FlatTable::Column.name, BPHRecoBuilder::BPHRecoSource.name, BPHRecoBuilder::BPHCompSource.name, StraightTrackAlignment::RPSetPlots.name, cond::persistency::TAG_AUTHORIZATION::TAG_NAME.name, cond::persistency::TAG_AUTHORIZATION::ACCESS_TYPE.name, cond::persistency::TAG_AUTHORIZATION::CREDENTIAL.name, cond::persistency::TAG_AUTHORIZATION::CREDENTIAL_TYPE.name, InnerLayerVolume.name, cond::payloadInspector::TagReference.name, cond::persistency::TAG_LOG::TAG_NAME.name, cond::persistency::TAG_LOG::EVENT_TIME.name, cond::persistency::TAG_LOG::USER_NAME.name, cond::persistency::TAG_LOG::HOST_NAME.name, cond::persistency::TAG_LOG::COMMAND.name, cond::persistency::TAG_LOG::ACTION.name, cond::persistency::TAG_LOG::USER_TEXT.name, personalPlayback.FrameworkJob.name, Grid.name, Grille.name, BackPipe.name, plotscripts.SawTeethFunction.name, PatchPanel.name, BackCoolTank.name, DryAirTube.name, crabFunctions.CrabTask.name, MBCoolTube.name, MBManif.name, cscdqm::ParHistoDef.name, hTMaxCell.name, BeautifulSoup.Tag.name, SummaryOutputProducer::GenericSummary.name, and BeautifulSoup.SoupStrainer.name.

75 
76  def __str__(self):
77  ave, unc = self.average()
78  tmp = None
79  if ave is not None:
80  tmp = 'Average {name:<15}: {average: 8.4f} +- {unc:8.4f}'
81  # tmp = 'Average {name:<15}: {average: 8.4f}'
82  tmp = tmp.format( name = self.name,
83  average = ave,
84  unc = unc
85  )
86  else:
87  tmp = 'Average {name:<15}: undefined (call Average.add)'\
88  .format( name = self.name)
89  return tmp
90 
91 
def average.Average.add (   self,
  value,
  weight = 1.0 
)
Add a new sample to the average.

Definition at line 16 of file average.py.

References average.Average.sumw, average.Average.sumwx, and average.Average.sumwx2.

Referenced by counter.Counter.register().

16 
17  def add(self, value, weight=1.0):
18  """
19  Add a new sample to the average.
20  """
21  value = float(value) # avoids surprising results with integers
22  weight = float(weight)
23  self.sumw += weight
24  self.sumwx += weight * value
25  self.sumwx2 += weight * value * value
def average.Average.average (   self)
Returns: mean value, uncertainty on mean value.

Definition at line 48 of file average.py.

References SimpleJetCorrectionUncertainty.uncertainty(), average.Average.uncertainty(), CountBits< INDEX >.value, timeout.TimedOutExc.value, TmCcu.value, fftluttypes::EtaFlatteningFactors.value, edmtest::ESTestDataA.value(), GlobalTag.GlobalTagBuilderException.value, python.readProv.filereader.Module.value, CountBits< 0 >.value, funct::Numerical< n >.value, IncompleteGammaComplement.value(), TmModule.value, edm::MergeableCounter.value, TmApvPair.value, HGCalTriggerClusterIdentificationBase.value(), funct::Parametric< F >.value, pat::JetSelection.value, fftluttypes::PileupRhoCalibration.value, TrivialError.value(), CSCComparatorDataWord.value(), BinningPointByMap.value(), HcalLUTCorrsGPU::Product.value, HcalTimeCorrsGPU::Product.value, TestCUDAAnalyzerGPUKernel.value(), Entry< T >.value, funct::Parametric< Numerical< n > >.value, HcalRecAlgosPrivate::IsClassType< T >.value, CalibCoeff.value(), reco::parser::ExpressionNumber.value(), cms::dd::NameValuePair< T >.value, dataset.IntegrityCheckError.value, fftluttypes::PileupRhoEtaDependence.value, edmtest::ESTestDataB.value(), RPCObImon::I_Item.value, RPCObGasHum::Item.value, SortObject.value, reco::parser::ExpressionBinaryOperator< Op >.value(), reco::parser::ExpressionUnaryOperator< Op >.value(), reco::parser::CutBinaryOperator< Op >.value(), reco::parser::ExpressionQuaterOperator< Op >.value(), reco::egamma::mask< L1 >.value, CSCPairConstraint.value(), reco::parser::ExpressionCondition.value(), EcalWeight.value(), ESWeight.value(), reco::parser::matches_another_integral_type< T >.value, AlphaT.value(), funct::Parametric< FractionStruct< n, m > >.value, ChiSquared.value(), reco::parser::ExpressionBase.value(), Measurement1DFloat.value(), nanoaod::MergeableCounterTable::SingleColumn< T >.value, CSCDBGasGainCorrection.value(), Geom::Theta< T >.value(), fftluttypes::LUT0.value, trklet::FPGAWord.value(), reco::egamma::mask< 0 >.value, Measurement1D.value(), L1TUtmCutValue.value, condex::Efficiency.value(), cms::dd::ValuePair< T, U >.value, entry< T >.value, dbread.value, CSCDBChipSpeedCorrection.value(), pat::LookupTableRecord.value(), DDString.value(), PixelDCSObject< class >::Item.value, fftluttypes::LUT1.value, edmtest::ESTestDataC.value(), average.Average.value(), magneticfield::UniformMagneticFieldESProducer.value, edm::workerimpl::has_stream_functions< T >.value, edm::ProcessBlockIndex.value(), LazyConstructed< WrappedClass, Args >.value(), L1GtBoardTypeStringToEnum.value, edm::FileFormatVersion.value(), DDConstant.value(), l1t::L1GtBoardTypeStringToEnum.value, edm::detail::has_typedef_value_type< T >.value, fftluttypes::LUT2.value, TauJetCorrector::ParametrizationTauJet.value(), edm::key_traits< K >.value, DDMapper< KeyType, ValueType >.value(), edm::ProductRegistryHelper::has_donotrecordparents< T >.value, edm::detail::IsStdOptional< T >.value, HcalRecAlgosPrivate::HasRawEnergySetterHelper< T >.value, L1MonitorDigi.value(), edm::workerimpl::has_stream_functions< edm::global::EDProducerBase >.value, gen::Param.value, RPCObVmon::V_Item.value, condex::ParametricEfficiencyInPt.value(), cscdqm::TempMeasType.value, JetPartonNamespace::ParametrizationJetParton.value(), fftcorrtypes::BasicJet.value, funct::Parametric< AbsStruct< A > >.value, EcalUncalibRecHitRatioMethodAlgo< C >::Ratio.value, funct::Parametric< SgnStruct< A > >.value, fftluttypes::LUT3.value, edm::eventsetup::SimpleStringTag.value(), edmtest::ESTestDataD.value(), edm::detail::IsStdOptional< std::optional< T > >.value, funct::Parametric< ExpStruct< A > >.value, OpticalAlignParam.value(), TmPsu.value, HGCalTriggerClusterIdentificationBDT.value(), funct::Parametric< LogStruct< A > >.value, HcalRecAlgosPrivate::HasRawEnergySetter< T, is_class_type >.value, edm::workerimpl::has_stream_functions< edm::global::EDFilterBase >.value, select_size_t_constant< u, ull >.value, funct::Parametric< SinStruct< A > >.value, TtEvent::HypoClassKeyStringToEnum.value, funct::Parametric< CosStruct< A > >.value, fftcorrtypes::GenJet.value, EcalUncalibRecHitRatioMethodAlgo< C >::Tmax.value, edm::StreamID.value(), funct::Parametric< TanStruct< A > >.value, edm::ESProxyIndex.value(), EcalSrFlag.value(), edm::LuminosityBlockID.value(), fftluttypes::LUT4.value, funct::Parametric< MinusStruct< A > >.value, edm::Timestamp.value(), DDStrVector.value(), cms::DDAlgoArguments.value(), edm::eventsetup::heterocontainer::HCTypeTag.value(), edm::RunIndex.value(), DDVector.value(), HcalRecAlgosPrivate::HasRawEnergySetter< T, true >.value, edm::workerimpl::has_stream_functions< edm::global::EDAnalyzerBase >.value, edm::key_traits< std::pair< U, V > >.value, FWConfiguration.value(), edm::one::WantsGlobalRunTransitions< VArgs >.value, edm::LuminosityBlockIndex.value(), fftcorrtypes::CaloJet.value, VFATFrameCollection::Iterator.value, L1GctHfBitCountsLut.value(), fftluttypes::LUT5.value, edmtest::ESTestDataE.value(), FWGenericParameter< T >.value(), funct::DefaultVariable.value, funct::Parametric< DefaultVariable >.value, stats_t< T >.value, edm::workerimpl::has_stream_functions< edm::limited::EDProducerBase >.value, L1GctJetEtCalibrationLut.value(), funct::X.value, funct::Parametric< X >.value, fftcorrtypes::PFJet.value, CSCPairResidualsConstraint.value(), LazyResult< Func, Args >.value(), FWProxyBuilderConfiguration.value(), funct::Parametric< SumStruct< A, B > >.value, funct::Y.value, funct::Parametric< Y >.value, Entry.value(), L1GtObjectStringToEnum.value, l1t::L1TGtObjectStringToEnum.value, reco::parser::ExpressionVar.value(), L1GctUnsignedInt< nBits >.value(), RPCObStatus::S_Item.value, funct::Parametric< ProductStruct< A, B > >.value, edm::has_fillView< edm::SortedCollection< T, SORT > >.value, funct::Z.value, funct::Parametric< Z >.value, fftluttypes::LUT6.value, npstat::Private::AbsHelper< T, Unsigned >.value(), funct::Parametric< RatioStruct< A, B > >.value, HcalUHTRData::const_iterator.value(), edm::one::WantsGlobalLuminosityBlockTransitions< VArgs >.value, funct::Parametric< PowerStruct< A, B > >.value, edm::detail::has_typedef_member_type< T >.value, pos::PixelDACScanRange.value(), edm::workerimpl::has_stream_functions< edm::limited::EDFilterBase >.value, fftcorrtypes::TrackJet.value, condex::ParametricEfficiencyInEta.value(), edm::has_setPtr< edm::SortedCollection< T, SORT > >.value, fftluttypes::LUT7.value, edmtest::ESTestDataF.value(), L1GctTwosComplement< nBits >.value(), PhysicsTools::TreeReader::Bool.value, edm::workerimpl::has_stream_functions< edm::limited::EDAnalyzerBase >.value, FWPSetTableManager::PSetData.value, fftcorrtypes::JPTJet.value, L1GctHtMissLut.value(), edm::key_traits< std::string >.value, cms::DDFilter.value(), muon::SelectionTypeStringToEnum.value, fftluttypes::LUT8.value, npstat::Private::AbsHelper< T, 1 >.value(), edm::eventsetup::produce::ProductHolder< T1, TArgs >.value, cms::detail::is_derived_or_same< BASE, DERIVED >.value, edm::one::WantsSerialGlobalRunTransitions< VArgs >.value, calogeometryDBEPimpl::HasAlignmentRecord< T >.value, reco::parser::ExpressionLazyVar.value(), PhysicsTools::Variable::Value.value, edm::workerimpl::has_stream_functions< edm::stream::EDProducerAdaptorBase >.value, cscdqm::HVVMeasType.value, fftcorrtypes::PFCHS0.value, PhysicsTools::Calibration::Histogram< Value_t, Axis_t >.value(), edmtest::ESTestDataG.value(), fftluttypes::LUT9.value, funct::tmpl::abs< n, positive >.value, edm::ESTokenIndex.value(), lhef::LHERunInfo::XSec.value(), RPCObTemp::T_Item.value, L1GtPsbQuadStringToEnum.value, edm::detail::has_typedef_member_type< std::vector< edm::Ptr< T > > >.value, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::ValueItem.value, MuonResidualsTwoBin.value(), PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >.value(), edm::workerimpl::has_stream_functions< edm::stream::EDFilterAdaptorBase >.value, edm::one::WantsSerialGlobalLuminosityBlockTransitions< VArgs >.value, fftcorrtypes::PFCHS1.value, cmsutils::_bqueue_item< T >.value, L1GctLut< NAddressBits, NDataBits >.value(), SimpleSAXParser::Attribute.value, HcalRecAlgosPrivate::HasRawEnergyGetterHelper< T >.value, fftluttypes::LUT10.value, edm::fillDetails::has_fillDescriptions_function< T >.value, funct::tmpl::abs< n, false >.value, Geom::Phi< T1, Range >.value(), L1GctHfEtSumsLut.value(), edm::soa::ColumnFillers< Args >.value(), edm::workerimpl::has_stream_functions< edm::stream::EDAnalyzerAdaptorBase >.value, fftcorrtypes::PFCHS2.value, Mapper::definition< ScannerT >.value, HcalRecAlgosPrivate::HasRawEnergyGetter< T, is_class_type >.value, fftluttypes::LUT11.value, L1GctInternHFData.value(), edmtest::ESTestDataH.value(), cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::KeyItem.value, edm::eventsetup::produce::size< T >.value, edm::detail::has_typedef_member_type< std::vector< std::unique_ptr< T, Deleter > > >.value, edm::workerimpl::has_only_stream_transition_functions< T >.value, HcalRecAlgosPrivate::HasRawEnergyGetter< T, true >.value, edm::eventsetup::produce::size< Null >.value, fftluttypes::LUT12.value, dqm::impl::Access.value, fftcorrtypes::BasicJetSys.value, edm::workerimpl::has_only_stream_transition_functions< edm::global::OutputModuleBase >.value, l1t::GtConditionTypeStringToEnum.value, jsoncollector::IntJ.value(), fftluttypes::LUT13.value, edmtest::ESTestDataI.value(), dqm::impl::AccessMut.value, fftcorrtypes::GenJetSys.value, edm::TrieNode< T >.value(), edm::eventsetup::produce::ProductHolder< T1 >.value, L1GctInternEtSum.value(), fftluttypes::LUT14.value, fftcorrtypes::CaloJetSys.value, PhysicsTools::Calibration::Histogram3D< Value_t, AxisX_t, AxisY_t, AxisZ_t >.value(), L1GtConditionTypeStringToEnum.value, edm::ESRecordIndex.value(), Mixins._SimpleParameterTypeBase.value(), edmtest::ESTestDataJ.value(), fftluttypes::LUT15.value, edm::fillDetails::has_prevalidate_function< T >.value, fftcorrtypes::PFJetSys.value, edm::detail::has_mergeProduct_function< T >.value, edm::AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper >.value(), L1GtConditionCategoryStringToEnum.value, muon::SelectorStringToEnum.value, fftcorrtypes::TrackJetSys.value, l1t::GtConditionCategoryStringToEnum.value, edmtest::ESTestDataK.value(), Measurement.value(), Types._OptionalParameter.value(), fftcorrtypes::JPTJetSys.value, HcalRecAlgosPrivate::HasAuxEnergySetterHelper< T >.value, fftcorrtypes::PFCHS0Sys.value, edm::has_fillView< T >.value, GenericMVAComputer::TaggingVariableIterator< Iter_t >.value, HcalRecAlgosPrivate::HasAuxEnergySetter< T, is_class_type >.value, edmtest::ESTestDataZ.value(), fftcorrtypes::PFCHS1Sys.value, edm::has_fillView< std::vector< T, A > >.value, HcalRecAlgosPrivate::HasAuxEnergySetter< T, true >.value, fftcorrtypes::PFCHS2Sys.value, edm::has_fillView< std::vector< bool, A > >.value, cscdqm::LVIMeasType.value, edm::eventsetup::produce::find_index< T, FindT >.value, jsoncollector::DoubleJ.value(), edm::has_fillView< std::list< T, A > >.value, funct::SimplSumOrd< F, G, H >::prod0.value, edm::has_fillView< std::deque< T, A > >.value, fftcorrtypes::Gen0.value, edm::detail::has_isProductEqual_function< T >.value, edm::has_fillView< std::set< T, A > >.value, fftcorrtypes::Gen1.value, funct::SimplSumOrd< F, G, H >::prod1.value, edm::WantsProcessBlockTransitions< VArgs >.value, MuonResidualsFitter.value(), fftcorrtypes::Gen2.value, HcalRecAlgosPrivate::HasAuxEnergyGetterHelper< T >.value, edm::WantsInputProcessBlockTransitions< VArgs >.value, fftcorrtypes::PF0.value, cmsBatch.CmsBatchException.value, funct::SimplSumOrd< F, G, H >::prod2.value, reco::IsoDeposit::const_iterator.value(), edm::WantsGlobalRunTransitions< VArgs >.value, HcalRecAlgosPrivate::HasAuxEnergyGetter< T, is_class_type >.value, fftcorrtypes::PF1.value, edm::has_setPtr< T >.value, jsoncollector::StringJ.value(), HcalRecAlgosPrivate::HasAuxEnergyGetter< T, true >.value, fftcorrtypes::PF2.value, edm::has_setPtr< std::vector< T, A > >.value, edm::WantsGlobalLuminosityBlockTransitions< VArgs >.value, fftcorrtypes::PF3.value, edm::has_setPtr< std::vector< bool, A > >.value, funct::RatioP1< F, G, H >::prod0.value, funct::Product< ProductStruct< F, G >, H >::prod0.value, edm::WantsStreamRunTransitions< VArgs >.value, fftcorrtypes::PF4.value, edm::has_setPtr< std::list< T, A > >.value, edm::JobReport::AtomicLongLong.value(), fftcorrtypes::Calo0.value, edm::has_setPtr< std::deque< T, A > >.value, edm::WantsStreamLuminosityBlockTransitions< VArgs >.value, edm::detail::has_swap_function< T >.value, funct::RatioP1< F, G, H >::prod1.value, funct::Product< ProductStruct< F, G >, H >::prod1.value, fftcorrtypes::Calo1.value, edm::has_setPtr< std::set< T, A > >.value, edm::HasAbilityToProduceInBeginProcessBlocks< VArgs >.value, fftcorrtypes::Calo2.value, edm::HasAbilityToProduceInEndProcessBlocks< VArgs >.value, HcalRecAlgosPrivate::HasAuxRecHitGetterHelper< T >.value, funct::RatioP1< F, G, H >::prod2.value, fftcorrtypes::Calo3.value, funct::Product< ProductStruct< F, G >, H >::prod2.value, HcalRecAlgosPrivate::HasAuxRecHitGetter< T, is_class_type >.value, edm::HasAbilityToProduceInBeginRuns< VArgs >.value, fftcorrtypes::Calo4.value, HcalRecAlgosPrivate::HasAuxRecHitGetter< T, true >.value, edm::HasAbilityToProduceInEndRuns< VArgs >.value, npstat::ArrayND< Numeric, StackLen, StackDim >.value(), edm::has_fillView< RefVector< C, T, F > >.value, edm::HasAbilityToProduceInBeginLumis< VArgs >.value, fftcorrtypes::Gen0Sys.value, edm::has_fillView< PtrVector< T > >.value, edm::HasAbilityToProduceInEndLumis< VArgs >.value, fftcorrtypes::Gen1Sys.value, edm::has_fillView< RefToBaseVector< T > >.value, fftcorrtypes::Gen2Sys.value, fftcorrtypes::PF0Sys.value, fftcorrtypes::PF1Sys.value, jsoncollector::HistoJ< T >.value(), fftcorrtypes::PF2Sys.value, fftcorrtypes::PF3Sys.value, funct::RatioP2< F, G, H >::prod0.value, fftcorrtypes::PF4Sys.value, fftcorrtypes::PF5Sys.value, funct::RatioP2< F, G, H >::prod1.value, fftcorrtypes::PF6Sys.value, fftcorrtypes::PF7Sys.value, funct::RatioP2< F, G, H >::prod2.value, fftcorrtypes::PF8Sys.value, fftcorrtypes::PF9Sys.value, fftcorrtypes::Calo0Sys.value, fftcorrtypes::Calo1Sys.value, fftcorrtypes::Calo2Sys.value, fftcorrtypes::Calo3Sys.value, edm::detail::has_postinsert< T >.value, fftcorrtypes::Calo4Sys.value, fftcorrtypes::Calo5Sys.value, funct::RatioSimpl< A, B, C >::ratio1.value, edm::has_fillView< AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper > >.value, fftcorrtypes::Calo6Sys.value, fftcorrtypes::Calo7Sys.value, funct::RatioSimpl< A, B, C >::ratio2.value, fftcorrtypes::Calo8Sys.value, fftcorrtypes::Calo9Sys.value, fftcorrtypes::CHS0Sys.value, fftcorrtypes::CHS1Sys.value, fftcorrtypes::CHS2Sys.value, fftcorrtypes::CHS3Sys.value, fftcorrtypes::CHS4Sys.value, fftcorrtypes::CHS5Sys.value, fftcorrtypes::CHS6Sys.value, fftcorrtypes::CHS7Sys.value, fftcorrtypes::CHS8Sys.value, fftcorrtypes::CHS9Sys.value, edm::has_fillView< edm::DetSetVector< T > >.value, edm::has_fillView< edm::OwnVector< T, P > >.value, edm::has_setPtr< edm::OwnVector< T, P > >.value, Mixins._ValidatingParameterListBase.value(), genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.value(), Types.InputTag.value(), Types.ESInputTag.value(), Types.SecSource.value(), and Types.PSet.value().

Referenced by average.Average.__str__().

48 
49  def average( self ):
50  """
51  Returns: mean value, uncertainty on mean value.
52  """
53  return self.value(), self.uncertainty()
def uncertainty
Definition: average.py:39
def average.Average.uncertainty (   self)
Uncertainty on the mean value

Definition at line 39 of file average.py.

References average.Average.sumw, Accumulator.variance(), average.Average.variance(), FFTJetCorrectorTransient.variance(), and LinearFitErrorsIn2Coord.variance().

Referenced by average.Average.average().

39 
40  def uncertainty(self):
41  """
42  Uncertainty on the mean value
43  """
44  if self.sumw:
45  return math.sqrt( self.variance() ) / math.sqrt( self.sumw )
46  else:
47  return None
def uncertainty
Definition: average.py:39
def average.Average.value (   self)
Mean value

Definition at line 30 of file average.py.

References average.Average.sumw, and average.Average.sumwx.

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

30 
31  def value(self):
32  """
33  Mean value
34  """
35  if self.sumw:
36  return self.sumwx / self.sumw
37  else:
38  return None
def average.Average.variance (   self)

Definition at line 26 of file average.py.

References funct.abs(), average.Average.sumw, average.Average.sumwx, and average.Average.sumwx2.

Referenced by average.Average.uncertainty().

26 
27  def variance(self):
28  return abs( self.sumwx2 / self.sumw - \
29  self.sumwx * self.sumwx / (self.sumw*self.sumw) )
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def average.Average.write (   self,
  dirname 
)
Dump the average to a pickle file and to a text file in dirname.

Definition at line 65 of file average.py.

References ElectronMVAID.ElectronMVAID.name, AlignableObjectId::entry.name, average.Average.name, TmModule.name, cond::persistency::TAG::NAME.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::TAG::TIME_TYPE.name, cond::persistency::RUN_INFO::START_TIME.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::RUN_INFO::END_TIME.name, core.autovars.NTupleVariable.name, cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::TAG::SYNCHRONIZATION.name, cond::persistency::GLOBAL_TAG::RELEASE.name, DQMRivetClient::NormOption.name, cond::persistency::TAG::END_OF_VALIDITY.name, MEPSet.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cond::persistency::O2O_RUN::JOB_NAME.name, cond::persistency::TAG::DESCRIPTION.name, cms::dd::NameValuePair< T >.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::O2O_RUN::START_TIME.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, cond::persistency::O2O_RUN::END_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, FWTGeoRecoGeometry::Info.name, cond::persistency::O2O_RUN::STATUS_CODE.name, cond::persistency::TAG::MODIFICATION_TIME.name, cond::persistency::O2O_RUN::LOG.name, ParameterSet.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::PROTECTION_CODE.name, preexistingValidation.PreexistingValidation.name, OutputMEPSet.name, AlignmentConstraint.name, PixelDCSObject< class >::Item.name, cms::dd::ValuePair< T, U >.name, personalPlayback.Applet.name, Types._Untracked.name, MagCylinder.name, analyzer.Analyzer.name, heppy::ParSet.name, DQMRivetClient::LumiOption.name, o2olib.O2OJob.name, cond::persistency::GTProxyData.name, SingleObjectCondition.name, EgHLTOfflineSummaryClient::SumHistBinData.name, edm::PathTimingSummary.name, DQMRivetClient::ScaleFactorOption.name, cms::DDAlgoArguments.name, Barrel.name, perftools::EdmEventSize::BranchRecord.name, core.autovars.NTupleObjectType.name, cond::TimeTypeSpecs.name, edm::PathSummary.name, EcalLogicID.name, alignment.Alignment.name, lumi::TriggerInfo.name, PixelEndcapLinkMaker::Item.name, XMLProcessor::_loaderBaseConfig.name, MEtoEDM< T >::MEtoEDMObject.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, ExpressionHisto< T >.name, DQMGenericClient::EfficOption.name, TreeCrawler.Package.name, Supermodule.name, genericValidation.GenericValidation.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, options.ConnectionHLTMenu.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cms::DDParsingContext::CompositeMaterial.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, cond::Tag_t.name, dqmoffline::l1t::HistDefinition.name, DQMGenericClient::ProfileOption.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, magneticfield::BaseVolumeHandle.name, FastHFShowerLibrary.name, emtf::Node.name, h4DSegm.name, DQMGenericClient::NormOption.name, DQMGenericClient::CDOption.name, CounterChecker.name, PhysicsTools::Calibration::Variable.name, cond::TagInfo_t.name, TrackerSectorStruct.name, MuonGeometrySanityCheckPoint.name, cond::persistency::PAYLOAD::HASH.name, DQMGenericClient::NoFlowOption.name, Mapper::definition< ScannerT >.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, looper.Looper.name, cond::persistency::PAYLOAD::DATA.name, EDMtoMEConverter.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, cond::persistency::PAYLOAD::VERSION.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, classes.MonitorData.name, HistogramManager.name, classes.OutputData.name, Crystal.name, h2DSegm.name, options.HLTProcessOptions.name, cond::persistency::IOV::TAG_NAME.name, cond::persistency::IOV::SINCE.name, cond::persistency::IOV::PAYLOAD_HASH.name, cond::persistency::IOV::INSERTION_TIME.name, DQMNet::WaitObject.name, AlpgenParameterName.name, config.Analyzer.name, geometry.Structure.name, core.autovars.NTupleSubObject.name, Capsule.name, core.autovars.NTupleObject.name, Ceramic.name, SiStripMonitorDigi.name, config.Service.name, BulkSilicon.name, APD.name, core.autovars.NTupleCollection.name, nanoaod::FlatTable::Column.name, BPHRecoBuilder::BPHRecoSource.name, BPHRecoBuilder::BPHCompSource.name, StraightTrackAlignment::RPSetPlots.name, cond::persistency::TAG_AUTHORIZATION::TAG_NAME.name, cond::persistency::TAG_AUTHORIZATION::ACCESS_TYPE.name, cond::persistency::TAG_AUTHORIZATION::CREDENTIAL.name, cond::persistency::TAG_AUTHORIZATION::CREDENTIAL_TYPE.name, InnerLayerVolume.name, cond::payloadInspector::TagReference.name, cond::persistency::TAG_LOG::TAG_NAME.name, cond::persistency::TAG_LOG::EVENT_TIME.name, cond::persistency::TAG_LOG::USER_NAME.name, cond::persistency::TAG_LOG::HOST_NAME.name, cond::persistency::TAG_LOG::COMMAND.name, cond::persistency::TAG_LOG::ACTION.name, cond::persistency::TAG_LOG::USER_TEXT.name, personalPlayback.FrameworkJob.name, Grid.name, Grille.name, BackPipe.name, plotscripts.SawTeethFunction.name, PatchPanel.name, BackCoolTank.name, DryAirTube.name, crabFunctions.CrabTask.name, MBCoolTube.name, MBManif.name, cscdqm::ParHistoDef.name, hTMaxCell.name, BeautifulSoup.Tag.name, SummaryOutputProducer::GenericSummary.name, BeautifulSoup.SoupStrainer.name, and str.

65 
66  def write(self, dirname):
67  '''Dump the average to a pickle file and to a text file in dirname.'''
68  pckfname = '{d}/{f}.pck'.format(d=dirname, f=self.name)
69  pckfile = open( pckfname, 'w' )
70  pickle.dump(self, pckfile)
71  txtfile = open( pckfname.replace('.pck', '.txt'), 'w')
72  txtfile.write( str(self) )
73  txtfile.write( '\n' )
74  txtfile.close()
#define str(s)

Member Data Documentation

average.Average.name

Definition at line 11 of file average.py.

Referenced by FWLite.ElectronMVAID.__call__(), dirstructure.Directory.__create_pie_image(), DisplayManager.DisplayManager.__del__(), dqm_interfaces.DirID.__eq__(), dirstructure.Directory.__get_full_path(), dirstructure.Comparison.__get_img_name(), dataset.Dataset.__getDataType(), dataset.Dataset.__getFileInfoList(), dirstructure.Comparison.__make_image(), dirstructure.Directory.__repr__(), dqm_interfaces.DirID.__repr__(), dirstructure.Comparison.__repr__(), config.CFG.__str__(), counter.Counter.__str__(), average.Average.__str__(), FWLite.WorkingPoints._reformat_cut_definitions(), dirstructure.Directory.calcStats(), geometryComparison.GeometryComparison.createScript(), validation.Sample.digest(), python.rootplot.utilities.Hist.divide(), python.rootplot.utilities.Hist.divide_wilson(), DisplayManager.DisplayManager.Draw(), utils.StatisticalTest.get_status(), production_tasks.Task.getname(), dataset.CMSDataset.getPrimaryDatasetEntries(), dataset.PrivateDataset.getPrimaryDatasetEntries(), primaryVertexResolution.PrimaryVertexResolution.getRepMap(), primaryVertexValidation.PrimaryVertexValidation.getRepMap(), zMuMuValidation.ZMuMuValidation.getRepMap(), VIDSelectorBase.VIDSelectorBase.initialize(), dirstructure.Directory.print_report(), dataset.BaseDataset.printInfo(), dataset.Dataset.printInfo(), production_tasks.MonitorJobs.run(), python.rootplot.utilities.Hist.TGraph(), python.rootplot.utilities.Hist.TH1F(), counter.Counter.write(), and average.Average.write().

average.Average.sumw

Definition at line 12 of file average.py.

Referenced by average.Average.__add__(), average.Average.add(), average.Average.uncertainty(), average.Average.value(), and average.Average.variance().

average.Average.sumwx

Definition at line 13 of file average.py.

Referenced by average.Average.__add__(), average.Average.add(), average.Average.value(), and average.Average.variance().

average.Average.sumwx2

Definition at line 14 of file average.py.

Referenced by average.Average.__add__(), average.Average.add(), and average.Average.variance().