]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixed bug retuning wrong event id
authorslindal <slindal@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 4 Nov 2010 21:14:49 +0000 (21:14 +0000)
committerslindal <slindal@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 4 Nov 2010 21:14:49 +0000 (21:14 +0000)
HLT/BASE/AliHLTHOMERManager.cxx
HLT/BASE/AliHLTHOMERManager.h

index ad3df5ef8914fe39dc33318f436fa5b2d0c5c694..508406978bccd186a329b0e56b207acbee6cdd88 100644 (file)
@@ -62,6 +62,7 @@ ClassImp(AliHLTHOMERManager)
   fSourceList(NULL),
   fNBlks(0),
   fEventID(),
+  fEventId(-1),
   fCurrentBlk(0),
   fAsyncBlockList(NULL),
   fBlockList(NULL),
@@ -715,7 +716,15 @@ void AliHLTHOMERManager::AddToBlockList() {
   // see header file for class documentation
   HLTInfo("Adding blocks to the synchroneous block list");
 
+  ULong_t eventID = static_cast<ULong64_t>(fCurrentReader->GetEventID());  
   
+  if ( fEventId == eventID ) {
+    HLTInfo(Form("Event 0x%016lX (%lu) already in buffer.", eventID, eventID));
+    return;
+  }
+
+  fEventId = eventID;
+
   GetFirstBlk();
   do {
 
index 31aa7bd404447921a83116742d043f0f800f155a..84965a3c338c3e5448c82a0bb6c7858d49048c99 100644 (file)
@@ -87,7 +87,7 @@ public:
   virtual Int_t NextCycle() { return NextEvent(); }
 
   /** Get event ID */
-  ULong_t GetEventID() { return fEventID[fBufferTopIdx]; }
+  ULong_t GetEventID() { return fEventId; }
 
   Int_t GetNAvailableEvents() { return fNEventsAvailable;}
   
@@ -209,6 +209,7 @@ private:
   TList* fSourceList;                /** List to HOMER sources */
   ULong_t fNBlks;                    /** Number of blockes in current event */
   ULong64_t fEventID[BUFFERSIZE];    /** EventID of current event */
+  ULong64_t fEventId;
   ULong_t fCurrentBlk;               /** Current block in current event */
   TList* fAsyncBlockList;            /** List containing asychronous blocks */
   TList* fBlockList;            /** List containing asychronous blocks */