autovoltageBranch=TPtree->Branch("voltage",&voltage,"voltage/D");// make a new branch and connect it to the same variable as the branch address of the energy tree
ETree->SetBranchAddress("Ecol1",&energy);
ETree->SetBranchAddress("Ecol4",&voltage);
for(inti=0;i<ETree->GetEntries();i++){
ETree->GetEntry(i);
...
...
@@ -64,12 +58,12 @@ void TreeTPWrite(int c, int r){
//std:: cout << " The TPfilenames are : " << TPfilename.c_str() <<std::endl;
std::ifstreamTPdatafile(TPfilename.c_str());
voltageBranch->Fill();
if(TPdatafile.is_open()){
std::cout<<" The data file "<<TPfilename.c_str()<<" is opened ..."<<std::endl;
// make a new branch and connect it to the same variable as the branch address of the energy tree