Add time delay to Info
authorjthaeder <jthaeder@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 7 Nov 2010 14:47:15 +0000 (14:47 +0000)
committerjthaeder <jthaeder@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 7 Nov 2010 14:47:15 +0000 (14:47 +0000)
HLT/VZERO/AliHLTVZERORecoComponent.cxx

index a5e9bff1aec5ff8abc6d9d540bf09d6353d3183a..eacd83ab612e54025c2a790932efe1abcf6504b0 100644 (file)
@@ -28,6 +28,7 @@ using namespace std;
 #include "TTree.h"
 #include "TMap.h"
 #include "TObjString.h"
+#include "TDatime.h"
 
 #include "AliLog.h"
 #include "AliRunInfo.h"
@@ -340,11 +341,16 @@ Int_t AliHLTVZERORecoComponent::DoEvent(const AliHLTComponentEventData& /*evtDat
 
     AliESDVZERO *esdVZERO = fVZEROReconstructor->GetESDVZERO();
     
-    HLTInfo("VZERO Multiplicity A %f - C %f", esdVZERO->GetMTotV0A(), esdVZERO->GetMTotV0A() );
+    // Send info every 10 s
+    const TDatime time;    
+    static UInt_t lastTime=0;
+    if (time.Get()-lastTime>10) {
+      lastTime=time.Get();
+      HLTInfo("VZERO Multiplicity A %f - C %f", esdVZERO->GetMTotV0A(), esdVZERO->GetMTotV0A() );
+    }
 
     // -- Send AliESDVZERO
-    PushBack(static_cast<TObject*>(esdVZERO),
-            kAliHLTDataTypeESDContent|kAliHLTDataOriginVZERO,0);
+    PushBack(esdVZERO, kAliHLTDataTypeESDContent|kAliHLTDataOriginVZERO,0);
   }
   
   // -- Clean up