/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/src/analyse/Iro/merge_ntuples.C

Go to the documentation of this file.
00001 #include <iostream>
00002 #include <cmath>
00003 #include <string>
00004 
00005 #include "TChain.h"
00006 #include "TFile.h"
00007 #include "TString.h"
00008 
00009 void merge_ntuples(){
00010   
00011   TString energy[13]={"715695","715692","715699","715702","715747","715748","715750","715752","715754","715756","715757","715758","715759"};
00012   
00013   TChain *chain = new TChain("Pions");
00014   
00015   for (int i=0; i<13; i++){
00016     TString filename ="/home1/karyotak/MyData/rootfiles/DSTPions"+energy[i]+"EM.root";
00017     cout << i << " " << filename << endl;
00018     chain->Add(filename);
00019   }
00020   chain->Draw("Ebeam");
00021   TFile *f1=new TFile("DSTPionsAllEM.root","recreate");
00022   f1->cd();
00023   chain->Write();
00024 }

Generated on Mon Jan 7 13:15:21 2013 for MicromegasFramework by  doxygen 1.4.7