Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TUnfoldBinningXML Class Reference

XML interfate to binning schemes, for use with the unfolding algorithm TUnfoldDensity.

Binning schemes are used to map analysis bins on a single histogram axis and back. The analysis bins may include unconnected bins (e.g nuisances for background normalisation) or various multidimensional histograms (signal bins, differential background normalisation bins, etc).
If you use this software, please consider the following citation
S.Schmitt, JINST 7 (2012) T10003 [arXiv:1205.6201]
Detailed documentation and updates are available on http://www.desy.de/~sschmitt

Please consult the documentation of the class TUnfoldBinning about how to use binning schemes. This class provides methods to read and write binning schemes in the XML language. There is also a method which writes out a dtd file for validation.

Example XML code

The example below encodes two binning schemes, detector and generator. The detecor scheme consists of a single, three-dimensional distribution (pt,eta,discriminator). The generator scheme consists of two two-dimensional distributions, signal and background.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE TUnfoldBinning SYSTEM "tunfoldbinning.dtd">
<TUnfoldBinning>
<BinningNode name="detector" firstbin="1" factor="1">
 <BinningNode name="detectordistribution" firstbin="1" factor="1">
  
   <Bin repeat="3" width="0.5" >
   <Bin repeat="3" width="1" >
   <Bin width="2" >
   <Bin width="3" >
   <Bin location="overflow">
   
    <Bin repeat="2" width="0.5" >
    <Bin width="1" >
    <Bin repeat="4" width="0.5" >
    <Bin width="1" >
    <Bin repeat="2" width="0.5" >
    
     <Bin width="0.15" >
     <Bin repeat="2" width="0.35" >
     <Bin width="0.15" >
    </Axis>
   </Axis>
  </Axis>
 </BinningNode>
</BinningNode>
<BinningNode name="generator" firstbin="1" factor="1">
 <BinningNode name="signal" firstbin="1" factor="1">
  
   <Bin location="underflow" >
   <Bin width="1" >
   <Bin width="2" >
   <Bin width="3" >
   <Bin location="overflow" >
   
    <Bin location="underflow" >
    <Bin width="1.5" >
    <Bin width="1" >
    <Bin width="1.5" >
    <Bin location="overflow" >
   </Axis>
  </Axis>
 </BinningNode>
 <BinningNode name="background" firstbin="26" factor="1">
  
   <Bin repeat="3" width="0.5" >
   <Bin repeat="3" width="1" >
   <Bin width="2" >
   <Bin width="3" >
   <Bin location="overflow" >
   
    <Bin repeat="2" width="0.5" >
    <Bin width="1" >
    <Bin repeat="4" width="0.5" >
    <Bin width="1" >
    <Bin repeat="2" width="0.5" >
   </Axis>
  </Axis>
 </BinningNode>
</BinningNode>
</TUnfoldBinning>

Definition at line 59 of file TUnfoldBinningXML.h.

Public Member Functions

 TUnfoldBinningXML (const char *name=nullptr, Int_t nBins=0, const char *binNames=nullptr)
 construct a new binning scheme, for use with the root streamer
 
Int_t ExportXML (const char *fileName) const
 export this binning scheme to a file
 
TClassIsA () const override
 
void Streamer (TBuffer &) override
 Stream an object of class TObject.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TUnfoldBinning
 TUnfoldBinning (const char *name=nullptr, Int_t nBins=0, const char *binNames=nullptr)
 create a new node without axis
 
 TUnfoldBinning (const TAxis &axis, Int_t includeUnderflow, Int_t includeOverflow)
 create a new node containing a distribution with one axis
 
 ~TUnfoldBinning (void) override
 
Bool_t AddAxis (const char *name, Int_t nBins, const Double_t *binBorders, Bool_t hasUnderflow, Bool_t hasOverflow)
 add an axis with the specified bin borders
 
Bool_t AddAxis (const char *name, Int_t nBins, Double_t xMin, Double_t xMax, Bool_t hasUnderflow, Bool_t hasOverflow)
 add an axis with equidistant bins
 
Bool_t AddAxis (const TAxis &axis, Bool_t includeUnderflow, Bool_t includeOverflow)
 add an axis to the distribution, using the TAxis as blueprint
 
TUnfoldBinningAddBinning (const char *name, Int_t nBins=0, const char *binNames=nullptr)
 add a new binning node as last last child of this node
 
TUnfoldBinningAddBinning (TUnfoldBinning *binning)
 add a TUnfoldBinning as the last child of this node
 
