FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
eventDisplay.C
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 void eventDisplay(TString mcEngine = "TGeant3")
9 {
10 
11  TString inFile = "data/test_" + mcEngine + ".mc.root";
12  TString parFile = "data/params_" + mcEngine + ".root";
13  TString outFile = "data/test_" + mcEngine + ".root";
14 
15  // ----- Reconstruction run -------------------------------------------
16  FairRunAna *fRun = new FairRunAna();
17  FairFileSource *fFileSource = new FairFileSource(inFile);
18  fRun->SetSource(fFileSource);
19 
20  fRun->SetSink(new FairRootFileSink(outFile));
21 
22  // ----- Parameter database --------------------------------------------
23  FairRuntimeDb *rtdb = fRun->GetRuntimeDb();
24 
25  FairParRootFileIo *parIo1 = new FairParRootFileIo();
26  parIo1->open(parFile);
27  rtdb->setFirstInput(parIo1);
28  // ------------------------------------------------------------------------
29 
30  FairEventManager *fMan = new FairEventManager();
31  FairMCTracksDraw *Track = new FairMCTracksDraw();
32  FairMCPointDraw *RutherfordPoints = new FairMCPointDraw("FairRutherfordPoint", kBlue, kFullSquare);
33 
34  fMan->AddTask(Track);
35  fMan->AddTask(RutherfordPoints);
36 
37  fMan->Init();
38 }
list of container factories
Definition: FairRuntimeDb.h:24
void SetSink(FairSink *tempSink)
Definition: FairRun.h:84
void eventDisplay()
Definition: eventDisplay.C:18
virtual void Init(Int_t visopt=1, Int_t vislvl=3, Int_t maxvisnds=10000)
FairRuntimeDb * GetRuntimeDb(void)
Definition: FairRun.h:80
Bool_t open(const Text_t *fname, Option_t *option="READ", const Text_t *ftitle="", Int_t compress=1)
virtual void SetSource(FairSource *tempSource)
Definition: FairRunAna.h:70
void AddTask(FairTask *t)
Bool_t setFirstInput(FairParIo *)