Skip to content
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

feat: for scikit-hep/uproot5#1229 #154

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions dev/make-root/uproot_issue_1229.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#include <TFile.h>
#include <TObject.h>
#include <TTree.h>

class TFooMember : public TObject {
public:
TFooMember(int _value)
: value(_value)
{};

int value;

ClassDef(TFooMember, 1);
};

class TFoo : public TObject {
public:
TFoo(int value_for_member, int value_for_const_member)
: pointer{new TFooMember(value_for_member)}
, const_pointer{new TFooMember(value_for_const_member)}
{};

TFooMember *pointer;
const TFooMember *const_pointer;

ClassDef(TFoo, 1);
};

// Streaming interpreted classes is not supported, so this has to be ran with ACLiC:
//
// root -lbq uproot_issue_1229.C+
//
void uproot_issue_1229() {
TFile f("uproot-issue-1229.root", "RECREATE");
TTree tree;
TFoo foo(123, 321);
tree.Branch("branch", &foo);
tree.Fill();
tree.Write("tree");
}
Binary file added src/skhep_testdata/data/uproot-issue-1229.root
Binary file not shown.