8 theHits =
new TClonesArray(
"RootSimHit");
9 theTree =
new TTree(treeName.c_str(),
"Neutron Background");
10 theTree->Bronch(
"Hits",
"TClonesArray", &theHits);
21 std::cout <<
"ENTRIES BEFORE " << theTree->GetEntries() << std::endl;
23 theHits->Expand(hits.size());
24 for (
unsigned int i = 0;
i < hits.size(); ++
i) {
28 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