1 #ifndef __RootFileExplorer_H__
2 #define __RootFileExplorer_H__
20 #include <TBufferFile.h>
21 #include <TBufferJSON.h>
26 #include "otsdaq/MessageFacility/MessageFacility.h"
30 #include <xercesc/dom/DOM.hpp>
31 #include <xercesc/framework/LocalFileFormatTarget.hpp>
32 #include <xercesc/framework/StdOutFormatTarget.hpp>
33 #include <xercesc/util/OutOfMemoryException.hpp>
34 #include <xercesc/util/PlatformUtils.hpp>
35 #include <xercesc/util/XMLString.hpp>
37 #include <xercesc/dom/DOM.hpp>
38 #include <xercesc/dom/DOMDocument.hpp>
39 #include <xercesc/dom/DOMDocumentType.hpp>
40 #include <xercesc/dom/DOMElement.hpp>
41 #include <xercesc/dom/DOMImplementation.hpp>
42 #include <xercesc/dom/DOMImplementationLS.hpp>
43 #include <xercesc/dom/DOMImplementationRegistry.hpp>
44 #include <xercesc/dom/DOMNodeIterator.hpp>
45 #include <xercesc/dom/DOMNodeList.hpp>
46 #include <xercesc/dom/DOMText.hpp>
47 #include <xercesc/framework/LocalFileFormatTarget.hpp>
48 #include <xercesc/parsers/XercesDOMParser.hpp>
49 #include <xercesc/util/OutOfMemoryException.hpp>
50 #include <xercesc/util/PlatformUtils.hpp>
51 #include <xercesc/util/XMLString.hpp>
52 #include <xercesc/util/XMLUni.hpp>
53 #include <xercesc/util/XercesDefs.hpp>
54 #include <xercesc/validators/common/Grammar.hpp>
58 #include "otsdaq/Macros/BinaryStringMacros.h"
61 #if defined(XERCES_NEW_IOSTREAMS)
67 #include <TDirectory.h>
74 XERCES_CPP_NAMESPACE_USE
85 string fRFoldersPath ,
87 TFile * rootFile = NULL ) ;
89 xercesc::DOMDocument * initialize (
bool liveDQMFlag ) ;
90 void makeDirectoryBinaryTree (TDirectory * currentDirectory,
92 xercesc::DOMElement * anchorNode ) ;
93 void makeLiveDQMBinaryTree (TDirectory * currentDirectory,
95 std::string subDirName ,
96 xercesc::DOMElement * anchorNode ) ;
97 xercesc::DOMElement * populateBinaryTreeNode (xercesc::DOMElement * anchorNode ,
101 void initializeXMLWriter (
void ) ;
105 std::string blanks (
int level ) ;
106 void computeRFoldersPath (
void ) ;
107 std::string computeHierarchyPaths (
void ) ;
108 void dumpHierarchyPaths (std::string what ) ;
109 void shrinkHierarchyPaths (
int number ) ;
113 string fSystemPath_ ;
115 string fFoldersPath_ ;
117 string fRFoldersPath_ ;
120 string rootDirectoryName_;
122 xercesc::DOMImplementation * theImplementation_;
123 xercesc::DOMDocument * theDocument_ ;
124 xercesc::DOMElement * rootElement_ ;
125 xercesc::DOMElement * anchorNodeLast_ ;
126 std::map<std::string, xercesc::DOMElement *> theNodes_ ;
127 std::map<std::string, xercesc::DOMElement *> theNodesB_ ;
128 std::map<std::string, std::string> theNodeName_ ;
129 std::map<std::string, std::string> theNodeNameB_ ;
130 std::vector<std::string> hierarchyPaths_ ;
131 std::string previousAncestor_ ;
132 std::map<bool,std::string> isALeaf_ ;
133 const std::string rootTagName_ ;
138 xercesc::DOMLSSerializer * theSerializer_ ;
139 xercesc::XMLFormatTarget * myFormTarget_ ;
140 xercesc::DOMLSOutput * theOutput_ ;