diff --git a/src/fdb5/database/Catalogue.h b/src/fdb5/database/Catalogue.h index beac4ca76..d04f3747b 100644 --- a/src/fdb5/database/Catalogue.h +++ b/src/fdb5/database/Catalogue.h @@ -26,7 +26,6 @@ #include "fdb5/database/Field.h" #include "fdb5/database/FieldLocation.h" #include "fdb5/database/Key.h" -#include "fdb5/database/Key.h" #include "fdb5/database/Index.h" #include "fdb5/api/helpers/ControlIterator.h" #include "fdb5/database/PurgeVisitor.h" diff --git a/src/fdb5/database/Index.h b/src/fdb5/database/Index.h index a9c400a5f..e649cf2d9 100755 --- a/src/fdb5/database/Index.h +++ b/src/fdb5/database/Index.h @@ -116,11 +116,11 @@ class IndexBase : public eckit::Counted { std::string type_; /// @note Order of members is important here ... - IndexAxis axes_; ///< This Index spans along these axis - Key key_; ///< key that selected this index - time_t timestamp_; ///< timestamp when this Index was flushed + IndexAxis axes_; ///< This Index spans along these axis + Key key_; ///< key that selected this index + time_t timestamp_; ///< timestamp when this Index was flushed - Indexer indexer_; + Indexer indexer_; friend std::ostream& operator<<(std::ostream& s, const IndexBase& o) { o.print(s); return s; diff --git a/src/fdb5/database/Key.cc b/src/fdb5/database/Key.cc index 5db58477b..0ac298a0f 100644 --- a/src/fdb5/database/Key.cc +++ b/src/fdb5/database/Key.cc @@ -420,11 +420,8 @@ Key Key::parseString(const std::string& s) { return Key{keys}; } -void TypedKey::validateKeys(const BaseKey& other, bool checkAlsoValues) const -{ +void TypedKey::validateKeys(const BaseKey& other, bool checkAlsoValues) const { - // std::cout << "validateKeys " << (*this) << std::endl - // << " " << other << std::endl; eckit::StringSet missing; eckit::StringSet mismatch; diff --git a/src/fdb5/database/Key.h b/src/fdb5/database/Key.h index ed99d6437..f5f8fa8c7 100644 --- a/src/fdb5/database/Key.h +++ b/src/fdb5/database/Key.h @@ -46,12 +46,6 @@ class BaseKey { public: // methods - // explicit BaseKey(const std::shared_ptr reg = nullptr, bool canonical = false); - // explicit BaseKey(eckit::Stream &, const std::shared_ptr reg = nullptr); - // explicit BaseKey(const std::string &keys, const Rule* rule); - // explicit BaseKey(const eckit::StringDict &keys, const std::shared_ptr reg=nullptr); - // BaseKey(std::initializer_list>, const std::shared_ptr reg=nullptr); - BaseKey() : keys_(), names_() {} BaseKey(const BaseKey &key) : keys_(key.keys_), names_(key.names_) {} @@ -170,7 +164,6 @@ class Key : public BaseKey { explicit Key(); explicit Key(eckit::Stream &); - // explicit Key(const std::string &keys); explicit Key(const eckit::StringDict &keys); Key(std::initializer_list>); @@ -183,7 +176,6 @@ class Key : public BaseKey { private: // members - //TODO add unit test for each type std::string canonicalise(const std::string& keyword, const std::string& value) const override; std::string type(const std::string& keyword) const override; @@ -195,7 +187,6 @@ class TypedKey : public BaseKey { public: // methods - // explicit TypedKey(const Key& key); explicit TypedKey(const Key& key, const std::shared_ptr reg); explicit TypedKey(const std::shared_ptr reg); explicit TypedKey(eckit::Stream &, const std::shared_ptr reg); @@ -203,7 +194,6 @@ class TypedKey : public BaseKey { explicit TypedKey(const eckit::StringDict &keys, const std::shared_ptr reg); TypedKey(std::initializer_list>, const std::shared_ptr reg); - /// @todo - this functionality should not be supported any more. static TypedKey parseString(const std::string&, const std::shared_ptr reg); Key canonical() const; diff --git a/src/fdb5/rules/Rule.cc b/src/fdb5/rules/Rule.cc index f442e6163..0898c5bcb 100644 --- a/src/fdb5/rules/Rule.cc +++ b/src/fdb5/rules/Rule.cc @@ -292,7 +292,6 @@ void Rule::expandFirstLevel(const metkit::mars::MarsRequest& request, TypedKey& void Rule::matchFirstLevel( const Key& dbKey, std::vector::const_iterator cur, Key& tmp, std::set& result, const char* missing) const { - // std::cout << "Rule::matchFirstLevel dbKey " << dbKey << " tmp " << tmp << " result.size() " << result.size() << std::endl; if (cur == predicates_.end()) { if (tmp.match(dbKey)) { result.insert(tmp); diff --git a/src/fdb5/tools/fdb-copy.cc b/src/fdb5/tools/fdb-copy.cc index b6047b323..a604d75a5 100644 --- a/src/fdb5/tools/fdb-copy.cc +++ b/src/fdb5/tools/fdb-copy.cc @@ -51,8 +51,6 @@ static std::vector readRequest(const CmdArgs& args) { for (size_t i = 0; i < args.count(); ++i) { - // std::cout << "Reading " << args(i) << std::endl; - std::ifstream in(args(i).c_str()); if (in.bad()) { std::ostringstream msg; @@ -98,12 +96,7 @@ void FDBCopy::execute(const CmdArgs& args) { std::vector requests = readRequest(args); - // std::cout << "REQUESTS: " << std::endl; - // for (auto r : requests) - // std::cout << r << std::endl; - // Evaluate the requests to obtain data handles - const bool sort = args.getBool("sort", false); fdb5::HandleGatherer handles(sort); diff --git a/src/fdb5/types/TypeClimateDaily.cc b/src/fdb5/types/TypeClimateDaily.cc index a02ec0251..1548f949c 100644 --- a/src/fdb5/types/TypeClimateDaily.cc +++ b/src/fdb5/types/TypeClimateDaily.cc @@ -90,7 +90,6 @@ void TypeClimateDaily::getValues(const metkit::mars::MarsRequest &request, bool TypeClimateDaily::match(const std::string&, const std::string& value1, const std::string& value2) const { - // std::cout << value1 << " vs. " << value2 << " are " << (month(value1) == month(value2)) << std::endl; return month(value1) == month(value2); } diff --git a/tests/fdb/test_fdb5_service.cc b/tests/fdb/test_fdb5_service.cc index 889e38014..4b92ec61b 100644 --- a/tests/fdb/test_fdb5_service.cc +++ b/tests/fdb/test_fdb5_service.cc @@ -185,9 +185,7 @@ CASE ( "test_fdb_stepunit_archive" ) { { metkit::mars::MarsExpension expand{false}; - std::cout << req << endl; metkit::mars::MarsRequest expandedRequests = expand.expand(req); - std::cout << expandedRequests << endl; fdb5::FDBToolRequest r(expandedRequests); fdb5::ListIterator iter = fdb.list(r, true); fdb5::ListElement el; diff --git a/tests/fdb/type/test_toKey.cc b/tests/fdb/type/test_toKey.cc index 1f48e7eae..f026cb958 100644 --- a/tests/fdb/type/test_toKey.cc +++ b/tests/fdb/type/test_toKey.cc @@ -132,8 +132,6 @@ CASE( "Step & ClimateDaily - expansion" ) { EXPECT(key.canonicalValue("date") == "0427"); EXPECT(key.canonicalValue("time") == "0000"); - std::cout << key.valuesToString() << std::endl; - EXPECT(key.valuesToString() == "0427:dacl:0000:ei:7799:g:pb:pl:2-12:99:100:50:129.128"); key.set("step", "00"); @@ -220,7 +218,6 @@ CASE( "Levelist" ) { // this works (probably shouldn't), simply becasue to_string uses the same precision as printf %f (default 6) /// @note don't use to_string when canonicalising Keys key.set("levelist", std::to_string(double(1./3.))); -// std::cout << key.canonicalValue("levelist") << std::endl; EXPECT(key.canonicalValue("levelist") == "0.333333"); EXPECT(key.match("levelist", values)); } @@ -258,8 +255,6 @@ CASE( "ClimateMonthly - string ctor - expansion" ) { config.schema().expand(key.canonical(), visitor); key.registry(visitor.rule()->registry()); - std::cout << key.valuesToString() << std::endl; - std::cout << key.canonicalValue("date"); EXPECT(key.canonicalValue("date") == "4"); EXPECT(key.valuesToString() == "op:0001:mnth:g:cl:pl:4:0000:50:129.128");