1 Int_t AliITSHits2DigitsDefault(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<<"ITSHits2Digits.C : AliITS object not found on file\n";
31 cout << "Having to create the Digits Tree." << endl;
32 gAlice->MakeTree("D");
33 } // end if !gAlice->TreeD()
36 ITS->SetTreeAddress();
37 cout << "Digitizing ITS..." << endl;
40 Long_t size0 = file->GetSize();
43 timer.Stop(); timer.Print();
45 delete gAlice; gAlice=0;
47 Long_t size1 = file->GetSize();
48 cout << "File size before = " << size0 << " file size after = " << size1;
49 cout << "Increase in file size is " << size1-size0 << " Bytes" << endl;