Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:18:57

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","RECREATE");
0011   TTree* t= new TTree("t","t");
0012   Setup* s;
0013   s=Setup::getInstance();
0014   t->Branch("setup",&s);
0015   s->set(33.,2.);
0016   t->Fill();
0017   t->Write();
0018   std::cout<<s->get1()<<"\t"<<s->get2()<<std::endl;
0019   f->Close();
0020   return 0;
0021 }