Int_tCreateEmptyBinMap (void) const
 create an empty bin map, useful together with the getter methods of class TUnfold and TUnfoldSys
 
TH2DCreateErrorMatrixHistogram (const char *histogramName, Bool_t originalAxisBinning, Int_t **binMap=nullptr, const char *histogramTitle=nullptr, const char *axisSteering=nullptr) const
 create a TH2D histogram capable to hold a covariance matrix
 
TH1CreateHistogram (const char *histogramName, Bool_t originalAxisBinning=kFALSE, Int_t **binMap=nullptr, const char *histogramTitle=nullptr, const char *axisSteering=nullptr) const
 create a THxx histogram capable to hold the bins of this binning node and its children
 
void DecodeAxisSteering (const char *axisSteering, const char *options, Int_t *isOptionGiven) const
 decode axis steering
 
TH1ExtractHistogram (const char *histogramName, const TH1 *globalBins, const TH2 *globalBinsEmatrix=nullptr, Bool_t originalAxisBinning=kTRUE, const char *axisSteering=nullptr) const
 
Int_t FillBinMap1D (Int_t *binMap, const char *axisSteering, Int_t firstBinX) const
 map all global bins referenced by this node to the one-dimensional histogram destHist, starting with bin firstBinX
 
TUnfoldBinning const * FindNode (char const *name) const
 traverse the tree and return the first node which matches the given name
 
virtual Double_t GetBinFactor (Int_t iBin) const
 return scaling factor for the given global bin number
 
TString GetBinName (Int_t iBin) const
 get the name of a bin
 
Int_t GetBinNeighbours (Int_t globalBin, Int_t axis, Int_t *prev, Double_t *distPrev, Int_t *next, Double_t *distNext, Bool_t isPeriodic=kFALSE) const
 get neighbour bins along the specified axis
 
Double_t GetBinSize (Int_t iBin) const
 get N-dimensional bin size
 
void GetBinUnderflowOverflowStatus (Int_t iBin, Int_t *uStatus, Int_t *oStatus) const
 return bit maps indicating underflow and overflow status
 
TUnfoldBinningGetChildNode (void)
 
TUnfoldBinning const * GetChildNode (void) const
 first daughter node
 
virtual Double_t GetDistributionAverageBinSize (Int_t axis, Bool_t includeUnderflow, Bool_t includeOverflow) const
 get average bin size on the specified axis
 
TString GetDistributionAxisLabel (Int_t axis) const
 get name of an axis
 
virtual Double_t GetDistributionBinCenter (Int_t axis, Int_t bin) const
 return bin center for a given axis and bin number
 
TVectorD const * GetDistributionBinning (Int_t axis) const
 get vector of bin borders for one axis
 
Int_t GetDistributionDimension (void) const
 query dimension of this node's distribution
 
Int_t GetDistributionNumberOfBins (void) const
 number of bins in the distribution possibly including under/overflow
 
virtual Double_t GetDistributionOverflowBinWidth (Int_t axis) const
 return bin width assigned to the overflow bin
 
virtual Double_t GetDistributionUnderflowBinWidth (Int_t axis) const
 return bin width assigned to the underflow bin
 
Int_t GetEndBin (void) const
 last+1 bin of this node (includes children)
 
Int_t GetGlobalBinNumber (const Double_t *x, Int_t *isBelow=nullptr, Int_t *isAbove=nullptr) const
 locate a bin in an N-dimensional distribution
 
Int_t GetGlobalBinNumber (Double_t x) const
 locate a bin in a one-dimensional distribution
 
Int_t GetGlobalBinNumber (Double_t x, Double_t y) const
 locate a bin in a two-dimensional distribution
 
Int_t GetGlobalBinNumber (Double_t x, Double_t y, Double_t z) const
 locate a bin in a three-dimensional distribution
 
Int_t GetGlobalBinNumber (Double_t x0, Double_t x1, Double_t x2, Double_t x3) const
 locate a bin in a four-dimensional distribution
 
Int_t GetGlobalBinNumber (Double_t x0, Double_t x1, Double_t x2, Double_t x3, Double_t x4) const
 locate a bin in a five-dimensional distribution
 
Int_t GetGlobalBinNumber (Double_t x0, Double_t x1, Double_t x2, Double_t x3, Double_t x4, Double_t x5) const
 locate a bin in a six-dimensional distribution
 
Double_t GetGlobalFactor (void) const
 return global scaling factor for this node
 
TUnfoldBinningGetNextNode (void)
 
TUnfoldBinning const * GetNextNode (void) const
 next sister node
 
