Updated homer buffer so that it won't add empty lists (from events that have already...
authorslindal <slindal@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 6 Nov 2010 09:51:16 +0000 (09:51 +0000)
committerslindal <slindal@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 6 Nov 2010 09:51:16 +0000 (09:51 +0000)
EVE/EveHLT/AliEveEventBufferHomer.cxx

index 4629830..9fea278 100644 (file)
@@ -60,8 +60,19 @@ TObject * AliEveEventBufferHomer::GetEventFromSource() {
 
 ///___________________________________________________________________________
 void AliEveEventBufferHomer::AddToBuffer(TObject * event) {
-  cout << "Add to buffer"<<endl;
-  if(!event) return;
+  cout << "AliEveEventBufferHomer::Add to buffer"<<endl;
+  if(!event) {
+    cout << "event is NULL pointer, return" << endl;
+    return;
+  }
+
+
+  TList * listIn = dynamic_cast<TList*>(event);
+  if(!(listIn->GetSize() > 0)) {
+    cout  << "AliEveEventBufferHomer::AddToBuffer(): List Is empty, not added to buffer!"<<endl;
+    return;
+  }
+  
   fBIndex[kTop] = CalculateNext(fBIndex[kTop]);
   TList * list = dynamic_cast<TList*>(fEventBuffer->At(fBIndex[kTop]));
   if(list) {