Common Analysis Framework » QFRAMEWORK » TQCounter

class TQCounter: public TNamed


 TQCounter

 A TQCounter is a counter for events, counting weighted und
 unweighted event numbers. In essence, it is the same as a histogram
 with a single bin, with a simplified interface.


Function Members (Methods)

public:
virtual~TQCounter()
voidTObject::AbstractMethod(const char* method) const
voidadd(double weight)
voidadd(const TQCounter* counter, TQCounter* scale, double correlation = 0., bool includeScaleUncertainty = false)
voidadd(const TQCounter* counter, double scale = 1., double scaleUncertainty = 0., double correlation = 0., bool includeScaleUncertainty = true)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
ULong_tTObject::CheckedHash()
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
voiddivide(const TQCounter* counter, double correlation = 0, bool includeScaleUncertainty = false)
voiddivide(double denominator, double uncertainty = 0., double correlation = 0., bool includeScaleUncertainty = true)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt,...) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt,...) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
TStringgetAsString(const TString& options = "") const
static TStringgetComparison(TQCounter* cnt1, TQCounter* cnt2, bool colored = false, double order = 9.9999999999999995E-8)
doublegetCounter() const
virtual Option_t*TObject::GetDrawOption() const
static Longptr_tTObject::GetDtorOnly()
doublegetError() const
doublegetErrorSquared() const
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
intgetRawCounter() const
doublegetStatError() const
doublegetStatErrorSquared() const
doublegetSysError() const
doublegetSysErrorSquared() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
boolgetWarning() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
Bool_tTObject::HasInconsistentHash() const
virtual voidTObject::Info(const char* method, const char* msgfmt,...) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tTObject::IsDestructed() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
boolisEqualTo(TQCounter* counter, double order = 9.9999999999999995E-8)
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
boolisRawEqualTo(TQCounter* counter)
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
voidmultiply(const TQCounter* counter, double correlation = 0., bool includeScaleUncertainty = false)
voidmultiply(double factor, double uncertainty = 0., double correlation = 0., bool includeScaleUncertainty = true)
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TQCounter&operator=(const TQCounter&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
voidprint(const TString& options = "") const
virtual voidTNamed::Print(Option_t* option = "") const
voidprintCounter(const TString& options = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidreset()
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidscale(const TQCounter* scale, bool includeScaleUncertainty = true)
voidscale(double factor, double scaleUncertainty = 0., bool includeScaleUncertainty = true)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidsetCounter(double counter)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidsetError(double error)
voidsetErrorSquared(double errorSquared)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
voidsetRawCounter(int raw)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
voidsetWarning(bool warning = true)
virtual voidShowMembers(TMemberInspector& insp) const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
voidsubtract(const TQCounter* counter, TQCounter* scale, double correlation = 0., bool includeScaleUncertainty = false)
voidsubtract(const TQCounter* counter, double scale = 1., double scaleUncertainty = 0., double correlation = 0., bool includeScaleUncertainty = true)
virtual voidTObject::SysError(const char* method, const char* msgfmt,...) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
TQCounter()
TQCounter(const char* name)
TQCounter(const TQCounter* counter)
TQCounter(const TQCounter&)
TQCounter(const char* name, const char* title)
TQCounter(const TString& name, double cnt, double err = 0.)
TQCounter(const TString& name, double cnt, double err, int raw)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt,...) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
virtual Bool_tCheckTObjectHashConsistency() const

Data Members

public:
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::(anonymous)TObject::kInconsistent
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EDeprecatedStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
doublefCountercounter
doublefErrorSquarederror
TStringTNamed::fNameobject identifier
intfRawCounterraw counter
TStringTNamed::fTitleobject title
boolfWarning
static TObject::(anonymous)TObject::kOnlyPrepStep

Class Charts

Inheritance Chart:
TObject
TNamed
TQCounter

Function documentation

TQCounter()
 default constructor, required by ROOT streamer
TQCounter(const char* name)
 constructor taking only the object name
TQCounter(const char* name, const char* title)
 constructor taking only the object name and title
TQCounter(const TString& name, double cnt, double err = 0.)
 constructor taking object name as well as value and uncertainty
TQCounter(const TString& name, double cnt, double err, int raw)
 constructor taking object name as well as value and uncertainty
TQCounter(const TQCounter* counter)
 Create an exact copy of a counter
void reset()
 Reset this counter
TString getAsString(const TString& options = "") const
 retrieve the contents of this counter
 as a nicely formatted string
void print(const TString& options = "") const
 print a string representing this counter
void printCounter(const TString& options = "") const
 print a string representing this counter
double getCounter() const
 retrieve the value of this counter
void setCounter(double counter)
 set the value of this counter
void setRawCounter(int raw)
 set the raw value of this counter
double getError() const
 return the total error (uncertainty)
double getErrorSquared() const
 return the total variance (square uncertainty)
void setErrorSquared(double errorSquared)
 set the total variance (square uncertainty)
void setError(double error)
 set the total uncertainty (sqrt(variance)). Please note that internally the
 squared value is stored, signs are therefore dropped
double getStatError() const
 retrieve the statistical error
 currently not implemented
double getStatErrorSquared() const
 retrieve the statistical error
 currently not implemented
double getSysError() const
 retrieve the statistical error
 currently not implemented
double getSysErrorSquared() const
 retrieve the systematic error
 currently not implemented
int getRawCounter() const
 Return the number of raw counts
void setWarning(bool warning = true)
 set the 'warning' flag on this counter
bool getWarning() const
 retrieve the value of the 'warning' flag
void add(double weight)
 add one entry with a given weight to this counter
void add(const TQCounter* counter, double scale = 1., double scaleUncertainty = 0., double correlation = 0., bool includeScaleUncertainty = true)
 add the contents of another counter to this one optionally including scale uncertainty and a possible correlation between the two counters.
 "scale" is treated as being uncorrelated to "counter" and the TQCounter this method is called on.
void add(const TQCounter* counter, TQCounter* scale, double correlation = 0., bool includeScaleUncertainty = false)
 add the contents of another counter to this one optionally including scale uncertainty and a possible correlation between the two counters.
 "scale" is treated as being uncorrelated to "counter" and the TQCounter this method is called on.
void subtract(const TQCounter* counter, double scale = 1., double scaleUncertainty = 0., double correlation = 0., bool includeScaleUncertainty = true)
 subtract the contents of another counter from this one optionally including scale uncertainty and a possible correlation between the two counters.
 "scale" is treated as being uncorrelated to "counter" and the TQCounter this method is called on.
void subtract(const TQCounter* counter, TQCounter* scale, double correlation = 0., bool includeScaleUncertainty = false)
 subtract the contents of another counter from this one optionally including scale uncertainty and a possible correlation between the two counters.
 "scale" is treated as being uncorrelated to "counter" and the TQCounter this method is called on.
void multiply(double factor, double uncertainty = 0., double correlation = 0., bool includeScaleUncertainty = true)
 multiply the contents of this counter with the contents of another one including correlation for the error propagation if given.
void multiply(const TQCounter* counter, double correlation = 0., bool includeScaleUncertainty = false)
 multiply the contents of this counter with the contents of another one including correlation for the error propagation if given.
void divide(double denominator, double uncertainty = 0., double correlation = 0., bool includeScaleUncertainty = true)
 divide the contents of this counter by the contents of another one
void divide(const TQCounter* counter, double correlation = 0, bool includeScaleUncertainty = false)
 divide the contents of this counter by the contents of another one
void scale(double factor, double scaleUncertainty = 0., bool includeScaleUncertainty = true)
 scale this counter with some factor
void scale(const TQCounter* scale, bool includeScaleUncertainty = true)
 scale this counter with some factor
TString getComparison(TQCounter* cnt1, TQCounter* cnt2, bool colored = false, double order = 9.9999999999999995E-8)
 compare to counters, retrieving an info string as result
 the comparison string to return
bool isEqualTo(TQCounter* counter, double order = 9.9999999999999995E-8)
 check if two counters are equal (up to some precision)
bool isRawEqualTo(TQCounter* counter)
 check if the raw counts of two counters are the same
~TQCounter()
 default destructor
TQCounter()