Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:47:38

0001 {
0002 gROOT->Reset();
0003 #include "Riostream.h"
0004 
0005 ifstream in;
0006 
0007 in.open("diff_Xtalk_FileName");
0008 
0009 Int_t index;
0010 Float_t diffXtalkR;
0011 Float_t diffXtalkL;
0012 Float_t diffIntL;
0013 Float_t diffIntR;
0014 int i=0;
0015 Int_t nlines = 0;
0016 TFile *f = new TFile("RootFile","RECREATE");
0017 
0018 TNtuple *ntuple = new TNtuple("DiffXtalk","data from new ascii file","index:diffXtalkR:diffIntR:diffXtalkL:diffIntL");
0019 
0020 while (1) {
0021   i++;
0022   in >> index >> diffXtalkR >> diffIntR >> diffXtalkL >> diffIntL ;
0023   if (!in.good()) break;
0024 
0025   DiffXtalk->Fill(index,diffXtalkR,diffIntR,diffXtalkL,diffIntL);
0026   nlines++;
0027 }
0028 
0029 std::cout<<" found nr of lines: "<<nlines<<std::endl;
0030 
0031 in.close();
0032 f->Write();
0033 }