{ // create a Hades object and get the // pointers to the runtime database and // the spectrometer Hades* myHades = new Hades; HSpectrometer* spec = gHades->getSetup(); HRuntimeDb* rtdb = gHades->getRuntimeDb(); // create the detector and its setup // and add it in the spectrometer HFRpcDetector* frpcdet = new HFRpcDetector; Int_t frpcMods[FRPC_MAX_SECTORS][FRPC_MAX_MODULES] = { {1}, {1}, {1}, {1} }; frpcdet->setModules(-1,frpcMods[0]); spec->addDetector(frpcdet); for (int i = 0; i < FRPC_MAX_SECTORS; ++i) spec->getDetector("FRpc")->setModules(i,frpcMods[i]); // define the input HParOra2Io* ora = new HParOra2Io; //ora->open(); ora->open("db-hades-test","fwdet_ana2"); ora->setHistoryDate("now"); rtdb->setFirstInput(ora); // define the output HParRootFileIo* output = new HParRootFileIo; output->open("FRpcParamsTest.root","RECREATE"); rtdb->setOutput(output); // create the parameter containers HParSet* mypar=rtdb->getContainer("FRpcTrb3Lookup"); HParSet* mypar2=rtdb->getContainer("FRpcGeomPar"); mypar2->setParamContext("FRpcGeomProduction"); //rtdb->initContainers(82841411); // listed in test db (sep10test) rtdb->initContainers(1); // the latest default? // save the output // (writes the data to the file) rtdb->saveOutput(); // print content of the runtime // database on the screen rtdb->print(); if(mypar) { std::cout <<"found trb3lookup parameter:" << std::endl; mypar->Print(); } if(mypar2) { std::cout <<"found geometry parameter:" << std::endl; mypar2->Print(); } // delete the Hades object delete myHades; }