ROOT Version: 6.08/06
Platform: CentOS Linux 7 (Core)
I’m following the beginner ROOT guide on storing arbitrary N-Tuples (7.2.3), and would like to know if there is a cleaner / easier way to branch many variables without having to explicitly write out each branch? See code below
double dsRatio, p1pps, m1pps, p1p0s, m1p0s, p1pms, m1pms,
p1ppd, m1ppd, p1p0d, m1p0d, p1pmd, m1pmd, p1p, m1p;
double paramArray[] = {dsRatio, p1pps, m1pps, p1p0s, m1p0s, p1pms, m1pms,
p1ppd, m1ppd, p1p0d, m1p0d, p1pmd, m1pmd, p1p, m1p;}
TTree *paramVals = new TTree("paramVals", "paramVals");
paramVals->Branch("dsRatio", &dsRatio, "dsRatio/D");
paramVals->Branch("p1pps", &p1pps, "p1pps/D");
// rest of variable branches here...
Is there a built in way of handling this? Doing variable name to string conversion seems generally frowned upon in my searches.