TUnfoldBinningGetParentNode (void)
 
TUnfoldBinning const * GetParentNode (void) const
 mother node
 
TUnfoldBinning const * GetPrevNode (void) const
 previous sister node
 
TUnfoldBinning const * GetRootNode (void) const
 return root node of the binnig scheme
 
Int_t GetStartBin (void) const
 first bin of this node
 
Int_t GetTH1xNumberOfBins (Bool_t originalAxisBinning=kTRUE, const char *axisSteering=nullptr) const
 return the number of histogram bins required when storing this binning in a one-dimensional histogram
 
const TObjStringGetUnconnectedBinName (Int_t bin) const
 return the bin names of unconnected bins
 
Bool_t HasOverflow (int axis) const
 check whether the axis has an overflow bin
 
Bool_t HasUnconnectedBins (void) const
 check whether there are bins but no axis
 
Bool_t HasUnderflow (int axis) const
 check whether an axis has an underflow bin
 
virtual Bool_t IsBinFactorGlobal (void) const
 check whether there is only a global scaling factor for this node
 
void PrintStream (std::ostream &out, Int_t indent=0, int debug=0) const
 print some information about this binning tree
 
void SetBinFactorFunction (Double_t normalisation, TF1 *userFunc=nullptr)
 set normalisation factor and function which are used in calls to GetBinFactor()
 
void SetBinMapEntry (Int_t *binMap, Int_t globalBin, Int_t destBin) const
 set one entry in a bin map
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TNamed
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TNamed &named)
 TNamed copy ctor.
 
 TNamed (const TString &name, const TString &title)
 
virtual ~TNamed ()
 TNamed destructor.
 
void Clear (Option_t *option="") override
 Set name and title to empty strings ("").
 
TObjectClone (const char *newname="") const override
 Make a clone of an object using the Streamer facility.
 
Int_t Compare (const TObject *obj) const override
 Compare two TNamed objects.
 
void Copy (TObject &named) const override
 Copy this to obj.
 
virtual void FillBuffer (char *&buffer)
 Encode TNamed into output buffer.
 
const char * GetName () const override
 Returns name of object.
 
const char * GetTitle () const override
 Returns title of object.
 
ULong_t Hash () const override
 Return hash value for this object.
 
Bool_t IsSortable () const override
 
void ls (Option_t *option="") const override
 List TNamed name and title.
 
TNamedoperator= (const TNamed &rhs)
 TNamed assignment operator.
 
void Print (Option_t *option="") const override
 Print TNamed name and title.
 
virtual void SetName (const char *name)
 Set the name of the TNamed.
 
virtual void SetNameTitle (const char *name, const char *title)
 Set all the TNamed parameters (name and title).
 
virtual void SetTitle (const char *title="")
 Set the title of the TNamed.
 
virtual Int_t Sizeof () const
 Return size of the TNamed part of the TObject.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor.
 
 TObject (const TObject &object)
 TObject copy ctor.
 
virtual ~TObject ()
 TObject destructor.
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action.
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
 
virtual void Delete (Option_t *option="")
 Delete this object.
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object.
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects.
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
 
virtual void Dump () const
 Dump contents of object on stdout.
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 Execute method on this object with the given parameter string, e.g.
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 Execute method on this object with parameters stored in the TObjArray.
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py).
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes.
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes.
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
 
virtual const char * GetIconName () const
 Returns mime type name of object.
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py).
 
virtual Option_tGetOption () const
 
virtual UInt_t GetUniqueID () const
 Return the unique object id.
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e.
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 IsDestructed.
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary).
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification (the base implementation is no-op).
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
 
void operator delete (void *ptr)
 Operator delete.
 
void operator delete (void *ptr, void *vp)
 Only called by placement new when throwing an exception.
 
void operator delete[] (void *ptr)
 Operator delete [].
 
void operator delete[] (void *ptr, void *vp)
 Only called by placement new[] when throwing an exception.
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *vp)
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator.
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself.
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list.
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename.
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out".
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object.
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked.
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Int_t ExportXML (const TUnfoldBinning &binning, std::ostream &out, Bool_t writeHeader, Bool_t writeFooter, Int_t indent=0)
 export a binning scheme to a stream in XML format
 
static TUnfoldBinningXMLImportXML (const TXMLDocument *document, const char *name)
 import a binning scheme from an XML file
 
static void WriteDTD (const char *fileName="tunfoldbinning.dtd")
 write dtd file
 
static void WriteDTD (std::ostream &out)
 
