1 Int_t AliITSHits2SDigitsDefault(const char *inFile = "galice.root"){
2 // Connect the Root Galice file containing Geometry, Kine and Hits
4 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(inFile);
5 if (file) {file->Close(); delete file;}
6 cout << "AliITSHits2Digits" << endl;
7 file = new TFile(inFile,"UPDATE");
9 cerr<<"Can't open "<<inFile<<" !" << endl;
14 // Get AliRun object from file or return if not on file
15 if (gAlice) delete gAlice;
16 gAlice = (AliRun*)file->Get("gAlice");
18 cerr << "AliITSITSHits2Digits.C : AliRun object not found on file"
24 AliITS *ITS = (AliITS*)gAlice->GetDetector("ITS");
26 cerr<<"AliITSHits2DigitsDefault.C : AliITS object not found on file"
32 cout << "Having to create the SDigits Tree." << endl;
33 gAlice->MakeTree("S");
34 } // end if !gAlice->TreeS()
37 ITS->SetTreeAddress();
38 cout << "Digitizing ITS..." << endl;
41 Long_t size0 = file->GetSize();
44 timer.Stop(); timer.Print();
46 delete gAlice; gAlice=0;
48 Long_t size1 = file->GetSize();
49 cout << "File size before = " << size0 << " file size after = " << size1;
50 cout << "Increase in file size is " << size1-size0 << " Bytes" << endl;