00001 // Author: Stefan Schmitt 00002 // DESY, 10/08/11 00003 00004 // Version 17.5, in parallel to changes in TUnfold 00005 // 00006 // History: 00007 // Version 17.4, in parallel to changes in TUnfoldBinning 00008 // Version 17.3, support for repeated bins with the same width 00009 // Version 17.2, XML interface for class TUnfoldBinning 00010 00011 #ifndef ROOT_TUnfoldBinningXML 00012 #define ROOT_TUnfoldBinningXML 00013 00014 00015 ////////////////////////////////////////////////////////////////////////// 00016 // // 00017 // // 00018 // TUnfoldBinningXML, an auxillary class to read and write // 00019 // complex binning schemes in XML // 00020 // // 00021 // Citation: S.Schmitt, JINST 7 (2012) T10003 [arXiv:1205.6201] // 00022 // // 00023 ////////////////////////////////////////////////////////////////////////// 00024 00025 /* 00026 This file is part of TUnfold. 00027 00028 TUnfold is free software: you can redistribute it and/or modify 00029 it under the terms of the GNU General Public License as published by 00030 the Free Software Foundation, either version 3 of the License, or 00031 (at your option) any later version. 00032 00033 TUnfold is distributed in the hope that it will be useful, 00034 but WITHOUT ANY WARRANTY; without even the implied warranty of 00035 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00036 GNU General Public License for more details. 00037 00038 You should have received a copy of the GNU General Public License 00039 along with TUnfold. If not, see <http://www.gnu.org/licenses/>. 00040 */ 00041 00042 #include "TUnfoldBinning.h" 00043 #include <iostream> 00044 #include <TNamed.h> 00045 #include <TObjArray.h> 00046 #include <TObjString.h> 00047 #include <TXMLNode.h> 00048 #include <TXMLDocument.h> 00049 #include <iostream> 00050 00051 class TXMLNode; 00052 class TXMLDocument; 00053 00054 #define TUnfoldBinningXML TUnfoldBinningXMLV17 00055 00056 class TUnfoldBinningXMLV17 : public TUnfoldBinningV17 { 00057 public: 00058 /********************** XML interface to read binning schemes *************/ 00059 static TUnfoldBinningXMLV17 *ImportXML(const TXMLDocument *document,const char *name); // import binning scheme 00060 static Int_t ExportXML(const TUnfoldBinningV17 &binning,std::ostream &out,Bool_t writeHeader,Bool_t writeFooter,Int_t indent=0); // append binning scheme to file 00061 Int_t ExportXML(const char *fileName) const; // export this binning scheme 00062 static void WriteDTD(const char *fileName="tunfoldbinning.dtd"); // write DTD file 00063 static void WriteDTD(std::ostream &out); // write DTD to stream 00064 00065 /// construct a new binning scheme, for use with the root streamer 00066 TUnfoldBinningXMLV17 (const char *name=0,Int_t nBins=0,const char *binNames=0) 00067 : TUnfoldBinningV17 (name,nBins,binNames) { } 00068 protected: 00069 static TUnfoldBinningXMLV17 *ImportXMLNode(TXMLNode *node); // import the given node as binning scheme 00070 void AddAxisXML(TXMLNode *node); // import axis information 00071 protected: 00072 00073 ClassDef(TUnfoldBinningXMLV17, TUnfold_CLASS_VERSION) //Complex binning schemes for TUnfoldDensity 00074 }; 00075 00076 #endif