43using std::cout, std::vector, std::map, std::setw;
51 ofstream
dtdFile(
"tunfoldbinning.dtd");
56 if(error) cout<<
"error="<<error<<
" from TDOMParser\n";
61 cout<<
"error: can not read binning (document empty?)\n";
63 cout<<
"Binning scheme:\n =================================\n";
83 binning->
ExportXML(
"testUnfold6.out.xml");
93 cout<<
"\n"<<
where<<
"\n=======================\n";
95 for(
int i=0;i<binning->
GetEndBin()+1;i++) {
100 for(
int i=0;i<binning->
GetEndBin()+1;i++) {
105 for(
int i=0;i<binning->
GetEndBin()+1;i++) {
112 cout<<
"\ndest |contributing bins\n"
113 <<
"=====+======================================\n";
116 for(
size_t j=0;
j<(*i).second.size();
j++) {
117 cout<<setw(4)<<(*i).first<<
" |";
118 cout<<setw(3)<<binning->
GetBinName((*i).second[
j])<<
"\n";
120 cout<<
"=====+======================================\n";
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN TSystem * gSystem
const_iterator begin() const
const_iterator end() const
virtual TXMLDocument * GetXMLDocument() const
Returns the TXMLDocument.
Int_t ParseFile(const char *filename) override
Parse the XML file where filename is the XML file name.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
virtual TString GetDirName(const char *pathname)
Return the directory name in pathname.
XML interfate to binning schemes, for use with the unfolding algorithm TUnfoldDensity.
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 TUnfoldBinningXML * ImportXML(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
Binning schemes for use with the unfolding algorithm TUnfoldDensity.
void PrintStream(std::ostream &out, Int_t indent=0, int debug=0) const
print some information about this binning tree
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,...
TString GetBinName(Int_t iBin) const
get the name of a bin
Int_t GetEndBin(void) const
last+1 bin of this node (includes children)
Int_t * CreateEmptyBinMap(void) const
create an empty bin map, useful together with the getter methods of class TUnfold and TUnfoldSys
TUnfoldBinning const * FindNode(char const *name) const
traverse the tree and return the first node which matches the given name
TXMLDocument contains a pointer to an xmlDoc structure, after the parser returns a tree built during ...