#ifndef AGDBMANAGERHH #define AGDBMANAGERHH #include #include "ExpatInterface/Document.h" #include "ExpatInterface/Element.h" #include "agdbBase.hh" #include "agdbSection.hh" #include "agdbCompos.hh" #include "agdbPosXYZ.hh" #include "agdbMPosPhi.hh" #include "agdbSolid.hh" namespace agdb { class Manager { private: xml::Document _doc; // vector _baseVec; public: Manager() : _doc() { _doc.setTagName("AGDD"); }; Manager & insertSection(Section & section) { section.putMeIn(_doc); return *this; }; Manager & sendDocumentTo(ostream & os) { _doc.Element::print(os, ""); return *this; }; /* void test() { cout << "This is tester in agdb manager." << endl; Material mat; cout << "dfd1" << endl; mat.setName("fromage"); Solid vol; cout << "dfd2" << endl; vol.setName("toast"); cout << "dfd3" << endl; vol.setBox(3,4,5); cout << "dfd4" << endl; vol.setBox(1,2,3); vol.setMaterial(mat); cout << "dfd5" << endl; Section sec; cout << "dfd6" << endl; sec.addVolume(vol); cout << "dfd7" << endl; MPosPhi mPosPhi; mPosPhi.setPositionable(vol); mPosPhi.setN(45); cout << "dfd8" << endl; Compos com2; cout << "dfd9" << endl; com2.addPos(mPosPhi); cout << "dfd1" << endl; com2.setName("extracom"); PosXYZ extrapos; extrapos.setPositionable(com2); Compos com; com.addPos(extrapos); cout << "dfd2" << endl; com.setName("cooey"); cout << "dfd3" << endl; sec.addCompos(com); sec.addCompos(com2); cout << "dfd4" << endl; PosXYZ pos; cout << "dfd5" << endl; pos.setPositionable(vol); cout << "dfd6" << endl; pos.setXYZ(99, 98, 97); cout << "dfd7" << endl; com.addPos(pos); com.addPos(pos); cout << "dfd7.5" << endl; sec.putMeIn(_doc); cout << "dfd8" << endl; _doc.Element::print(cout, ""); cout << "dfd9" << endl; }; */ }; } // end of namespace #endif