Hello, I’m trying to extract the data from Branch named as Psd_All_Shift. Those data are Column ROOT::VecOps::RVec<UShort_t> has type ROOT::VecOps::RVec<UShort_t>
.
TTree::Scan(“Psd_All_Shift”) returns me :
wish is exacltly what i’m looking for. ROW is my event number, Instance is my detector, and Psd_All_S is the bin where my neutron/gamma has been detected.
I’ve tried this code to extract those data :
TFile f("RAW148OS_treeFF01.root");
std::unique_ptr<TTree> tree(dynamic_cast<TTree*>(f.Get("Analysis_All")));
ROOT::EnableImplicitMT(); // Enable ROOT's implicit multi-threading
ROOT::RDataFrame d("Analysis_All", "RAW148OS_treeFF01.root"); // Interface to TTree and TChain
// Obtention d'un vecteur de données à partir de l'élément "Psd_All_Shift" de l'arbre
auto rvec = d.Take<ROOT::RVec<UShort_t>>("Psd_All_Shift");
// Affichage des valeurs de rvec
for (const auto& value : rvec) {
std::cout << value << std::endl;
}
wish returns me :
as you can see, it doesn’t makes sens and doesn’t match with the tree->Scan().
Does anyone know why ?
By the way, I’m a real begginer on root, I’ve read the manual as much as possible but here i’m stuck.
Thanks !