-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edm4hep files contaning vertex collections incompatible with root RDataFrame.Describe() #262
Comments
This looks like a root issue, where the minimal reproducer should be to effectively write a branch with an |
Looks like a reproducer is not so easy to produce... I made a struct struct test {
std::array<float, 6> arr;
ROOT::VecOps::RVec<float> vec;
ROOT::VecOps::RVec<ROOT::VecOps::RVec<float>> vecvec;
std::array<std::array<float, 6>,1> arrarr;
ROOT::VecOps::RVec<std::array<float,6>> vecarr;
} and use it like this: import ROOT
df = ROOT.RDataFrame(10)
code = """
struct test {
std::array<float, 6> arr;
ROOT::VecOps::RVec<float> vec;
ROOT::VecOps::RVec<ROOT::VecOps::RVec<float>> vecvec;
std::array<std::array<float, 6>,1> arrarr;
//ROOT::VecOps::RVec<std::array<float,6>> vecarr;
};
"""
ROOT.gInterpreter.Declare(code)
df = df.Define("test", "test()")
print(df.Describe())
df.Snapshot("test_tree", "test_file.root")
df2 = ROOT.RDataFrame("test_tree", "test_file.root")
print(df2.Describe()) returning:
uncommenting the
|
Ah, sorry. That was a bit ambiguous from my side. What we write is more like this struct test {
std::array<float, 6> values;
};
std::vector<test> data; So probably something along the lines of import ROOT
ROOT.gInterpreter.Declare("""
#include <array>
#include <vector>
struct test {
std::array<float, 6> values{};
};
std::vector<test> makeTestData() {
return std::vector<test>(10);
}
"""
# all the rest If you want to make it slightly more complicated, this would also be allowed in a podio generated EDM struct ArrayStruct {
std::array<int, 42> arr;
};
struct SomeData {
ArrayStruct a{};
}; |
Ok, thx.
|
Ah right, you will probably have to create a dictionary then for at least |
I have no idea either, guess I will have to postpone this for now as there is more important stuff to do... |
@Zehvogel I'll file an issue at root-project/root and link here. |
Back reference: root-project/root#14790 |
I've had a look at this and it seems it's only an issue with |
This affects more than just |
root's RDataFrame
.Describe()
feature fails with edm4hep files containing vertex collections with the following error message:It is maybe not our fault but I wanted to submit the issue here first
source /cvmfs/sw-nightlies.hsf.org/key4hep/releases/2024-02-05/x86_64-almalinux9-gcc11.3.1-opt/key4hep-stack/2024-02-05-osrelo/setup.sh
downloading https://cernbox.cern.ch/s/71P17DwMNplpruv
The text was updated successfully, but these errors were encountered: