X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=RAW%2FAliRawEvent.cxx;h=975c8daab837c99d352c6dd818d7d8e14c309764;hb=13d0d987021601b68a4373396ef8fe1a056a43b5;hp=c717e293f61519d2666389e5c8422fd5303e9ac4;hpb=8547965dc98865c6258f81c96bfe040096577d6e;p=u%2Fmrichter%2FAliRoot.git diff --git a/RAW/AliRawEvent.cxx b/RAW/AliRawEvent.cxx index c717e293f61..975c8daab83 100644 --- a/RAW/AliRawEvent.cxx +++ b/RAW/AliRawEvent.cxx @@ -1146,7 +1146,11 @@ void AliRunDB::UpdateAliEn(AliStats *stats) //printf("AliEn: AddFile(%s, %s, %d)\n", lfn.Data(), stats->GetFileName(), // (int)stats->GetFileSize()); - g->AddFile(lfn, stats->GetFileName(), (int)stats->GetFileSize()); +// g->AddFile(lfn, stats->GetFileName(), (int)stats->GetFileSize()); + Int_t result = g->AddFile(lfn, stats->GetFileName(), + (int)stats->GetFileSize()); + ALIDEBUG(1) + Info("UpdateAliEn", "TGrid::AddFile returned %d\n", result); delete g; } @@ -1311,7 +1315,9 @@ Int_t AliMDC::Run() // Process input stream #ifdef USE_EB - while (!ebEor()) { + Int_t eorFlag = 0; + while (!(eorFlag = ebEor())) { +// while (!ebEor()) { struct iovec *ebvec; if ((ebvec = ebGetNextEvent()) == (void *)-1) { Error("Run", "error getting next event (%s)", ebGetLastError()); @@ -1342,6 +1348,8 @@ Int_t AliMDC::Run() } return 1; } + ALIDEBUG(3) + header.Dump(); // If we were in looping mode stop directly after a SIGUSR1 signal if (StopLoop()) { @@ -1385,6 +1393,12 @@ Int_t AliMDC::Run() // If there is less data for this event than the next sub-event // header, something is wrong. Skip to next event... if (toRead < header.HeaderSize()) { + ALIDEBUG(1) { + Warning("Run", + "header size (%d) exceeds number of bytes to read (%d)\n", + header.HeaderSize(), toRead); + header.Dump(); + } if ((status = DumpEvent(toRead)) != toRead) { if (status == 0) break; @@ -1395,8 +1409,8 @@ Int_t AliMDC::Run() } // Loop over all sub-events... (LDCs) + Int_t nsub = 1; while (toRead > 0) { - Int_t nsub = 1; #ifdef USE_EB ebdata = (char *)ebvec[nsub].iov_base; #endif @@ -1416,6 +1430,9 @@ Int_t AliMDC::Run() return 1; } + ALIDEBUG(3) + subHeader.Dump(); + toRead -= subHeader.HeaderSize(); #ifdef USE_EB @@ -1447,6 +1464,11 @@ Int_t AliMDC::Run() // Make sure raw data less than left over bytes for current event if (rawSize > toRead) { + ALIDEBUG(1) { + Warning("Run", "raw data size (%d) exceeds number of bytes " + "to read (%d)\n", rawSize, toRead); + subHeader.Dump(); + } if ((status = DumpEvent(toRead)) != toRead) { if (status == 0) break; @@ -1568,6 +1590,13 @@ Int_t AliMDC::Run() } #endif +#ifdef USE_EB + // Print eor flag + if (eorFlag) { + printf("Event builder reported end of run: %d\n", eorFlag); + } +#endif + return 0; }