Changing once more (hopefully we get it correct this time...) the logic to trig the...
[u/mrichter/AliRoot.git] / ITS / AliITSDigits2RecPoints.C
CommitLineData
02a71a71 1#if !defined(__CINT__) || defined(__MAKECINT__)
2
60b9526b 3#include <Riostream.h>
4#include <TClassTable.h>
5#include <TDatime.h>
6#include <TGeoManager.h>
7#include <TROOT.h>
8#include <TStopwatch.h>
d2e7afa1 9#include "AliRun.h"
10#include "AliRunDigitizer.h"
60b9526b 11#include "AliITSDetTypeRec.h"
d2e7afa1 12#include "AliITSDigitizer.h"
13#include "AliITS.h"
d2e7afa1 14#include "AliITSresponseSDD.h"
15#include "AliITSreconstruction.h"
02a71a71 16
17#endif
02a71a71 18#define DEBUG
d2e7afa1 19
999cc3eb 20Int_t AliITSDigits2RecPoints(TString filename="galice.root",TString fileRP=""){
60b9526b 21 // Standard ITS Digits to RecPoints.
cc2535cd 22
60b9526b 23 // Get geometry
24 TGeoManager::Import("geometry.root");
cc2535cd 25
60b9526b 26 // Dynamically link some shared libs
27 if (gClassTable->GetID("AliRun") < 0) {
28 gROOT->ProcessLine(".x $(ALICE_ROOT)/macros/loadlibs.C");
29 }else if (gAlice){
33c3c91a 30 delete AliRunLoader::Instance();
60b9526b 31 delete gAlice;
32 gAlice=0;
33 } // end if
34
35 TStopwatch timer;
02a71a71 36#ifdef DEBUG
60b9526b 37 cout << "Creating reconstructed points from digits for the ITS..." << endl;
02a71a71 38#endif
60b9526b 39 AliITSreconstruction *itsr = new AliITSreconstruction(filename);
88cb7938 40
60b9526b 41 timer.Start();
42 if(!(fileRP.IsNull()))itsr->SetOutputFile(fileRP);
43 itsr->Init();
44 itsr->Exec();
45 timer.Stop();
46 timer.Print();
47 delete itsr;
48 return 0;
02a71a71 49}