Commit 5bd07819 authored by Keerthi Nakkalil's avatar Keerthi Nakkalil
Browse files

Mergetree shows 4 trees, howver inly the last pixel entries are present

parent 0872d66c
//TFile* TPfile = new TFile("TP.root","update"); //TFile* TPfile = new TFile("TP.root","update");
TList* TPlist = new TList; //TList* TPlist = new TList;
void TreeEnergyWrite(){ void TreeEnergyWrite(){
...@@ -98,7 +98,7 @@ void TreeTPWrite(int c, int r){ ...@@ -98,7 +98,7 @@ void TreeTPWrite(int c, int r){
//Add new trees (incl voltage col) to list and merge the trees //Add new trees (incl voltage col) to list and merge the trees
//TList* TPlist = new TList; TList* TPlist = new TList;
std::cout << " The tree for the pixel " << c << " and " << r << " is added to the list " << std::endl; std::cout << " The tree for the pixel " << c << " and " << r << " is added to the list " << std::endl;
TPlist->Add(TPtree); TPlist->Add(TPtree);
TTree* newtree = TTree::MergeTrees(TPlist); TTree* newtree = TTree::MergeTrees(TPlist);
...@@ -107,7 +107,7 @@ void TreeTPWrite(int c, int r){ ...@@ -107,7 +107,7 @@ void TreeTPWrite(int c, int r){
newtree->SetDirectory(TPfile); newtree->SetDirectory(TPfile);
// Mergedtree = TTree::MergeTrees(TPlist); // Mergedtree = TTree::MergeTrees(TPlist);
// Mergedtree->Write("",TObject::kWriteDelete); // Mergedtree->Write("",TObject::kWriteDelete);
newtree->Write("",TObject::kWriteDelete); newtree->Write("",TObject::kWriteDelete);
TPfile->Close(); TPfile->Close();
//Efile->Close(); //Efile->Close();
...@@ -125,7 +125,7 @@ void TreeTest(){ ...@@ -125,7 +125,7 @@ void TreeTest(){
} }
} }
std::cout <<" The size of the tree list is " << TPlist->GetSize() << std::endl; //std::cout <<" The size of the tree list is " << TPlist->GetSize() << std::endl;
//TPfile->Close(); //TPfile->Close();
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment