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  //-----User Settings:-----------------------------------------------
11  TString InputFile = "testrun_" + mcEngine + ".root";
12  TString ParFile = "testparams_" + mcEngine + ".root";
13  TString OutFile = "tst.root";
14  //------------------------------------------------------------------
15 
16  // ----- Reconstruction run -------------------------------------------
17  FairRunAna *fRun = new FairRunAna();
18  FairFileSource *fFileSource = new FairFileSource(InputFile);
19  fRun->SetSource(fFileSource);
20  fRun->SetSink(new FairRootFileSink(OutFile.Data()));
21 
22  FairRuntimeDb *rtdb = fRun->GetRuntimeDb();
23  FairParRootFileIo *parInput1 = new FairParRootFileIo();
24  parInput1->open(ParFile.Data());
25  rtdb->setFirstInput(parInput1);
26 
27  FairEventManager *fMan = new FairEventManager();
28 
29  //----------------------Traks and points -------------------------------------
30  FairMCTracksDraw *Track = new FairMCTracksDraw();
31  FairTutorialDet4PointDraw *TutorialDetectorPoints =
32  new FairTutorialDet4PointDraw("TutorialDetPoint", kRed, kFullSquare);
33 
34  fMan->AddTask(Track);
35  fMan->AddTask(TutorialDetectorPoints);
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 *)