CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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__(), python.seqvaluedict.seqdict.__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 edm::PoissonPUGenerator.average, TSinglePedEntry.average(), Cluster1DCleaner< T >.average(), average.Average.average(), ElectronMVAID.ElectronMVAID.name, entry.name, core.autovars.NTupleVariable.name, average.Average.name, genericValidation.GenericValidation.name, cond::persistency::TAG::NAME.name, TmModule.name, cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::TAG::TIME_TYPE.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::COND_LOG_TABLE::EXECTIME.name, cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::COND_LOG_TABLE::IOVTAG.name, cond::persistency::TAG::SYNCHRONIZATION.name, EventMonitor::Entry.name, cond::persistency::GLOBAL_TAG::RELEASE.name, ora::RecordSpecImpl::Item.name, cond::persistency::COND_LOG_TABLE::USERTEXT.name, cond::persistency::TAG::END_OF_VALIDITY.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cond::persistency::TAG::DESCRIPTION.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, alignment.Alignment.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, FWTGeoRecoGeometry::Info.name, Types._Untracked.name, cond::persistency::TAG::INSERTION_TIME.name, cond::persistency::TAG::MODIFICATION_TIME.name, ParameterSet.name, PixelDCSObject< class >::Item.name, analyzer.Analyzer.name, DQMRivetClient::LumiOption.name, MagCylinder.name, core.autovars.NTupleObjectType.name, cond::persistency::GTProxyData.name, ParSet.name, DQMRivetClient::ScaleFactorOption.name, SingleObjectCondition.name, EgHLTOfflineSummaryClient::SumHistBinData.name, XMLHTRZeroSuppressionLoader::_loaderBaseConfig.name, XMLRBXPedestalsLoader::_loaderBaseConfig.name, DQMGenericClient::EfficOption.name, MyWatcher.name, edm::PathTimingSummary.name, cond::TimeTypeSpecs.name, lumi::TriggerInfo.name, edm::PathSummary.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, perftools::EdmEventSize::BranchRecord.name, PixelEndcapLinkMaker::Item.name, FWTableViewManager::TableEntry.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, PixelBarrelLinkMaker::Item.name, EcalLogicID.name, Mapper::definition< ScannerT >.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, ExpressionHisto< T >.name, options.ConnectionHLTMenu.name, McSelector.name, RecoSelector.name, DQMGenericClient::NormOption.name, XMLProcessor::_loaderBaseConfig.name, TreeCrawler.Package.name, cond::persistency::PAYLOAD::HASH.name, TrajectorySeedProducer::LayerSpec.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, cond::persistency::PAYLOAD::DATA.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, MagGeoBuilderFromDDD::volumeHandle.name, cond::persistency::PAYLOAD::VERSION.name, DQMGenericClient::CDOption.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, core.autovars.NTupleObject.name, cond::TagInfo_t.name, h4DSegm.name, looper.Looper.name, PhysicsTools::Calibration::Variable.name, EDMtoMEConverter.name, options.HLTProcessOptions.name, config.Analyzer.name, MEtoEDM< T >::MEtoEDMObject.name, cond::persistency::IOV::TAG_NAME.name, cond::persistency::IOV::SINCE.name, cond::persistency::IOV::PAYLOAD_HASH.name, cond::persistency::IOV::INSERTION_TIME.name, MuonGeometrySanityCheckPoint.name, core.autovars.NTupleCollection.name, config.Service.name, h2DSegm.name, DQMNet::WaitObject.name, AlpgenParameterName.name, SiStripMonitorDigi.name, cond::persistency::TAG_MIGRATION::SOURCE_ACCOUNT.name, cond::persistency::TAG_MIGRATION::SOURCE_TAG.name, cond::persistency::TAG_MIGRATION::TAG_NAME.name, cond::persistency::TAG_MIGRATION::STATUS_CODE.name, cond::persistency::TAG_MIGRATION::INSERTION_TIME.name, FastTimerService::LuminosityDescription.name, cond::persistency::PAYLOAD_MIGRATION::SOURCE_ACCOUNT.name, cond::persistency::PAYLOAD_MIGRATION::SOURCE_TOKEN.name, cond::persistency::PAYLOAD_MIGRATION::PAYLOAD_HASH.name, cond::persistency::PAYLOAD_MIGRATION::INSERTION_TIME.name, conddblib.Tag.name, conddblib.GlobalTag.name, plotscripts.SawTeethFunction.name, FastTimerService::ProcessDescription.name, hTMaxCell.name, cscdqm::ParHistoDef.name, BeautifulSoup.Tag.name, TiXmlAttribute.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(), runMVAMEtUncertainties.RunMVAMEtUncertainties.uncertainty, CountBits< INDEX >.value, GlobalTag.GlobalTagBuilderException.value, edmtest::ESTestDataA.value(), edm::MergeableCounter.value, python.readProv.filereader.Module.value, funct::Numerical< n >.value, CountBits< 0 >.value, TreeToEdges.Int.value, TmCcu.value, fftluttypes::EtaFlatteningFactors.value, NodeCut.Int.value, pat::JetSelection.value, TmApvPair.value, TmModule.value, funct::Parametric< F >.value, IncompleteGammaComplement.value(), TrivialError.value(), CSCCLCTDataWord.value(), HcalRecAlgosPrivate::IsClassType< T >.value, BinningPointByMap.value(), fftluttypes::PileupRhoCalibration.value, funct::Parametric< Numerical< n > >.value, SortObject.value, BinomialProbability.value(), reco::parser::ExpressionNumber.value(), edmtest::ESTestDataB.value(), RPCObGasHum::Item.value, RPCObImon::I_Item.value, reco::egamma::mask< L1 >.value, CalibCoeff.value(), reco::parser::ExpressionBase.value(), reco::parser::ExpressionBinaryOperator< Op >.value(), reco::parser::CutBinaryOperator< Op >.value(), reco::parser::ExpressionCondition.value(), reco::parser::ExpressionQuaterOperator< Op >.value(), reco::parser::ExpressionUnaryOperator< Op >.value(), EcalWeight.value(), ESWeight.value(), CSCPairConstraint.value(), reco::egamma::mask< 0 >.value, funct::Parametric< FractionStruct< n, m > >.value, fftluttypes::PileupRhoEtaDependence.value, TmPsu.value, AlphaT.value(), CSCDBGasGainCorrection.value(), Geom::Theta< T >.value(), FastTimer.value(), ChiSquared.value(), Measurement1DFloat.value(), edm::workerimpl::has_stream_functions< T >.value, entry< T >.value, reco::parser::matches_another_integral_type< T >.value, reco::parser::ExpressionVar.value(), CSCDBChipSpeedCorrection.value(), edmtest::ESTestDataC.value(), Measurement1D.value(), edm::math_private::ieee_float_shape_type.value, dbread.value, DDString.value(), fftluttypes::LUT0.value, condex::Efficiency.value(), pat::LookupTableRecord.value(), average.Average.value(), PixelDCSObject< class >::Item.value, HcalRecAlgosPrivate::HasRawEnergySetterHelper< T >.value, DDConstant.value(), edm::workerimpl::has_stream_functions< edm::global::EDProducerBase >.value, magneticfield::UniformMagneticFieldESProducer.value, details::PhiSortElement< Object, Scalar >.value, edm::FileFormatVersion.value(), pat::ElectronSelection.value, TtEvent::HypoClassKeyStringToEnum.value, fftluttypes::LUT1.value, edm::math_private::ieee_double_shape_type.value, Geom::OnePiRange< T >.value(), L1MonitorDigi.value(), DDMapper< KeyType, ValueType >.value(), edmtest::ESTestDataD.value(), edm::workerimpl::has_stream_functions< edm::global::EDFilterBase >.value, RPCObVmon::V_Item.value, funct::Parametric< AbsStruct< A > >.value, EcalUncalibRecHitRatioMethodAlgo< C >::Ratio.value, HcalRecAlgosPrivate::HasRawEnergySetter< T, is_class_type >.value, TauJetCorrector::ParametrizationTauJet.value(), funct::Parametric< SgnStruct< A > >.value, edm::key_traits< K >.value, cscdqm::TempMeasType.value, DataFormats_MuonReco::dictionary::edm::key_traits< K >.value, Geom::Phi< T >.value(), JetPartonNamespace::ParametrizationJetParton.value(), funct::Parametric< ExpStruct< A > >.value, edm::eventsetup::SimpleStringTag.value(), fftcorrtypes::BasicJet.value, gen::Param.value, funct::Parametric< LogStruct< A > >.value, L1GtBoardTypeStringToEnum.value, l1t::L1GtBoardTypeStringToEnum.value, funct::Parametric< SinStruct< A > >.value, stats_t< T >.value, OpticalAlignParam.value(), fftluttypes::LUT2.value, edm::workerimpl::has_stream_functions< edm::global::EDAnalyzerBase >.value, funct::Parametric< CosStruct< A > >.value, funct::Parametric< TanStruct< A > >.value, EcalUncalibRecHitRatioMethodAlgo< C >::Tmax.value, HcalRecAlgosPrivate::HasRawEnergySetter< T, true >.value, funct::Parametric< MinusStruct< A > >.value, CSCPairResidualsConstraint.value(), EcalSrFlag.value(), edm::LuminosityBlockID.value(), pos::PixelDACScanRange.value(), condex::ParametricEfficiencyInPt.value(), edmtest::ESTestDataE.value(), fftcorrtypes::GenJet.value, edm::StreamID.value(), edm::workerimpl::has_stream_functions< edm::stream::EDProducerAdaptorBase >.value, edm::math_private::ieee_long_double_shape_type.value, fftluttypes::LUT3.value, Mapper::definition< ScannerT >.value, options.ConnectionHLTMenu.value, DDVector.value(), DDStrVector.value(), funct::DefaultVariable.value, funct::Parametric< DefaultVariable >.value, HcalUHTRData::const_iterator.value(), edm::eventsetup::heterocontainer::HCTypeTag.value(), edm::RunIndex.value(), funct::X.value, funct::Parametric< X >.value, edm::workerimpl::has_stream_functions< edm::stream::EDFilterAdaptorBase >.value, fftcorrtypes::CaloJet.value, funct::Parametric< SumStruct< A, B > >.value, edm::key_traits< std::pair< U, V > >.value, funct::Y.value, funct::Parametric< Y >.value, DataFormats_MuonReco::dictionary::edm::key_traits< std::pair< U, V > >.value, FWConfiguration.value(), FWProxyBuilderConfiguration.value(), edm::LuminosityBlockIndex.value(), L1GctHfBitCountsLut.value(), funct::Parametric< ProductStruct< A, B > >.value, funct::Z.value, funct::Parametric< Z >.value, muon::SelectionTypeStringToEnum.value, fftluttypes::LUT4.value, L1GctUnsignedInt< nBits >.value(), RPCObStatus::S_Item.value, funct::Parametric< RatioStruct< A, B > >.value, L1GtObjectStringToEnum.value, edmtest::ESTestDataF.value(), L1GctJetEtCalibrationLut.value(), funct::Parametric< PowerStruct< A, B > >.value, edm::has_fillView< edm::SortedCollection< T, SORT > >.value, Entry.value(), reco::parser::ExpressionLazyVar.value(), edm::Timestamp.value(), edm::workerimpl::has_stream_functions< edm::stream::EDAnalyzerAdaptorBase >.value, Mixins._SimpleParameterTypeBase.value(), fftcorrtypes::PFJet.value, MuonResidualsTwoBin.value(), fftluttypes::LUT5.value, edm::eventsetup::produce::size< T >.value, edm::has_setPtr< edm::SortedCollection< T, SORT > >.value, L1GctTwosComplement< nBits >.value(), npstat::Private::AbsHelper< T, Unsigned >.value(), cms::detail::is_derived_or_same< BASE, DERIVED >.value, edm::eventsetup::produce::size< Null >.value, PhysicsTools::TreeReader::Bool.value, cmsutils::_bqueue_item< T >.value, edmtest::ESTestDataG.value(), FWGenericParameter< T >.value(), L1GctHtMissLut.value(), fftcorrtypes::TrackJet.value, condex::ParametricEfficiencyInEta.value(), fftluttypes::LUT6.value, FWPSetTableManager::PSetData.value, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::ValueItem.value, HcalRecAlgosPrivate::HasRawEnergyGetterHelper< T >.value, fftcorrtypes::JPTJet.value, edm::key_traits< std::string >.value, DataFormats_MuonReco::dictionary::edm::key_traits< std::string >.value, cscdqm::HVVMeasType.value, PhysicsTools::Calibration::Histogram< Value_t, Axis_t >.value(), PhysicsTools::Variable::Value.value, RPCObTemp::T_Item.value, fftluttypes::LUT7.value, edmtest::ESTestDataH.value(), L1GctLut< NAddressBits, NDataBits >.value(), L1GctHfEtSumsLut.value(), npstat::Private::AbsHelper< T, 1 >.value(), HcalRecAlgosPrivate::HasRawEnergyGetter< T, is_class_type >.value, fftcorrtypes::PFCHS0.value, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::KeyItem.value, fftluttypes::LUT8.value, lhef::LHERunInfo::XSec.value(), SimpleSAXParser::Attribute.value, funct::tmpl::abs< n, positive >.value, PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >.value(), L1GtPsbQuadStringToEnum.value, l1t::L1GtPsbQuadStringToEnum.value, TreeSaver::Var.value, funct::tmpl::abs< n, false >.value, HcalRecAlgosPrivate::HasRawEnergyGetter< T, true >.value, fftcorrtypes::PFCHS1.value, edmtest::ESTestDataI.value(), L1GctInternHFData.value(), fftluttypes::LUT9.value, edm::eventsetup::produce::find_index_impl< ContainerT, EntryT, FindT >.value, fftcorrtypes::PFCHS2.value, edm::eventsetup::produce::find_index_impl< ContainerT, T, T >.value, fftluttypes::LUT10.value, edmtest::ESTestDataJ.value(), edm::AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper >.value(), edm::eventsetup::produce::find_index< T, FindT >.value, PhysicsTools::Calibration::Histogram3D< Value_t, AxisX_t, AxisY_t, AxisZ_t >.value(), fftluttypes::LUT11.value, jsoncollector::IntJ.value(), fftcorrtypes::BasicJetSys.value, edm::TrieNode< T >.value(), edmtest::ESTestDataK.value(), fftluttypes::LUT12.value, PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.value, fftcorrtypes::GenJetSys.value, HcalRecAlgosPrivate::HasAuxRecHitGetterHelper< T >.value, fftluttypes::LUT13.value, fftcorrtypes::CaloJetSys.value, edmtest::ESTestDataZ.value(), HcalRecAlgosPrivate::HasAuxRecHitGetter< T, is_class_type >.value, fftluttypes::LUT14.value, edm::fillDetails::has_fillDescriptions_function< T >.value, fftcorrtypes::PFJetSys.value, L1GctInternEtSum.value(), HcalRecAlgosPrivate::HasAuxRecHitGetter< T, true >.value, fftluttypes::LUT15.value, fftcorrtypes::TrackJetSys.value, L1GtConditionTypeStringToEnum.value, l1t::GtConditionTypeStringToEnum.value, edm::has_fillView< T >.value, Measurement.value(), DataFormats_MuonReco::dictionary::edm::has_fillView< T >.value, fftcorrtypes::JPTJetSys.value, GenericMVAComputer::TaggingVariableIterator< Iter_t >.value, edm::eventsetup::produce::ProductHolder< T1, T2, T3 >.value, edm::has_fillView< std::vector< T, A > >.value, DataFormats_MuonReco::dictionary::edm::has_fillView< std::vector< T, A > >.value, fftcorrtypes::PFCHS0Sys.value, cscdqm::LVIMeasType.value, edm::has_fillView< std::vector< bool, A > >.value, DataFormats_MuonReco::dictionary::edm::has_fillView< std::vector< bool, A > >.value, fftcorrtypes::PFCHS1Sys.value, edm::fillDetails::has_prevalidate_function< T >.value, jsoncollector::DoubleJ.value(), edm::has_fillView< std::list< T, A > >.value, DataFormats_MuonReco::dictionary::edm::has_fillView< std::list< T, A > >.value, funct::SimplSumOrd< F, G, H >::prod0.value, l1t::GtConditionCategoryStringToEnum.value, fftcorrtypes::PFCHS2Sys.value, L1GtConditionCategoryStringToEnum.value, edm::has_fillView< std::deque< T, A > >.value, DataFormats_MuonReco::dictionary::edm::has_fillView< std::deque< T, A > >.value, reco::IsoDeposit::const_iterator.value(), funct::SimplSumOrd< F, G, H >::prod1.value, edm::has_fillView< std::set< T, A > >.value, DataFormats_MuonReco::dictionary::edm::has_fillView< std::set< T, A > >.value, edm::eventsetup::produce::ProductHolder< T1, Null, Null >.value, fftcorrtypes::Gen0.value, fftcorrtypes::Gen1.value, funct::SimplSumOrd< F, G, H >::prod2.value, fftcorrtypes::Gen2.value, jsoncollector::StringJ.value(), edm::has_setPtr< T >.value, edm::JobReport::AtomicLongLong.value(), fftcorrtypes::PF0.value, DataFormats_MuonReco::dictionary::edm::has_setPtr< T >.value, edm::has_setPtr< std::vector< T, A > >.value, funct::RatioP1< F, G, H >::prod0.value, fftcorrtypes::PF1.value, DataFormats_MuonReco::dictionary::edm::has_setPtr< std::vector< T, A > >.value, MuonResidualsFitter.value(), edm::has_setPtr< std::vector< bool, A > >.value, DataFormats_MuonReco::dictionary::edm::has_setPtr< std::vector< bool, A > >.value, fftcorrtypes::PF2.value, funct::Product< ProductStruct< F, G >, H >::prod0.value, funct::RatioP1< F, G, H >::prod1.value, edm::has_setPtr< std::list< T, A > >.value, DataFormats_MuonReco::dictionary::edm::has_setPtr< std::list< T, A > >.value, fftcorrtypes::PF3.value, funct::Product< ProductStruct< F, G >, H >::prod1.value, npstat::ArrayND< Numeric, StackLen, StackDim >.value(), edm::has_setPtr< std::deque< T, A > >.value, DataFormats_MuonReco::dictionary::edm::has_setPtr< std::deque< T, A > >.value, fftcorrtypes::PF4.value, funct::RatioP1< F, G, H >::prod2.value, DataFormats_MuonReco::dictionary::edm::has_fillView< PtrVector< T > >.value, edm::has_fillView< PtrVector< T > >.value, edm::has_setPtr< std::set< T, A > >.value, fftcorrtypes::Calo0.value, DataFormats_MuonReco::dictionary::edm::has_setPtr< std::set< T, A > >.value, funct::Product< ProductStruct< F, G >, H >::prod2.value, fftcorrtypes::Calo1.value, edm::has_fillView< RefVector< C, T, F > >.value, fftcorrtypes::Calo2.value, fftcorrtypes::Calo3.value, fftcorrtypes::Calo4.value, fftcorrtypes::Gen0Sys.value, jsoncollector::HistoJ< T >.value(), fftcorrtypes::Gen1Sys.value, funct::RatioP2< F, G, H >::prod0.value, fftcorrtypes::Gen2Sys.value, edm::detail::has_swap_function< T >.value, fftcorrtypes::PF0Sys.value, edm::has_fillView< RefToBaseVector< T > >.value, funct::RatioP2< F, G, H >::prod1.value, fftcorrtypes::PF1Sys.value, edm::detail::has_typedef_value_type< T >.value, fftcorrtypes::PF2Sys.value, funct::RatioP2< F, G, H >::prod2.value, edm::detail::has_postinsert< T >.value, fftcorrtypes::PF3Sys.value, fftcorrtypes::PF4Sys.value, edm::detail::has_donotrecordparents< T >.value, edm::detail::has_typedef_member_type< T >.value, edm::has_fillView< AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper > >.value, fftcorrtypes::PF5Sys.value, fftcorrtypes::PF6Sys.value, fftcorrtypes::PF7Sys.value, edm::detail::has_mergeProduct_function< T >.value, fftcorrtypes::PF8Sys.value, fftcorrtypes::PF9Sys.value, edm::detail::has_isProductEqual_function< T >.value, fftcorrtypes::Calo0Sys.value, funct::RatioSimpl< A, B, C >::ratio1.value, fftcorrtypes::Calo1Sys.value, funct::RatioSimpl< A, B, C >::ratio2.value, fftcorrtypes::Calo2Sys.value, fftcorrtypes::Calo3Sys.value, fftcorrtypes::Calo4Sys.value, fftcorrtypes::Calo5Sys.value, fftcorrtypes::Calo6Sys.value, fftcorrtypes::Calo7Sys.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::OwnArray< T, M, P > >.value, edm::has_fillView< edm::OwnVector< T, P > >.value, Types.InputTag.value(), Vispa.Views.PropertyView.Property.value(), edm::has_setPtr< edm::OwnArray< T, M, P > >.value, edm::has_setPtr< edm::OwnVector< T, P > >.value, Mixins._ValidatingParameterListBase.value(), Vispa.Views.PropertyView.BooleanProperty.value(), Types.ESInputTag.value(), Vispa.Views.PropertyView.DropDownProperty.value(), Types.SecSource.value(), Types.PSet.value(), Vispa.Views.PropertyView.TextEditWithButtonProperty.value(), TiXmlNode.value, Vispa.Views.PropertyView.IntegerProperty.value(), TiXmlAttribute.value, and Vispa.Views.PropertyView.DoubleProperty.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(), LinearFitErrorsIn2Coord.variance(), FFTJetCorrectorTransient.variance(), PhysicsTools::LeastSquares.variance, and AutoCorrMat.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 average.Average.average().

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, entry.name, core.autovars.NTupleVariable.name, average.Average.name, genericValidation.GenericValidation.name, cond::persistency::GLOBAL_TAG::NAME.name, TmModule.name, cond::persistency::TAG::NAME.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::TAG::TIME_TYPE.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::COND_LOG_TABLE::EXECTIME.name, cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::TAG::SYNCHRONIZATION.name, EventMonitor::Entry.name, cond::persistency::GLOBAL_TAG::RELEASE.name, ora::RecordSpecImpl::Item.name, cond::persistency::COND_LOG_TABLE::IOVTAG.name, cond::persistency::TAG::END_OF_VALIDITY.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cond::persistency::COND_LOG_TABLE::USERTEXT.name, cond::persistency::TAG::DESCRIPTION.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, alignment.Alignment.name, FWTGeoRecoGeometry::Info.name, Types._Untracked.name, cond::persistency::TAG::INSERTION_TIME.name, cond::persistency::TAG::MODIFICATION_TIME.name, ParameterSet.name, PixelDCSObject< class >::Item.name, analyzer.Analyzer.name, DQMRivetClient::LumiOption.name, MagCylinder.name, core.autovars.NTupleObjectType.name, cond::persistency::GTProxyData.name, ParSet.name, DQMRivetClient::ScaleFactorOption.name, SingleObjectCondition.name, EgHLTOfflineSummaryClient::SumHistBinData.name, DQMGenericClient::EfficOption.name, XMLRBXPedestalsLoader::_loaderBaseConfig.name, XMLHTRZeroSuppressionLoader::_loaderBaseConfig.name, MyWatcher.name, edm::PathTimingSummary.name, lumi::TriggerInfo.name, cond::TimeTypeSpecs.name, edm::PathSummary.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, PixelEndcapLinkMaker::Item.name, perftools::EdmEventSize::BranchRecord.name, FWTableViewManager::TableEntry.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, PixelBarrelLinkMaker::Item.name, Mapper::definition< ScannerT >.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, EcalLogicID.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, options.ConnectionHLTMenu.name, McSelector.name, ExpressionHisto< T >.name, RecoSelector.name, XMLProcessor::_loaderBaseConfig.name, DQMGenericClient::NormOption.name, cond::persistency::PAYLOAD::HASH.name, TreeCrawler.Package.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, TrajectorySeedProducer::LayerSpec.name, cond::persistency::PAYLOAD::DATA.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, cond::persistency::PAYLOAD::VERSION.name, MagGeoBuilderFromDDD::volumeHandle.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, DQMGenericClient::CDOption.name, core.autovars.NTupleObject.name, cond::TagInfo_t.name, h4DSegm.name, looper.Looper.name, PhysicsTools::Calibration::Variable.name, EDMtoMEConverter.name, options.HLTProcessOptions.name, config.Analyzer.name, MEtoEDM< T >::MEtoEDMObject.name, cond::persistency::IOV::TAG_NAME.name, cond::persistency::IOV::SINCE.name, cond::persistency::IOV::PAYLOAD_HASH.name, cond::persistency::IOV::INSERTION_TIME.name, MuonGeometrySanityCheckPoint.name, core.autovars.NTupleCollection.name, config.Service.name, h2DSegm.name, DQMNet::WaitObject.name, AlpgenParameterName.name, SiStripMonitorDigi.name, cond::persistency::TAG_MIGRATION::SOURCE_ACCOUNT.name, cond::persistency::TAG_MIGRATION::SOURCE_TAG.name, cond::persistency::TAG_MIGRATION::TAG_NAME.name, cond::persistency::TAG_MIGRATION::STATUS_CODE.name, cond::persistency::TAG_MIGRATION::INSERTION_TIME.name, FastTimerService::LuminosityDescription.name, cond::persistency::PAYLOAD_MIGRATION::SOURCE_ACCOUNT.name, cond::persistency::PAYLOAD_MIGRATION::SOURCE_TOKEN.name, cond::persistency::PAYLOAD_MIGRATION::PAYLOAD_HASH.name, cond::persistency::PAYLOAD_MIGRATION::INSERTION_TIME.name, conddblib.Tag.name, conddblib.GlobalTag.name, plotscripts.SawTeethFunction.name, FastTimerService::ProcessDescription.name, hTMaxCell.name, cscdqm::ParHistoDef.name, BeautifulSoup.Tag.name, TiXmlAttribute.name, and BeautifulSoup.SoupStrainer.name.

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

Member Data Documentation

average.Average.name

Definition at line 11 of file average.py.

Referenced by dirstructure.Directory.__create_pie_image(), dqm_interfaces.DirID.__eq__(), dirstructure.Directory.__get_full_path(), dirstructure.Comparison.__get_img_name(), dataset.Dataset.__getDataType(), dataset.Dataset.__getFileInfoList(), cuy.divideElement.__init__(), cuy.plotElement.__init__(), cuy.additionElement.__init__(), cuy.superimposeElement.__init__(), cuy.graphElement.__init__(), dirstructure.Comparison.__make_image(), dirstructure.Directory.__repr__(), dqm_interfaces.DirID.__repr__(), dirstructure.Comparison.__repr__(), config.CFG.__str__(), counter.Counter.__str__(), average.Average.__str__(), dirstructure.Directory.calcStats(), python.rootplot.utilities.Hist.divide(), python.rootplot.utilities.Hist.divide_wilson(), utils.StatisticalTest.get_status(), dirstructure.Directory.print_report(), python.rootplot.utilities.Hist.TGraph(), python.rootplot.utilities.Hist.TH1F(), Vispa.Views.PropertyView.Property.valueChanged(), 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().