Geant4 11.2.2
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 "G4RunManager.hh"
#include "G4RunManagerFactory.hh"
#include "G4Run.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 134 of file G4TrajectoriesModel.cc.

135{
136 // Trajectory attributes
137 { // Scope bracket - allows re-use of names without compiler warnings.
138 std::vector<G4AttValue>* attValues = pTraj->CreateAttValues();
139 if (attValues) {
140 G4AttCheck attCheck(attValues, pTraj->GetAttDefs());
141 G4cout << "\nProvided G4Atts:\n" << attCheck;
142 if (attCheck.Check()) G4cout << "Error" << G4endl;
143 else {
144 std::vector<G4AttValue> standardValues;
145 std::map<G4String,G4AttDef> standardDefinitions;
146 attCheck.Standard(&standardValues, &standardDefinitions);
147 G4cout << "\nStandard G4Atts:\n"
148 << G4AttCheck(&standardValues, &standardDefinitions);
149 }
150 delete attValues;
151 }
152 }
153 // Trajectory point attributes
154 for (G4int i = 0; i < pTraj->GetPointEntries(); ++i) {
155 G4VTrajectoryPoint* aPoint = pTraj->GetPoint(i);
156 std::vector<G4AttValue>* attValues = aPoint->CreateAttValues();
157 if (attValues) {
158 G4AttCheck attCheck(attValues, aPoint->GetAttDefs());
159 G4cout << "\nProvided G4Atts:\n" << attCheck;
160 if (attCheck.Check()) G4cout << "Error" << G4endl;
161 else {
162 std::vector<G4AttValue> standardValues;
163 std::map<G4String,G4AttDef> standardDefinitions;
164 attCheck.Standard(&standardValues, &standardDefinitions);
165 G4cout << "\nStandard G4Atts:\n"
166 << G4AttCheck(&standardValues, &standardDefinitions);
167 }
168 delete attValues;
169 }
170 }
171}
int G4int
Definition G4Types.hh:85
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL 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 G4int GetPointEntries() const =0
virtual std::vector< G4AttValue > * CreateAttValues() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const