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 = "pixel_" + mcEngine + ".mc.root";
12  TString ParFile = "pixel_" + mcEngine + ".params.root";
13  TString OutFile = "tst.root";
14  //------------------------------------------------------------------
15 
16  // ----- Reconstruction run -------------------------------------------
17  FairRunAna *fRun = new FairRunAna();
18  FairRunAna *fRun = new FairRunAna();
19  FairFileSource *fFileSource = new FairFileSource(InputFile);
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  FairMCPointDraw *TutorialDetectorPoints = new FairMCPointDraw("FairTutorialtDetPoint", kRed, kFullSquare);
32 
33  fMan->AddTask(Track);
34  fMan->AddTask(TutorialDetectorPoints);
35 
36  fMan->Init();
37 }
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)
void AddTask(FairTask *t)
Bool_t setFirstInput(FairParIo *)