GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » CbmRootManager
Re: CbmRootManager [message #5500 is a reply to message #5495] Tue, 27 November 2007 16:54 Go to previous messageGo to previous message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *gsi.de
What is your input file?

you should have something like that inside of
the Init method -----
like

InitStatus PndTofHitProducerIdeal::Init()
{

// Get input array
fPointarray = (TClonesArray*) ioman->GetObject("TofPoint");

//TofPoint is the branchname you want to read from
//input file

if ( ! fPointArray )
{
std::cout << "-W- PndTofHitProducerIdeal::Init: "
<< "No TofPoint array!" << std::endl;
return kERROR;
}

and then, you define where you want to save the output

//Create and register output array
fHitArray = new TClonesArray("PndTofHit");
ioman->Register("TofHit", "Tof", fHitArray, kTRUE);

return kSUCCESS;
}


In Exec to get fPointarray information,

// Loop over TofPoints
Int_t nPoints = fPointArray->GetEntriesFast();

for (Int_t iPoint = 0; iPoint < nPoints; iPoint++)
{
point = (PndTofPoint*) fPointArray->At(iPoint);

// Create new hit
new ((*fHitArray)[iPoint]) PndTofHit(trackID, detID,
point->GetDetName(),time, t1, position,dpos,iPoint, point->GetEnergyLoss(),1);

}

i hope it can help you

cheers
alicia.


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New external packages and major update of FairRoot
Next Topic: Happy new year and best wishes for 2008!!!
Goto Forum:
  


Current Time: Fri Mar 29 07:36:11 CET 2024

Total time taken to generate the page: 0.00975 seconds