Skip to content

Commit

Permalink
podio: 00-16-07 -> 00-17
Browse files Browse the repository at this point in the history
  • Loading branch information
veprbl committed Oct 26, 2023
1 parent 0189671 commit fd1596d
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 7 deletions.
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
flake = false;
};
inputs.podio-src = {
url = "github:AIDASoft/podio/v00-16-07";
url = "github:AIDASoft/podio/v00-17";
flake = false;
};

Expand Down
4 changes: 4 additions & 0 deletions pkgs/juggler/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ stdenv.mkDerivation rec {
hash = "sha256-q0lIOqPIgF6+UWYRz9J0cfcG6//9vmt3nGZzo2+S9zU=";
};

patches = [
./podio_00_17.patch
];

nativeBuildInputs = [
cmake
];
Expand Down
48 changes: 48 additions & 0 deletions pkgs/juggler/podio_00_17.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
diff --git a/JugBase/src/components/PodioLegacyInput.cpp b/JugBase/src/components/PodioLegacyInput.cpp
index fa3f39b..89bf9ff 100644
--- a/JugBase/src/components/PodioLegacyInput.cpp
+++ b/JugBase/src/components/PodioLegacyInput.cpp
@@ -5,6 +5,7 @@

#include "TFile.h"
#include "TROOT.h"
+#include "podio/podioVersion.h"

#include "JugBase/DataWrapper.h"
#include "JugBase/PodioLegacyDataSvc.h"
@@ -29,7 +30,11 @@ StatusCode PodioLegacyInput::initialize() {
error() << "Requested product " << name << " not found." << endmsg;
return StatusCode::FAILURE;
}
+#if podio_VERSION >= PODIO_VERSION(0, 17, 0)
+ m_collectionIDs.push_back(idTable->collectionID(name).value());
+#else
m_collectionIDs.push_back(idTable->collectionID(name));
+#endif
}
return StatusCode::SUCCESS;
}
diff --git a/JugBase/src/components/PodioLegacyOutput.cpp b/JugBase/src/components/PodioLegacyOutput.cpp
index c9f6ec3..13e5d53 100644
--- a/JugBase/src/components/PodioLegacyOutput.cpp
+++ b/JugBase/src/components/PodioLegacyOutput.cpp
@@ -7,6 +7,7 @@
#include "TFile.h"
#include "JugBase/PodioLegacyDataSvc.h"
#include "rootUtils.h"
+#include "podio/podioVersion.h"

DECLARE_COMPONENT(PodioLegacyOutput)

@@ -104,7 +105,11 @@ void PodioLegacyOutput::createBranches(const std::vector<std::pair<std::string,
}
}

+#if podio_VERSION >= PODIO_VERSION(0, 17, 0)
+ const auto collID = m_podioLegacyDataSvc->getCollectionIDs()->collectionID(collName).value();
+#else
const auto collID = m_podioLegacyDataSvc->getCollectionIDs()->collectionID(collName);
+#endif
// No check necessary, only registered collections possible
auto coll = collNamePair.second;
const auto collType = std::string(coll->getValueTypeName()) + "Collection";
4 changes: 2 additions & 2 deletions pkgs/podio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ let

# instead of adding python3 and packages to propagatedNativeBuildInputs,
# let's hardcode a wrapped python into the specific scripts
python = python3.withPackages (pkgs: with pkgs; [ jinja2 pyyaml ]);
python = python3.withPackages (pkgs: with pkgs; [ jinja2 pyyaml tabulate ]);

in

stdenv.mkDerivation rec {
pname = "podio";
version = "00-16-07.${podio-src.shortRev or "dirty"}";
version = "00-17.${podio-src.shortRev or "dirty"}";

src = podio-src;

Expand Down

0 comments on commit fd1596d

Please sign in to comment.