]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliFileMerger.cxx
Coverity fixes
[u/mrichter/AliRoot.git] / ANALYSIS / AliFileMerger.cxx
index bf34a9e02aab8e556fefdb7f38d2ce5e6a774a95..d7e3f4571ff8ca29a9e1685e737a7d3495256b1d 100644 (file)
@@ -373,7 +373,7 @@ void AliFileMerger::AddAccept(const char *accept){
 }
 
 //___________________________________________________________________________
-int AliFileMerger::MergeRootfile( TDirectory *target, TList *sourcelist)
+int AliFileMerger::MergeRootfile( TDirectory *target, TList *sourcelist, Bool_t nameFiltering)
 {
   // Merge all objects in a directory
   // modified version of root's hadd.cxx
@@ -418,7 +418,7 @@ int AliFileMerger::MergeRootfile( TDirectory *target, TList *sourcelist)
       //
       // check if we don't reject this name
       TString nameK(key->GetName());
-      if (!IsAccepted(nameK)) {
+      if (!IsAccepted(nameK) && nameFiltering) {
        if (!counterF) printf("Object %s is in rejection list, skipping...\n",nameK.Data());
        continue;
       }
@@ -489,7 +489,7 @@ int AliFileMerger::MergeRootfile( TDirectory *target, TList *sourcelist)
        // newdir is now the starting point of another round of merging
        // newdir still knows its depth within the target file via
        // GetPath(), so we can still figure out where we are in the recursion
-       status = MergeRootfile( newdir, sourcelist);
+       status = MergeRootfile( newdir, sourcelist, kFALSE);
        if (status) return status;
        
       } else if ( obj->InheritsFrom(TObject::Class())
@@ -522,7 +522,14 @@ int AliFileMerger::MergeRootfile( TDirectory *target, TList *sourcelist)
                     << " with the corresponding object in " << nextsource->GetName() << endl;
              }
              listH.Delete();
-             AliSysInfo::AddStamp(nameK.Data(),1,counterK,counterF++); 
+        // get the number of processed entries to be put in the syswatch.log
+        Double_t numberOfEntries = -1;
+        if (obj->IsA()->GetMethodAllAny("GetEntries"))
+        {
+          TMethodCall getEntries(obj->IsA(), "GetEntries", "");
+          getEntries.Execute(obj, numberOfEntries);
+        }
+             AliSysInfo::AddStamp(nameK.Data(),1,counterK,counterF++,numberOfEntries); 
            }
          }
          nextsource = (TFile*)sourcelist->After( nextsource );