- Static Public Member Functions inherited from TUnfoldBinning
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static TH2DCreateHistogramOfMigrations (TUnfoldBinning const *xAxis, TUnfoldBinning const *yAxis, char const *histogramName, Bool_t originalXAxisBinning=kFALSE, Bool_t originalYAxisBinning=kFALSE, char const *histogramTitle=nullptr)
 create a TH2D histogram capable to hold the bins of the two input binning schemes on the x and y axes, respectively
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TNamed
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 Return destructor only flag.
 
static Bool_t GetObjectStat ()
 Get status of object stat flag.
 
static void SetDtorOnly (void *obj)
 Set destructor only flag.
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
 

Protected Member Functions

void AddAxisXML (TXMLNode *node)
 import axis from XML node
 
- Protected Member Functions inherited from TUnfoldBinning
TString BuildHistogramTitle (const char *histogramName, const char *histogramTitle, Int_t const *axisList) const
 construct a title
 
TString BuildHistogramTitle2D (const char *histogramName, const char *histogramTitle, Int_t xAxis, const TUnfoldBinning *yAxisBinning, Int_t yAxis) const
 construct a histogram title for a 2D histogram with different binning schemes on x and y axis
 
Int_tCreateBinMap (const TH1 *hist, Int_t nDim, const Int_t *axisList, const char *axisSteering) const
 create mapping from global bin number to a histogram for this node
 
Int_t FillBinMapRecursive (Int_t startBin, const char *axisSteering, Int_t *binMap) const
 recursively fill bin map
 
Int_t FillBinMapSingleNode (const TH1 *hist, Int_t startBin, Int_t nDim, const Int_t *axisList, const char *axisSteering, Int_t *binMap) const
 fill bin map for a single node
 
const TUnfoldBinningGetNonemptyNode (void) const
 find a node which has non-empty distributions if there is none or if there are many, return zero
 
const TUnfoldBinningGetNonemptyNode_r (int &count) const
 
TUnfoldBinningGetRootNode (void)
 return root node
 
Int_t GetTHxxBinning (Int_t maxDim, Int_t *axisBins, Int_t *axisList, const char *axisSteering) const
 calculate properties of a THxx histogram to store this binning
 
Int_t GetTHxxBinningSingleNode (Int_t maxDim, Int_t *axisBins, Int_t *axisList, const char *axisSteering) const
 get the properties of a histogram capable to hold the distribution attached to this node
 
Int_t GetTHxxBinsRecursive (const char *axisSteering) const
 calculate number of bins required to store this binning with teh given axisSteering
 
void Initialize (Int_t nBins)
 initialize variables for a given number of bins
 
void SetBinFactor (Double_t normalisation, TObject *factors)
 set normalisation factors which are used in calls to GetBinFactor()
 
TUnfoldBinning const * ToAxisBins (Int_t globalBin, Int_t *axisBins) const
 return distribution in which the bin is located and bin numbers on the corresponding axes
 
Int_t ToGlobalBin (Int_t const *axisBins, Int_t *isBelow=nullptr, Int_t *isAbove=nullptr) const
 get global bin number, given axis bin numbers
 
Int_t UpdateFirstLastBin (Bool_t startWithRootNode=kTRUE)
 update fFirstBin and fLastBin members of this node and its children
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected).
 
void MakeZombie ()
 

Static Protected Member Functions

static TUnfoldBinningXMLImportXMLNode (TXMLNode *node)
 recursively import one node from the XML tree
 

Additional Inherited Members

- Public Types inherited from TUnfoldBinning
enum  { MAXDIM =32 }
 
- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = (1ULL << ( 0 )) , kOverwrite = (1ULL << ( 1 )) , kWriteDelete = (1ULL << ( 2 )) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = (1ULL << ( 3 )) }
 
enum  EStatusBits {
  kCanDelete = (1ULL << ( 0 )) , kMustCleanup = (1ULL << ( 3 )) , kIsReferenced = (1ULL << ( 4 )) , kHasUUID = (1ULL << ( 5 )) ,
  kCannotPick = (1ULL << ( 6 )) , kNoContextMenu = (1ULL << ( 8 )) , kInvalidObject = (1ULL << ( 13 ))
}
 
- Protected Types inherited from TObject
enum  { kOnlyPrepStep = (1ULL << ( 3 )) }
 
- Protected Attributes inherited from TUnfoldBinning
TUnfoldBinningchildNode
 first daughter node
 
TObjArrayfAxisLabelList
 for each axis its name (TObjString), or names of unconnected bins
 
