45 ,fWarnedMissingAttribute(false)
51 ContextMap::iterator iter = fContextMap.begin();
53 while (iter != fContextMap.end()) {
64 const G4bool& visible)
const
66 Draw(
object, visible);
71 const G4bool& visible)
const
76 if (!fWarnedMissingAttribute) {
78 ed<<
"Null attribute name";
82 fWarnedMissingAttribute =
true;
98 static G4bool warnedUnableToExtract =
false;
99 if (!warnedUnableToExtract) {
101 ed <<
"Unable to extract attribute definition named "<<fAttName;
103 (
"G4TrajectoryDrawByAttribute::Draw",
104 "modeling0117",
JustWarning, ed,
"Invalid attribute name");
105 G4cout <<
"Available attributes:\n"
106 <<
object.GetAttDefs();
107 warnedUnableToExtract =
true;
114 assert (0 != filter);
118 ContextMap::const_iterator iter = fContextMap.begin();
120 while (iter != fContextMap.end()) {
121 if (iter->first.second == G4TrajectoryDrawByAttribute::Interval) {
124 else if (iter->first.second == G4TrajectoryDrawByAttribute::SingleValue) {
136 static G4bool warnedUnableToExtract =
false;
137 if (!warnedUnableToExtract) {
139 ed <<
"Unable to extract attribute value named "<<fAttName;
141 (
"G4TrajectoryDrawByAttribute::Draw",
142 "modeling0118",
JustWarning, ed,
"Invalid attribute name");
143 G4cout <<
"Available attributes:\n"
144 <<
object.GetAttDefs();
145 warnedUnableToExtract =
true;
159 ContextMap::const_iterator iter = fContextMap.begin();
163 while (!gotContext && (iter != fContextMap.end())) {
164 if (iter->first.first == key) {
165 myContext = *(iter->second);
177 G4cout<<
"G4TrajectoryDrawByAttribute drawer named "<<
Name();
178 G4cout<<
", drawing style selected according to value of attribute "<<fAttName;
190 ostr<<
"G4TrajectoryDrawByAttribute, dumping configuration for model named "<<
Name() <<
":"<<std::endl;;
192 ostr<<
"Default configuration:"<<
G4endl;
195 ostr<<
"\nAttribute name "<<fAttName<<std::endl;
196 ostr<<
"\nKey<->Context map dump:"<<std::endl;
198 ContextMap::const_iterator iter = fContextMap.begin();
200 while (iter != fContextMap.end()) {
201 ostr<<
"Context for key "<<iter->first.first<<
":"<<std::endl;
202 iter->second->Print(ostr);
218 std::pair<G4String, Config> myPair(name, G4TrajectoryDrawByAttribute::Interval);
220 ContextMap::iterator iter = fContextMap.find(myPair);
222 if (iter != fContextMap.end()) {
224 ed <<
"Interval "<< name <<
" already exists";
226 (
"G4TrajectoryDrawByAttribute::AddIntervalContext",
237 std::pair<G4String, Config> myPair(name, G4TrajectoryDrawByAttribute::SingleValue);
239 ContextMap::iterator iter = fContextMap.find(myPair);
241 if (iter != fContextMap.end()) {
243 ed <<
"Single value "<< name <<
" already exists";
245 (
"G4TrajectoryDrawByAttribute::AddSingleValueContext",