FairRoot/PandaRoot
run_cudaExampleTask.C
Go to the documentation of this file.
2  // ========================================================================
3  // Simple sample task to run over some sim files
4  // Adding of task happens in line 26
5  // ========================================================================
6 
7  TString MCFile = "sim_toy.root";
8  TString parFile = "sim_toy_params.root" ;
9  Int_t nEvents =0;
10 
11  TString outFile = "output.root";
12 
13  std::cout << "MCFile : " << MCFile.Data()<< std::endl;
14 
15  // ----- Timer --------------------------------------------------------
16  TStopwatch timer;
17  timer.Start();
18 
19  // ----- Reconstruction -----------------------------------------------
20  FairRunAna *fRun= new FairRunAna();
21 
22  fRun->SetInputFile(MCFile);
23 
24  fRun->SetOutputFile(outFile);
25 
26  // ----- Add Cuda Example Task ----------------------------------------
27  PndCudaExampleTask * cudaDummy = new PndCudaExampleTask();
28  fRun->AddTask(cudaDummy);
29 
30  fRun->Init();
31  fRun->Run(0,nEvents);
32 
33  // ----- Finish -------------------------------------------------------
34  timer.Stop();
35  Double_t rtime = timer.RealTime();
36  Double_t ctime = timer.CpuTime();
37  cout << endl << endl;
38  cout << "Macro finished succesfully." << endl;
39  cout << "Output file is " << outFile << endl;
40  cout << "Parameter file is " << parFile << endl;
41  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
42  cout << endl;
43  // ------------------------------------------------------------------------
44 }
TString outFile
Definition: hit_dirc.C:17
FairRunAna * fRun
Definition: hit_dirc.C:58
Double_t
TString parFile
Definition: hit_dirc.C:14
Int_t nEvents
Definition: hit_dirc.C:11
TStopwatch timer
Definition: hit_dirc.C:51
Double_t ctime
Definition: hit_dirc.C:114
void run_cudaExampleTask()
TString MCFile
Double_t rtime
Definition: hit_dirc.C:113