]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
allow merging of non-std objects which are not a collection
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Jul 2010 09:15:53 +0000 (09:15 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Jul 2010 09:15:53 +0000 (09:15 +0000)
HLT/rec/AliHLTEsdManagerImplementation.cxx
HLT/rec/AliHLTEsdManagerImplementation.h

index 788b6de07d153dffa1de805ba72d80e0be56ca7e..23ced4c4fb185711280250b13eb8e223cf44a82a 100644 (file)
@@ -728,8 +728,11 @@ int AliHLTEsdManagerImplementation::Merge(AliESDEvent* pTgt, AliESDEvent* pSrc)
       } else if (pSrcObject->IsA()==AliESDACORDE::Class()) {
        AliESDACORDE* pESDACORDE=dynamic_cast<AliESDACORDE*>(pSrcObject);
        copy=(pESDACORDE && false); // have to find an easy valid condition
+      } else if (!AliHLTESDEventHelper::IsStdContent(name)) {
+       // this is likely to be ok as long as it is not any object of the std content.
+       copy=true;
       } else {
-         HLTError("no merging implemented for object %s, omitting", name.Data());
+       HLTError("no merging implemented for object %s, omitting", name.Data());
       }
       if (copy) {
        //pSrcObject->Print();
@@ -795,3 +798,13 @@ int AliHLTEsdManagerImplementation::Merge(AliESDEvent* pTgt, AliESDEvent* pSrc)
   }
   return iResult;
 }
+
+bool AliHLTEsdManagerImplementation::AliHLTESDEventHelper::IsStdContent(const char* key)
+{
+  // check if the key denotes a std object
+  TString needle=key;
+  for (int i=0; i<kESDListN; i++) {
+    if (needle.CompareTo(fgkESDListName[i])==0) return true;
+  }
+  return false;
+}
index 1a79ff621fc2970bbf66c6cee2eff8be44be404d..a66d73388705371e046c2d6ae03525e99264e768 100644 (file)
 */
 
 #include "AliHLTEsdManager.h"
+#include "AliESDEvent.h"
 #include "TString.h"
 #include <vector>
 
-class AliESDEvent;
 class TTree;
 class TFile;
 
@@ -98,6 +98,11 @@ class AliHLTEsdManagerImplementation : public AliHLTEsdManager {
    */
   static TTree* EmbedIntoTree(AliESDEvent* pESD, const char* name="esdTree", const char* title="Tree with HLT ESD objects");
 
+  class AliHLTESDEventHelper : public AliESDEvent {
+  public:
+    static bool IsStdContent(const char* key);
+  };
+
  protected:
 
  private: