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 = "data/testrun_" + mcEngine + ".root";
12  TString ParFile = "data/testparams_" + mcEngine + ".root";
13  TString OutFile = "data/tst.root";
14  //------------------------------------------------------------------
15 
16  // ----- Reconstruction run -------------------------------------------
17  FairRunAna *fRun = new FairRunAna();
18  FairFileSource *fFileSource = new FairFileSource(InputFile);
19  fRun->SetSource(fFileSource);
20 
21  fRun->SetSink(new FairRootFileSink(OutFile.Data()));
22 
23  FairRuntimeDb *rtdb = fRun->GetRuntimeDb();
24  FairParRootFileIo *parInput1 = new FairParRootFileIo();
25  parInput1->open(ParFile.Data());
26  rtdb->setFirstInput(parInput1);
27 
28  FairEventManager *fMan = new FairEventManager();
29 
30  //----------------------Traks and points -------------------------------------
31  FairMCTracksDraw *Track = new FairMCTracksDraw();
32  FairMCPointDraw *TorinoDetectorPoints = new FairMCPointDraw("FairTestDetectorPoint", kRed, kFullSquare);
33  // FairHitDraw *ToyHits = new FairHitDraw("ToyHit");
34 
35  fMan->AddTask(Track);
36  fMan->AddTask(TorinoDetectorPoints);
37  // fMan->AddTask(ToyHits);
38 
39  fMan->Init();
40 }
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 *)