7 theHits =
new TClonesArray(
"RootSimHit");
8 theTree =
new TTree(treeName.c_str(),
"Neutron Background");
9 theTree->Bronch(
"Hits",
"TClonesArray", &theHits);
24 std::cout <<
"ENTRIES BEFORE " << theTree->GetEntries() << std::endl;
26 theHits->Expand(hits.size());
27 for(
unsigned int i = 0;
i < hits.size(); ++
i)
32 std::cout <<
"ENTRIES AFTER " << theTree->GetEntries() << std::endl;
RootChamberWriter()
default ctor, for STL
~RootChamberWriter()
writes the tree, and deletes everything
void write(const edm::PSimHitContainer &hits)
std::vector< PSimHit > PSimHitContainer