#include "help.h"
Mytest::Mytest()
{
}
Mytest::~Mytest()
{
}
void Mytest::Streamer(TBuffer &R__b)
{
// Stream an object of class Geometry.
}
where help.h has the form:
class Mytest
{
public:
Mytest();
virtual ~Mytest();
void Streamer(TBuffer& R__b);
Int_t Run_number;
Int_t Record_number;
Int_t Fill_number;
Int_t Nrhits;
};
I'm booking the tree then the following way:
{
TFile *hfile = new TFile("Test.root","RECREATE","Junk");
TTree *treetrace = new TTree("treetrace","example",1024);
Int_t split=0;
Int_t bsize = 64000;
Mytest *mytest = new Mytest;
treetrace->Branch("mytest","Mytest",&mytest,bsize,split);
treetrace->Fill();
}
At the comand treetrace->Fill() I get a segmentation violation.
What could the reason be?
I'm running this on a hp system 10.
cheers
David