Message: GetName() output problem with G4cout Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question GetName() output problem with G4cout 

Forum: Event and Track Management
Date: 01 Jun, 2011
From: Dylan <Dylan>

I have noticed that the following debug G4cout statements in CCaloSD.cc of the example 'composite_calorimeter' seem to cease after a call to GetName():

G4cout << "CCaloSD createNewHit for"
         << " PV "     << CurrentPV->GetName()
         << " PVid = " << currentCopyNo
         << " MVid = " << motherCopyNo
         << " Unit "   << UnitID <<G4endl;
  G4cout << " primary "    << PrimaryID
         << " time slice " << TSliceID 
         << " For Track  " << theTrack->GetTrackID()
         << " which is a " <<  theTrack->GetDefinition()->GetParticleName();

The lines:

 << " PVid = " << currentCopyNo
         << " MVid = " << motherCopyNo
         << " Unit "   << UnitID <<G4endl;

are not executed (there is no output "PVid = ", etc.) and execution/output continues with the next G4cout statement.

Is this behavior inherent to GetName(), or G4String? This has happened in other parts of code I've been working with and I'd like to know what's causing it and fix it. Does anyone know what's happening here?

Regards,

Dylan

 Add Message Add Message
to: "GetName() output problem with G4cout"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]