Stupid bug fix in new superlight mode (from Zurich airport)
[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 "AliITS.h"
d2e7afa1 13#include "AliITSresponseSDD.h"
14#include "AliITSreconstruction.h"
02a71a71 15
16#endif
02a71a71 17#define DEBUG
d2e7afa1 18
999cc3eb 19Int_t AliITSDigits2RecPoints(TString filename="galice.root",TString fileRP=""){
60b9526b 20 // Standard ITS Digits to RecPoints.
cc2535cd 21
60b9526b 22 // Get geometry
23 TGeoManager::Import("geometry.root");
cc2535cd 24
60b9526b 25 // Dynamically link some shared libs
26 if (gClassTable->GetID("AliRun") < 0) {
27 gROOT->ProcessLine(".x $(ALICE_ROOT)/macros/loadlibs.C");
28 }else if (gAlice){
33c3c91a 29 delete AliRunLoader::Instance();
60b9526b 30 delete gAlice;
31 gAlice=0;
32 } // end if
33
34 TStopwatch timer;
02a71a71 35#ifdef DEBUG
60b9526b 36 cout << "Creating reconstructed points from digits for the ITS..." << endl;
02a71a71 37#endif
60b9526b 38 AliITSreconstruction *itsr = new AliITSreconstruction(filename);
88cb7938 39
60b9526b 40 timer.Start();
41 if(!(fileRP.IsNull()))itsr->SetOutputFile(fileRP);
42 itsr->Init();
43 itsr->Exec();
44 timer.Stop();
45 timer.Print();
46 delete itsr;
47 return 0;
02a71a71 48}