GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » Moving the Geometry from data file to the parameters
Re: Moving the Geometry from data file to the parameters [message #9528 is a reply to message #9440] Wed, 07 October 2009 18:47 Go to previous messageGo to previous message
Dima Melnychuk is currently offline  Dima Melnychuk
Messages: 213
Registered: April 2004
Location: National Centre for Nucle...
first-grade participant
From: *fuw.edu.pl
Hi Mohammad,

I tried to access geometry from the parameter file in the following way:

	gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
	gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C");
	rootlogon();
	basiclibs();
	
	FairRunAna *fRun= new FairRunAna();
	fRun->SetInputFile("sim_emc.root");
	fRun->SetOutputFile("test.root");
	fRun->Init();
	
	TString parFile = "simparams.root"; 
	FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
	FairParRootFileIo* parInput1 = new FairParRootFileIo();
	parInput1->open(parFile.Data());
	rtdb->setFirstInput(parInput1);
	
	
	FairBaseParSet* par=(FairBaseParSet*) (rtdb->getContainer("FairBaseParSet"));
	geom = par->GetGeometry(); 


sim_emc.root and simparams.root are files produced by /macro/emc/sim_emc.C

I supposed that "geom" should be a pointer to TGeoManager. But it is 0 in this case. What is wrong here?

I tried to create emc initialization task to initialize properly EmcMapper and I need access to TGeoManager there.

Dima
 
Read Message
Read Message icon14.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New version of DPM
Next Topic: GENFIT restructuring in development branch is done - merge needed
Goto Forum:
  


Current Time: Fri Mar 29 03:24:17 CET 2024

Total time taken to generate the page: 0.01014 seconds