void check_sts_digis( UInt_t uRunId, UInt_t uTsJump, Double_t dFirstTsOffset, Double_t dDigiDistPlotStartTime = 0.0, Int_t nrEvents = 0, TString sDir="data" ) { if( uRunId < 353 ) return kFALSE; // --- Specify number of events to be produced. // --- -1 means run until the end of the input file. Int_t nEvents=1e9; // --- Specify output file name (this is just an example) TString runId = TString::Format("%03u", uRunId); TString fileName = sDir + "/unp_mcbm_" + runId + ".root"; // ======================================================================== // Adjust this part according to your requirements // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug) Int_t iVerbose = 1; // MC file TString srcDir = gSystem->Getenv("VMCWORKDIR"); // ----- Timer -------------------------------------------------------- TStopwatch timer; timer.Start(); // ------------------------------------------------------------------------ // ----- Analysis run -------------------------------------------------- FairRunOnline *fRun= new FairRunOnline(); fRun->ActivateHttpServer( 100, 8080 ); // refresh each 100 events FairFileSource* inputSource = new FairFileSource(fileName); fRun->SetSource(inputSource); // Define output file for FairMonitor histograms // TString monitorFile{outFile}; // monitorFile.ReplaceAll("qa","qa.monitor"); FairMonitor::GetMonitor()->EnableMonitor(kTRUE); // ------------------------------------------------------------------------ CbmMcbm2019CheckDigisSts* stsChecker = new CbmMcbm2019CheckDigisSts(); stsChecker->SetTimeWindow( uTsJump, dFirstTsOffset, 2, 3, 10240000 ); stsChecker->SetDigiDistPlotStartTime( dDigiDistPlotStartTime ); /// Disable as no pulser for now in STS stsChecker->SetStsPulseradcLimits( 31, 0 ); if( 0 < uRunId ) stsChecker->SetOutFilename( Form( "data/HistosStsCheck_%03u.root", uRunId ) ); fRun->AddTask( stsChecker ); // ----- Parameter database -------------------------------------------- // FairRuntimeDb* rtdb = fRun->GetRuntimeDb(); // FairParRootFileIo* parIo1 = new FairParRootFileIo(); // parIo1->open(parFile.Data(),"UPDATE"); // rtdb->setFirstInput(parIo1); // ------------------------------------------------------------------------ // ----- Intialise and run -------------------------------------------- fRun->Init(); // rtdb->setOutput(parIo1); // rtdb->saveOutput(); // rtdb->print(); cout << "Starting run" << endl; if ( 0 == nrEvents) { fRun->Run( 0, nEvents); // run until end of input file } else { fRun->Run(0, nrEvents); // process N Events } // ------------------------------------------------------------------------ // ----- Finish ------------------------------------------------------- timer.Stop(); Double_t rtime = timer.RealTime(); Double_t ctime = timer.CpuTime(); cout << endl << endl; cout << "Macro finished succesfully." << endl; cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl; cout << endl; // ------------------------------------------------------------------------ // Extract the maximal used memory an add is as Dart measurement // This line is filtered by CTest and the value send to CDash FairSystemInfo sysInfo; Float_t maxMemory=sysInfo.GetMaxMemory(); cout << ""; cout << maxMemory; cout << "" << endl; Float_t cpuUsage=ctime/rtime; cout << ""; cout << cpuUsage; cout << "" << endl; FairMonitor* tempMon = FairMonitor::GetMonitor(); tempMon->Print(); cout << " Test passed" << endl; cout << " All ok " << endl; }