{ // 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 HStsDetector* fwdet = new HStsDetector; Int_t stsMods[STS_MAX_LAYERS][STS_MAX_MODULES] = { {1,1}, {1,1}, {1,1}, {1,1} }; spec->addDetector(fwdet); for (int i = 0; i < STS_MAX_LAYERS; ++i) spec->getDetector("Sts")->setModules(i,stsMods[i]); // define the input HParOra2Io* ora = new HParOra2Io; //ora->open(); ora->open("db-hades-test","fwdet_ana2"); //ora->open("cbmdbp-new","fwdet_ana2"); ora->setHistoryDate("now"); rtdb->setFirstInput(ora); // define the output // HParRootFileIo* output = new HParRootFileIo; // output->open("Rich700Params.root","RECREATE"); // rtdb->setOutput(output); HParAsciiFileIo* output = new HParAsciiFileIo; output->open("sts_trb3lookup.txt","out"); rtdb->setOutput(output); // create the parameter containers HParSet* mypar=rtdb->getContainer("StsTrb3Lookup"); // HParSet* mypar2=rtdb->getContainer("Rich700ThresholdPar"); // initialize the parameter containers //rtdb->initContainers(135009684); //be1211214012401.hld //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 rich700 threshold parameter:" << std::endl; // mypar2->Print(); // } // delete the Hades object delete myHades; }