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_Matrix_FileName");
0008 
0009 Int_t index;
0010 Float_t diffElem33,diffElem34,diffElem44,diffElem35,diffElem45,diffElem55,diffElem46,diffElem56,diffElem66,diffElem57,diffElem67,diffElem77;
0011 int i=0;
0012 Int_t nlines = 0;
0013 TFile *f = new TFile("RootFile","RECREATE");
0014 
0015 TNtuple *ntuple = new TNtuple("DiffMatrix","data from new ascii file","index:diffElem33:diffElem34:diffElem44:diffElem35:diffElem45:diffElem55:diffElem46:diffElem56:diffElem66:diffElem57:diffElem67:diffElem77");
0016 
0017 while (1) {
0018   i++;
0019   in >> index >> diffElem33 >> diffElem34 >> diffElem44 >> diffElem35 >> diffElem45 >> diffElem55 >> diffElem46 >> diffElem56 >> diffElem66 >> diffElem57 >> diffElem67 >> diffElem77 ;
0020   if (!in.good()) break;
0021 
0022   DiffMatrix->Fill(index,diffElem33,diffElem34,diffElem44,diffElem35,diffElem45,diffElem55,diffElem46,diffElem56,diffElem66,diffElem57,diffElem67,diffElem77);
0023   nlines++;
0024 }
0025 
0026 std::cout<<" found nr of lines: "<<nlines<<std::endl;
0027 
0028 in.close();
0029 f->Write();
0030 }
0031 
0032