Changes to compile on HP and Sun
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 29 Mar 2004 12:03:41 +0000 (12:03 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 29 Mar 2004 12:03:41 +0000 (12:03 +0000)
ITS/AliITSspdTestBeam.cxx

index 7990d21a8018379293597f6ba2ce5f60a2f614f0..cdb3df7cef739d005bbb6f2252250ce8d38f5afb 100644 (file)
 /*
   $Id$
 */
+#include <stdlib.h>
 #include <stddef.h>
 #include <iomanip>
 #include <Riostream.h>
 #include <fstream>
+#include <TArrayI.h>
 
 #include "AliITSspdTestBeam.h"
 
@@ -158,8 +160,9 @@ Int_t AliITSspdTestBeam::OpenInputFile(const Char_t *filename,Int_t start,Int_t
         fNeventsEnd   = new Int_t[fMaxFiles];
     } // end if
     if(fNfiles==fMaxFiles){// Need to expand array of open files.
-        ifstream *tmp[fMaxFiles];
-        Int_t st[fMaxFiles],en[fMaxFiles];
+        ifstream **tmp = new ifstream*[fMaxFiles];
+        TArrayI st(fMaxFiles);
+       TArrayI  en(fMaxFiles);
         for(i=0;i<fMaxFiles;i++) { // copy pointers into tmp
             tmp[i]    = fFiles[i];
             fFiles[i] = 0;
@@ -183,6 +186,7 @@ Int_t AliITSspdTestBeam::OpenInputFile(const Char_t *filename,Int_t start,Int_t
             } // end if i<fNfiles
         } // end for i
         // the array of pointers tmp is deleted automatically.
+       delete [] tmp;
     } // end if
     // Open file
     fFiles[fNfiles] = new ifstream(filename,ios::in|ios::binary);