I am wondering if you can do this in root easily (copy histogram contents and reconstruct the original vector).
I am saving waveforms in ntuple and hbook format to organize data but when I need to analyze them
they have to be put back to vectors. The above paw scheme can do the job well but you need to
run copy.f and one internal command cannot do it. I hope root can do it more easily.
In ROOT you can get the ‘vector’ as an array of double:tree->SetEstimate(-1); // retain all data
tree->Draw("age","","goff"); // populate array
double *array = tree->GetV1();or you could use:Long_t age; // Assuming, __for example__ the age is in a long and that the branch was created via a leaflist.
tree->SetBranchAddress("age",&age);
for(Long64_t entry = 0; entry < tree->GetEntries(); ++entry) {
tree->GetEntry(entry);
myvector.push_back(age);
}