@@ -1989,7 +1989,7 @@ bool CcdbApi::loadLocalContentToMemory(o2::pmr::vector<char>& dest, std::string&
19891989{
19901990 if (url.find (" alien:/" , 0 ) != std::string::npos) {
19911991 std::map<std::string, std::string> localHeaders;
1992- loadFileToMemory (dest, url, &localHeaders);
1992+ loadFileToMemory (dest, url, &localHeaders, false );
19931993 auto it = localHeaders.find (" Error" );
19941994 if (it != localHeaders.end () && it->second == " An error occurred during retrieval" ) {
19951995 return false ;
@@ -2001,7 +2001,7 @@ bool CcdbApi::loadLocalContentToMemory(o2::pmr::vector<char>& dest, std::string&
20012001 std::string path = url.substr (7 );
20022002 if (std::filesystem::exists (path)) {
20032003 std::map<std::string, std::string> localHeaders;
2004- loadFileToMemory (dest, url, &localHeaders);
2004+ loadFileToMemory (dest, url, &localHeaders, o2::utils::Str::endsWith (path, " .root " ) );
20052005 auto it = localHeaders.find (" Error" );
20062006 if (it != localHeaders.end () && it->second == " An error occurred during retrieval" ) {
20072007 return false ;
@@ -2013,7 +2013,7 @@ bool CcdbApi::loadLocalContentToMemory(o2::pmr::vector<char>& dest, std::string&
20132013 return false ;
20142014}
20152015
2016- void CcdbApi::loadFileToMemory (o2::pmr::vector<char >& dest, const std::string& path, std::map<std::string, std::string>* localHeaders) const
2016+ void CcdbApi::loadFileToMemory (o2::pmr::vector<char >& dest, const std::string& path, std::map<std::string, std::string>* localHeaders, bool fetchLocalMetaData ) const
20172017{
20182018 // Read file to memory as vector. For special case of the locally cached file retriev metadata stored directly in the file
20192019 constexpr size_t MaxCopySize = 0x1L << 25 ;
@@ -2061,7 +2061,7 @@ void CcdbApi::loadFileToMemory(o2::pmr::vector<char>& dest, const std::string& p
20612061 totalread += nread;
20622062 } while (nread == (long )MaxCopySize);
20632063
2064- if (localHeaders) {
2064+ if (localHeaders && fetchLocalMetaData ) {
20652065 TMemFile memFile (" name" , const_cast <char *>(dest.data ()), dest.size (), " READ" );
20662066 auto storedmeta = (std::map<std::string, std::string>*)extractFromTFile (memFile, TClass::GetClass (" std::map<std::string, std::string>" ), CCDBMETA_ENTRY);
20672067 if (storedmeta) {
0 commit comments