From 60dc996e5e3dfc6e4860d088c3955dd94e725972 Mon Sep 17 00:00:00 2001 From: Stewart Martin-Haugh <smh@cern.ch> Date: Fri, 24 Apr 2020 17:29:17 +0200 Subject: [PATCH] Remove ROOT version checks from APR Tests --- .../RootCollection/RootCollection/LinkDef.h | 4 ---- .../APR/RootCollection/src/RootCollection.cpp | 7 ------ .../src/RootCollectionQuery.cpp | 9 -------- Database/APR/Tests/libname.h | 23 ------------------- 4 files changed, 43 deletions(-) diff --git a/Database/APR/RootCollection/RootCollection/LinkDef.h b/Database/APR/RootCollection/RootCollection/LinkDef.h index 951fd440ebd..a2af25b6975 100755 --- a/Database/APR/RootCollection/RootCollection/LinkDef.h +++ b/Database/APR/RootCollection/RootCollection/LinkDef.h @@ -8,10 +8,6 @@ #pragma link off all classes; #pragma link off all functions; -#if ROOT_VERSION_CODE < ROOT_VERSION(5,99,0) -#pragma link C++ class std::pair< std::string, std::string >+; -#pragma link C++ class std::vector< std::pair< std::string, std::string > >+; -#endif #pragma link C++ class AttributeListLayout+; #endif diff --git a/Database/APR/RootCollection/src/RootCollection.cpp b/Database/APR/RootCollection/src/RootCollection.cpp index a8229e28d5d..837647462d4 100755 --- a/Database/APR/RootCollection/src/RootCollection.cpp +++ b/Database/APR/RootCollection/src/RootCollection.cpp @@ -90,13 +90,6 @@ namespace pool { } m_poolOut << coral::Info << "File " << m_fileName << " opened in " << method << coral::MessageStream::endmsg; - // if the collection is read via "rootd" a cache might be useful - if(dynamic_cast<TNetFile*>(m_file)) { -#if ROOT_VERSION_CODE < ROOT_VERSION(5,99,0) - m_file->UseCache(); -#endif - } - m_tree->SetDirectory(gDirectory); m_schemaEditor->writeSchema(); } diff --git a/Database/APR/RootCollection/src/RootCollectionQuery.cpp b/Database/APR/RootCollection/src/RootCollectionQuery.cpp index 26772c6fe68..b224669ea3c 100644 --- a/Database/APR/RootCollection/src/RootCollectionQuery.cpp +++ b/Database/APR/RootCollection/src/RootCollectionQuery.cpp @@ -200,15 +200,6 @@ pool::RootCollection::RootCollectionQuery::execute() eventList = new TEventList("preselected",""); eventList->SetDirectory(0); -#if ROOT_VERSION_CODE < ROOT_VERSION(6,3,0) - size_t maxoper = m_whereClause.length()/3; - if( maxoper > 1000 ) { - // increase number of operators ROOT can handle for complex queries - coral::MessageStream log("APR::RootCollectionQuery"); - log << coral::Info << "Setting TFormula::SetMaxima(" << maxoper << ")" << coral::MessageStream::endmsg; - TFormula::SetMaxima( maxoper ); - } -#endif APRTreeFormula formula(m_whereClause, m_tree); if( !formula.GetNdim() ) { std::string errorMsg = "Could not construct TTreeFormula object, probably because of incorrect ROOT predicate syntax in expression `" + m_whereClause + "'"; diff --git a/Database/APR/Tests/libname.h b/Database/APR/Tests/libname.h index 7a922e5bbf3..7c221d8170c 100644 --- a/Database/APR/Tests/libname.h +++ b/Database/APR/Tests/libname.h @@ -9,23 +9,7 @@ */ #include "DataModelRoot/RootType.h" - -#include "RVersion.h" -#if ROOT_VERSION_CODE < ROOT_VERSION(5,99,0) -#include "Reflex/SharedLibrary.h" -std::string libname (const std::string &name) -{ -#ifdef _WIN32 - return name + ".dll"; -#elif defined __hpux - return "lib" + name + ".sl"; -#else - return "lib" + name + ".so"; -#endif -} -#else #include "GaudiKernel/System.h" -#endif namespace pool {} @@ -37,16 +21,9 @@ void TestDriver::loadLibraries( const std::vector<std::string>& libraries ) const std::string& library = *iLibrary; std::cout << "Loading library " << library << std::endl; -#if ROOT_VERSION_CODE < ROOT_VERSION(5,99,0) - Reflex::SharedLibrary libloader( libname(library) ); - if(!libloader.Load()){ - std::cout << libloader.Error() << std::endl; - } -#else System::ImageHandle libhandle; if( System::loadDynamicLib(library, &libhandle) != 1 ) { std::cout << "Error! library loading failed" << std::endl; } -#endif } } -- GitLab