GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Out of memory problem in EmcPoint - FairLink ?
Re: Out of memory problem in EmcPoint - FairLink ? [message #10905 is a reply to message #10897] Fri, 06 August 2010 09:57 Go to previous messageGo to previous message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *pool.mediaWays.net
Mohammad wrote

Quote:


FairModule::ExpandNode(TGeoNode*) (FairModule.cxx:293)
-> M->SetDefaultName();


Here I am not sure! the method (M->SetDefaultName()) is doing much more than setting a name, it check the type of transformation, prepend a letter corresponding to the type and finally append the index of the transformation to the current GeoManager. and in any case we are speaking about 100 kB per session. So I do not believe that this is a big problem, I agree it has to be solved but we still have much worse problems.



Hi,

I think we just could copy this function and change the way of setting the name. This would look like that:
void FairModule::SetDefaultMatrixName(TGeoMatrix* matrix)
{
  // Copied from root TGeoMatrix::SetDefaultName() and modified (memory leak)
  // If no name was supplied in the ctor, the type of transformation is checked.
  // A letter will be prepended to the name :
  //   t - translation
  //   r - rotation
  //   s - scale
  //   c - combi (translation + rotation)
  //   g - general (tr+rot+scale)
  // The index of the transformation in gGeoManager list of transformations will
  // be appended.
  if (!gGeoManager) return;
  if (strlen(matrix->GetName())) return;
  char type = 'n';
  if (matrix->IsTranslation()) type = 't'; 
  if (matrix->IsRotation()) type = 'r';
  if (matrix->IsScale()) type = 's';
  if (matrix->IsCombi()) type = 'c';
  if (matrix->IsGeneral()) type = 'g';
  TObjArray *matrices = gGeoManager->GetListOfMatrices();
  Int_t index = 0;
  if (matrices) index =matrices->GetEntriesFast() - 1;
  matrix->SetName(Form("%c%i", type, index));
}


Kind regards, Ralf.
 
Read Message icon8.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon4.gif
Read Message
Read Message
Read Message
Read Message
Read Message icon7.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Compilation problem of trunk
Next Topic: Error during PndTpcElectronicsTask
Goto Forum:
  


Current Time: Tue Apr 23 21:05:31 CEST 2024

Total time taken to generate the page: 0.01602 seconds