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
0012 TTree* t= (TTree*)f->Get("t");
0013 Setup* s;
0014 s=Setup::getInstance();
0015 t->SetBranchAddress("setup",&s);
0016 t->GetEntry(0);
0017
0018
0019
0020
0021
0022 std::cout<<s->get1()<<"\t"<<s->get2()<<"\t"<<s->getP()<<std::endl;
0023
0024 f->Close();
0025 return 0;
0026 }