Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4TrajectoriesModel.cc File Reference
#include "G4TrajectoriesModel.hh"
#include "G4ModelingParameters.hh"
#include "G4VGraphicsScene.hh"
#include "G4Event.hh"
#include "G4AttDefStore.hh"
#include "G4AttValue.hh"
#include "G4AttDef.hh"
#include "G4AttCheck.hh"
#include "G4UIcommand.hh"
#include "G4VVisManager.hh"
#include "G4VTrajectoryPoint.hh"

Go to the source code of this file.

Functions

void G4TrajectoriesModelDebugG4AttValues (const G4VTrajectory *)
 

Function Documentation

◆ G4TrajectoriesModelDebugG4AttValues()

void G4TrajectoriesModelDebugG4AttValues ( const G4VTrajectory pTraj)

Definition at line 157 of file G4TrajectoriesModel.cc.

158{
159 // Trajectory attributes
160 { // Scope bracket - allows re-use of names without compiler warnings.
161 std::vector<G4AttValue>* attValues = pTraj->CreateAttValues();
162 if (attValues) {
163 G4AttCheck attCheck(attValues, pTraj->GetAttDefs());
164 G4cout << "\nProvided G4Atts:\n" << attCheck;
165 if (attCheck.Check()) G4cout << "Error" << G4endl;
166 else {
167 std::vector<G4AttValue> standardValues;
168 std::map<G4String,G4AttDef> standardDefinitions;
169 attCheck.Standard(&standardValues, &standardDefinitions);
170 G4cout << "\nStandard G4Atts:\n"
171 << G4AttCheck(&standardValues, &standardDefinitions);
172 }
173 delete attValues;
174 }
175 }
176 // Trajectory point attributes
177 for (G4int i = 0; i < pTraj->GetPointEntries(); i++) {
178 G4VTrajectoryPoint* aPoint = pTraj->GetPoint(i);
179 std::vector<G4AttValue>* attValues = aPoint->CreateAttValues();
180 if (attValues) {
181 G4AttCheck attCheck(attValues, aPoint->GetAttDefs());
182 G4cout << "\nProvided G4Atts:\n" << attCheck;
183 if (attCheck.Check()) G4cout << "Error" << G4endl;
184 else {
185 std::vector<G4AttValue> standardValues;
186 std::map<G4String,G4AttDef> standardDefinitions;
187 attCheck.Standard(&standardValues, &standardDefinitions);
188 G4cout << "\nStandard G4Atts:\n"
189 << G4AttCheck(&standardValues, &standardDefinitions);
190 }
191 delete attValues;
192 }
193 }
194}
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
virtual std::vector< G4AttValue > * CreateAttValues() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual G4VTrajectoryPoint * GetPoint(G4int i) const =0
virtual int GetPointEntries() const =0
virtual std::vector< G4AttValue > * CreateAttValues() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const