Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:15:42

0001 #include <iostream>
0002 #include <Rtypes.h>
0003 #include <TFile.h>
0004 #include <TTree.h>
0005 #include "./Setup.h"
0006 
0007 Setup* Setup::instance=nullptr;
0008 
0009 int main(int argc,char* argv[]){
0010   TFile* f = new TFile("Dummy.root","READ");
0011   //TFile* f = new TFile("Dummy.root","UPDATE");
0012   TTree* t= (TTree*)f->Get("t");
0013   Setup* s;
0014   s=Setup::getInstance();
0015   t->SetBranchAddress("setup",&s);
0016   t->GetEntry(0);
0017   //s->set(1.,2.);
0018   //t->Fill();
0019   //t->Write();
0020   //s->setPed(42.);
0021   //t->Refresh();
0022   std::cout<<s->get1()<<"\t"<<s->get2()<<"\t"<<s->getP()<<std::endl;
0023   //t->Write("",TObject::kOverwrite);
0024   f->Close();
0025   return 0;
0026 }