Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
veprbl committed Jun 10, 2024
1 parent 85dc367 commit 7387822
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
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.

0 comments on commit 7387822

Please sign in to comment.