-void AliITSDDLRawData(char* DigitsFile="galice.root"){
- #ifdef __NOCOMPILED__
- if (gClassTable->GetID("AliRun") < 0) {
- gROOT->LoadMacro("loadlibs.C");
- loadlibs();
- }
- else {
-#endif
- if(gAlice){
- delete gAlice;
- gAlice=0;
- }
-#ifdef __NOCOMPILED__
- }
-#endif
- // Connect the Root input file containing Geometry, Kine and Hits
- // galice.root file by default
- char* filename="galice.root";
- // TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(filename);
- TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(DigitsFile);
- if (!file){
- // file = new TFile(filename);
- file = new TFile(DigitsFile);
- cout<<"NEW FILE CREATED !!!"<<endl;
- }//end if
- file->ls();
- // Get AliRun object from file
- if (!gAlice) {
- gAlice = (AliRun*)file->Get("gAlice");
- if (gAlice)cout<<"AliRun object found on file "<<filename<<endl;
- if(!gAlice){
- cout<<"Can't access AliRun object on file "<<filename<<endl;
- cout<<"Macro execution stopped!!!"<<endl;
- }
+void AliITSDDLRawData(Int_t eventNumber=0){
+
+ Int_t spdLDCs=2;
+ Int_t sddLDCs=4;
+ Int_t ssdLDCs=2;
+ Int_t eventn=0;
+ const char * inFile_new = "galice.root";
+ AliRunLoader *rl = AliRunLoader::Open(inFile_new,"Event","read");
+ rl->LoadgAlice();
+ gAlice=rl->GetAliRun();
+ Int_t nevents=rl->GetNumberOfEvents();
+ cout<<"Number of Events:"<<nevents<<endl;
+ while (eventNumber<=0 || eventNumber>nevents){
+ cout<<"Insert the event number:";
+ cin>>eventNumber;
+ cout<<endl;