From ffb90644ff5cdb6153e38a7499587977fc559547 Mon Sep 17 00:00:00 2001 From: Pierre Gueth Date: Fri, 1 Feb 2013 16:39:35 +0100 Subject: [PATCH] pet output detection --- tests_dav/clitkMergeRootFiles.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests_dav/clitkMergeRootFiles.cxx b/tests_dav/clitkMergeRootFiles.cxx index 4c86c57..86887f0 100644 --- a/tests_dav/clitkMergeRootFiles.cxx +++ b/tests_dav/clitkMergeRootFiles.cxx @@ -36,18 +36,20 @@ int main(int argc, char * argv[]) { } // Detect Pet output - bool is_pet_output = true; + bool all_pet_output = true; for (uint i=0; i(handle->Get("Hits")); - cout << "testing " << filename << " " << hits << endl; + TTree* singles = dynamic_cast(handle->Get("Singles")); + const bool is_pet_output = (hits!=NULL) && (singles!=NULL); + cout << "testing " << filename << " is_pet_output " << is_pet_output << endl; handle->Close(); delete handle; - is_pet_output &= (hits==NULL); + all_pet_output &= is_pet_output; } - cout << "is_pet_output " << is_pet_output << endl; + cout << "all_pet_output " << all_pet_output << endl; // Merge TFileMerger * merger = new TFileMerger; -- 2.47.1