Skip to content

Commit

Permalink
only 'default' accepted, value does not matter
Browse files Browse the repository at this point in the history
  • Loading branch information
chiarazampolli committed Apr 26, 2022
1 parent c799dc2 commit ef1b0fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
1 change: 1 addition & 0 deletions Common/Utils/include/CommonUtils/NameConf.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class NameConf : public o2::conf::ConfigurableParamHelper<NameConf>
static constexpr std::string_view CCDBMETA = "ccdb_meta"; // hardcoded
static constexpr std::string_view CCDBQUERY = "ccdb_query"; // hardcoded
static constexpr std::string_view CCDBRunTag = "runNumber";
static constexpr std::string_view CCDBDefaultEntry = "default";

// Filename to store geometry file
static std::string getGeomFileName(const std::string_view prefix = "");
Expand Down
20 changes: 2 additions & 18 deletions Framework/Core/src/CCDBHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <TError.h>
#include <TMemFile.h>
#include <functional>
#include <boost/algorithm/string/predicate.hpp>

namespace o2::framework
{
Expand Down Expand Up @@ -213,23 +212,8 @@ auto populateCacheWith(std::shared_ptr<CCDBFetcherHelper> const& helper,
continue;
}
// printing in case we find a default entry
// we allow "default", "Default", "DEFAULT",
// and they can be equal to a case-insensitive "true" or "1"
auto defMetaData = headers.find("default");
auto defMetaDataInCap = headers.find("Default");
auto defMetaDataCap = headers.find("DEFAULT");
if (defMetaData != headers.end()) {
if (boost::iequals((*defMetaData).second, "true") || (*defMetaData).second == "1") {
LOGP(info, "******** Default entry used for {} ********", path);
}
} else if (defMetaDataInCap != headers.end()) {
if (boost::iequals((*defMetaDataInCap).second, "true") || (*defMetaDataInCap).second == "1") {
LOGP(info, "******** Default entry used for {} ********", path);
}
} else if (defMetaDataCap != headers.end()) {
if (boost::iequals((*defMetaDataCap).second, "true") || (*defMetaDataCap).second == "1") {
LOGP(info, "******** Default entry used for {} ********", path);
}
if (headers.find("default") != headers.end()) {
LOGP(detail, "******** Default entry used for {} ********", path);
}
if (etag.empty()) {
helper->mapURL2UUID[path] = headers["ETag"]; // update uuid
Expand Down

0 comments on commit ef1b0fc

Please sign in to comment.