TObjArrayfAxisList
 for each axis the bin borders (TVectorD)
 
Double_t fBinFactorConstant
 common scale factor for all bins of this node
 
TObjectfBinFactorFunction
 function to calculate a scale factor from bin centres (may be a TF1 or a TVectorD
 
Int_t fDistributionSize
 number of bins in this node's distribution
 
Int_t fFirstBin
 global bin number of the first bin
 
Int_t fHasOverflow
 bit fields indicating whether there are overflow bins on the axes
 
Int_t fHasUnderflow
 bit fields indicating whether there are underflow bins on the axes
 
Int_t fLastBin
 global bin number of the last(+1) bin, including daughters
 
TUnfoldBinningnextNode
 next sister
 
TUnfoldBinningparentNode
 mother node
 
TUnfoldBinningprevNode
 previous sister
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 

#include <TUnfoldBinningXML.h>

Inheritance diagram for TUnfoldBinningXML:
[legend]

Constructor & Destructor Documentation

◆ TUnfoldBinningXML()

TUnfoldBinningXML::TUnfoldBinningXML ( const char *  name = nullptr,
Int_t  nBins = 0,
const char *  binNames = nullptr 
)
inline

construct a new binning scheme, for use with the root streamer

Definition at line 69 of file TUnfoldBinningXML.h.

Member Function Documentation

◆ AddAxisXML()

void TUnfoldBinningXML::AddAxisXML ( TXMLNode node)
protected

import axis from XML node

Parameters
[in]nodenode in the XML document tree

Definition at line 377 of file TUnfoldBinningXML.cxx.

◆ Class()

static TClass * TUnfoldBinningXML::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TUnfoldBinningXML::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TUnfoldBinningXML::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 76 of file TUnfoldBinningXML.h.

◆ DeclFileName()

static const char * TUnfoldBinningXML::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 76 of file TUnfoldBinningXML.h.

◆ ExportXML() [1/2]

Int_t TUnfoldBinningXML::ExportXML ( const char *  fileName) const

export this binning scheme to a file

Parameters
[in]fileNamename of the file

returns true if the writing succeeded

Definition at line 578 of file TUnfoldBinningXML.cxx.

◆ ExportXML() [2/2]

Int_t TUnfoldBinningXML::ExportXML ( const TUnfoldBinning binning,
std::ostream &  out,
Bool_t  writeHeader,
Bool_t  writeFooter,
Int_t  indent = 0 
)
static

export a binning scheme to a stream in XML format

Parameters
[in]binningthe binning scheme to export
[out]streamto write to
[in]writeHeaderset true when writing the first binning scheme to this stream
[in]writeFooterset true when writing the last binning scheme to this stream
[in]indentindentation of the XML output

returns true if the writing succeeded

Definition at line 479 of file TUnfoldBinningXML.cxx.

◆ ImportXML()

TUnfoldBinningXML * TUnfoldBinningXML::ImportXML ( const TXMLDocument document,
const char *  name 
)
static

import a binning scheme from an XML file

Parameters
[in]documentXMP document tree
[in]nameidentifier of the binning scheme

returns a new TUnfoldBinningXML, if name is found in document

Definition at line 184 of file TUnfoldBinningXML.cxx.

◆ ImportXMLNode()

TUnfoldBinningXML * TUnfoldBinningXML::ImportXMLNode ( TXMLNode node)
staticprotected

recursively import one node from the XML tree

Parameters
[in]nodenode in the XML document tree

returns a new TUnfoldBinningXML

Definition at line 228 of file TUnfoldBinningXML.cxx.

◆ IsA()

TClass * TUnfoldBinningXML::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TUnfoldBinning.

Definition at line 76 of file TUnfoldBinningXML.h.

◆ Streamer()

void TUnfoldBinningXML::Streamer ( TBuffer R__b)
overridevirtual

Stream an object of class TObject.

Reimplemented from TUnfoldBinning.

◆ StreamerNVirtual()

void TUnfoldBinningXML::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 76 of file TUnfoldBinningXML.h.

◆ WriteDTD() [1/2]

void TUnfoldBinningXML::WriteDTD ( const char *  file = "tunfoldbinning.dtd")
static

write dtd file

Parameters
[in]fileregular file for writing the dtd

Definition at line 172 of file TUnfoldBinningXML.cxx.

◆ WriteDTD() [2/2]

static void TUnfoldBinningXML::WriteDTD ( std::ostream &  out)
static
  • hist/unfold/inc/TUnfoldBinningXML.h
  • hist/unfold/src/TUnfoldBinningXML.cxx