51 if (aPointAttDefs->find(
"PostVPath") != aPointAttDefs->end()) {
54 const auto& richTrajectory = traj;
59 for (
const auto& item: fMap.GetBasicMap()) {
60 soughtPVName = item.first;
61 for (
G4int iPoint = 0; iPoint < richTrajectory.GetPointEntries(); iPoint++) {
65 std::vector<G4AttValue>::const_iterator iAtt;
66 for (iAtt = attValues->begin(); iAtt != attValues->end(); ++iAtt) {
67 if (iAtt->GetName() ==
"PostVPath" &&
68 G4StrUtil::contains(iAtt->GetValue(), soughtPVName))
break;
70 if (iAtt != attValues->end()) {
71 fMap.GetColour(soughtPVName, colour);
83 <<
"G4TrajectoryDrawByEncounteredVolume drawer named " <<
Name()
84 <<
", drawing trajectory touching physical volume " << soughtPVName
85 <<
", with configuration:" <<
G4endl;
94 ed <<
"Requires G4RichTrajectory - \"/vis/scene/add/trajectories rich\"";
96 (
"G4TrajectoryDrawByEncounteredVolume::Draw(const G4VTrajectory& traj,...",
111 ed <<
"G4Colour with key "<<colour<<
" does not exist ";
113 (
"G4TrajectoryDrawByEncounteredParticleID::SetDefault(const G4String& colour)",
130 fMap.Set(pvname, colour);
136 fMap[pvname] = colour;
143 <<
"G4TrajectoryDrawByEncounteredVolume model "<<
Name()
144 <<
", colour scheme: "
145 <<
", Default " << fDefault
150 ostr <<
"Default configuration:" << std::endl;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
static G4bool GetColour(const G4String &key, G4Colour &result)
virtual void Print(std::ostream &ostr) const
G4TrajectoryDrawByEncounteredVolume(const G4String &name="Unspecified", G4VisTrajContext *context=0)
void SetDefault(const G4String &)
virtual void Draw(const G4VTrajectory &trajectory, const G4bool &visible=true) const
void Set(const G4String &pvname, const G4String &colour)
virtual ~G4TrajectoryDrawByEncounteredVolume()
G4VTrajectoryModel(const G4String &name, G4VisTrajContext *fpContext=0)
const G4VisTrajContext & GetContext() const
G4bool GetVerbose() const
virtual std::vector< G4AttValue > * CreateAttValues() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual G4VTrajectoryPoint * GetPoint(G4int i) const =0
void SetLineColour(const G4Colour &colour)
void Print(std::ostream &ostr) const
void DrawLineAndPoints(const G4VTrajectory &traj, const G4VisTrajContext &)