60 const G4bool& visible)
const
62 Draw(
object, visible);
82 G4cout<<
"G4TrajectoryDrawByCharge drawer named "<<
Name();
83 G4cout<<
", drawing trajectory with charge, "<<charge<<
G4endl;
94 ostr<<
"G4TrajectoryDrawByCharge model "<<
Name() <<
" colour scheme: "<<std::endl;
96 ostr<<
"Default configuration:"<<
G4endl;
103 fMap.
Set(charge, colour);
109 fMap[charge] = colour;
117 if (!ConvertToCharge(charge, myCharge)) {
119 ed <<
"Invalid charge "<<charge;
121 (
"G4TrajectoryDrawByCharge::Set(const G4int& charge, const G4String& colour)",
"modeling0121",
JustWarning, ed);
125 return Set(myCharge, colour);
133 if (!ConvertToCharge(charge, myCharge)) {
135 ed <<
"Invalid charge "<<charge;
137 (
"G4TrajectoryDrawByCharge::Set(const G4int& charge, const G4Colour& colour)",
"modeling0122",
JustWarning, ed);
140 return Set(myCharge, colour);
144G4TrajectoryDrawByCharge::ConvertToCharge(
const G4String&
string, Charge& myCharge)
149 std::istringstream is(
string.c_str());
G4DLLIMPORT std::ostream G4cout
bool GetColour(const T &, G4Colour &) const
void Print(std::ostream &ostr) const
void Set(const T &, const G4Colour &)
virtual void Draw(const G4VTrajectory &trajectory, const G4int &i_mode=0, const G4bool &visible=true) const
virtual void Print(std::ostream &ostr) const
virtual ~G4TrajectoryDrawByCharge()
G4TrajectoryDrawByCharge(const G4String &name="Unspecified", G4VisTrajContext *context=0)
void Set(const Charge &charge, const G4Colour &colour)
const G4VisTrajContext & GetContext() const
G4bool GetVerbose() const
virtual G4double GetCharge() const =0
void SetLineColour(const G4Colour &colour)
void SetVisible(const G4bool &visible)
void Print(std::ostream &ostr) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::ostringstream G4ExceptionDescription
void DrawLineAndPoints(const G4VTrajectory &traj, const G4VisTrajContext &, const G4int &i_mode)