Skip to content

Commit

Permalink
Correct formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kjvbrt committed Oct 31, 2023
1 parent bd1275c commit 5633e27
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tools/include/edm4hep2json.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,11 @@
#include <sstream>
#include <vector>

template<typename CollT>
void insertIntoJson(nlohmann::json& jsonDict,
const podio::CollectionBase* coll,
const std::string& name) {
template <typename CollT>
void insertIntoJson(nlohmann::json& jsonDict, const podio::CollectionBase* coll, const std::string& name) {
const auto* typedColl = static_cast<const CollT*>(coll); // safe to cast, since we have queried the type before
nlohmann::json jsonColl{
{name,
{{"collection", *typedColl}, {"collID", coll->getID()}, {"collType", coll->getTypeName()}}}};
{name, {{"collection", *typedColl}, {"collID", coll->getID()}, {"collType", coll->getTypeName()}}}};
jsonDict.insert(jsonColl.begin(), jsonColl.end());
}

Expand Down

0 comments on commit 5633e27

Please sign in to comment.