void run_hits(Int_t nSlices=15) { TString inFile = "data/raw.root"; TString parFile = "data/par.root"; TString outFile = "data/hits.root"; gDebug = 0; TStopwatch timer; timer.Start(); gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); gROOT->LoadMacro("$VMCWORKDIR/macro/much/muchlibs.C"); muchlibs(); // ----- Reconstruction run ------------------------------------------- CbmRunAna *run = new CbmRunAna(); run->SetInputFile(inFile); run->SetOutputFile(outFile); // ------------------------------------------------------------------------ CbmMuchFindHitsGem* findHits = new CbmMuchFindHitsGem("/home/ekryshen/cbm/cbmroot/trunk/parameters/much/much_v12c.digi.root"); findHits->SetAlgorithm(3); findHits->SetDaq(1); run->AddTask(findHits); // ----- Parameter database -------------------------------------------- FairRuntimeDb* rtdb = run->GetRuntimeDb(); FairParRootFileIo* parIo1 = new FairParRootFileIo(); parIo1->open(parFile.Data()); rtdb->setFirstInput(parIo1); rtdb->setOutput(parIo1); rtdb->saveOutput(); // ------------------------------------------------------------------------ // ----- Intialise and run -------------------------------------------- run->Init(); cout << "Starting run" << endl; run->Run(0, nSlices); // ------------------------------------------------------------------------ // ----- Finish ------------------------------------------------------- timer.Stop(); Double_t rtime = timer.RealTime(); Double_t ctime = timer.CpuTime(); cout << endl << endl; cout << "Macro finished succesfully." << endl; cout << "Output file is " << outFile << endl; cout << "Parameter file is " << parFile << endl; cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl; cout << endl; // ------------------------------------------------------------------------ // delete run; cout << " Test passed" << endl; cout << " All ok " << endl; }