]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliRawReaderDateV3.cxx
include optional use of AliTOFtrackerV1
[u/mrichter/AliRoot.git] / RAW / AliRawReaderDateV3.cxx
index dcee6aab1bfaa699f022c4ad18b9064c3c1c0119..492bdf021617afc6e98096c95d39ea01dd6ed9be 100644 (file)
@@ -86,7 +86,7 @@ AliRawReaderDateV3::AliRawReaderDateV3(const char* fileName,
   while (fread(&header, 1, headerSize, fFile) == headerSize) {
     if (eventNumber == 0) {
       UChar_t* buffer = new UChar_t[header.size];
-      fseek(fFile, -headerSize, SEEK_CUR);
+      fseek(fFile, -(long)headerSize, SEEK_CUR);
       if (Int_t(fread(buffer, 1, header.size, fFile)) != header.size) break;
       fEvent = (eventHeaderStruct*) buffer;
       break;
@@ -199,6 +199,13 @@ UInt_t AliRawReaderDateV3::GetGDCId() const
   return UInt_t(-1);
 }
 
+UInt_t AliRawReaderDateV3::GetTimestamp() const
+{
+// get the timestamp from the event header
+
+  if (!fEvent) return 0;
+  return fEvent->time;
+}
 
 Int_t AliRawReaderDateV3::GetEquipmentSize() const
 {
@@ -404,7 +411,7 @@ Bool_t AliRawReaderDateV3::NextEvent()
       continue;
     }
     UChar_t* buffer = new UChar_t[header.size];
-    fseek(fFile, -headerSize, SEEK_CUR);
+    fseek(fFile, -(long)headerSize, SEEK_CUR);
     if (Int_t(fread(buffer, 1, header.size, fFile)) != header.size) {
       Error("NextEvent", "could not read event from file");
       delete[] buffer;