10 theHits =
new TClonesArray(
"RootSimHit");
11 theTree =
new TTree(treeName.c_str(),
"Neutron Background");
12 theTree->Bronch(
"Hits",
"TClonesArray", &theHits);
27 std::cout <<
"ENTRIES BEFORE " << theTree->GetEntries() << std::endl;
29 theHits->Expand(hits.size());
30 for(
unsigned int i = 0;
i < hits.size(); ++
i)
35 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