Int_t AliITSHits2DigitsDubna(const char *inFile = "galice.root"){
+ ////////////////////////////////////////////////////////////////////
+ // This macro will take hits from a galice.root file and
+ // produce digits for the ITS using the settings for the detector
+ // simulations defined in this file. Specificaly it replaces the
+ // default SPD simulation with that of Dubna It will measure the
+ // time required to do so and the increase in the galice.root file.
+ // There is only one input, that of the name of the root file
+ // containing the hits and to which the digits will be written to.
+ // This macro will process all of the events on the root file.
+ ////////////////////////////////////////////////////////////////////
+
// Dynamically link some shared libs
if (gClassTable->GetID("AliRun") < 0) {
gROOT->LoadMacro("loadlibs.C");
return 2;
} // end if !gAlice
- gAlice->GetEvent(0);
AliITS *ITS = (AliITS*)gAlice->GetDetector("ITS");
if (!ITS) {
cerr<<"ITSHits2Digits.C : AliITS object not found on file" << endl;
return 4;
} // end if
- if(!gAlice->TreeD()){
- cout << "Having to create the Digits Tree." << endl;
- gAlice->MakeTree("D");
- } // end if !gAlice->TreeD()
- //make branch
- ITS->MakeBranch("D");
- ITS->SetTreeAddress();
-
// SPD
cout << "Changing from Default SPD simulation, and responce." << endl;
AliITSDetType *iDetType=ITS->DetType(0);
TStopwatch timer;
Long_t size0 = file->GetSize();
timer.Start();
- ITS->Hits2Digits();
+ gAlice->Hits2Digits();
timer.Stop(); timer.Print();
- delete gAlice; gAlice=0;
file->Close();
Long_t size1 = file->GetSize();
cout << "File size before = " << size0 << " file size after = " << size1;