- Timestamp:
- Apr 17, 2009, 10:58:56 AM (15 years ago)
- Location:
- trunk/source/persistency/gdml
- Files:
-
- 34 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/persistency/gdml/History
r921 r987 1 $Id: History,v 1. 98 2009/01/23 10:41:12gcosmo Exp $1 $Id: History,v 1.101 2009/02/26 10:13:49 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 26 February 2009 Tatiana Nikitina (gdml-V09-02-04) 21 - Corrected treatment of brackets and indeces for matrices in G4GDMLEvaluator. 22 Fixes problem report #1048. 23 24 24 February 2009 Gabriele Cosmo (gdml-V09-02-03) 25 - Removed useless 'const' qualifier from GetAuxMap() signature. 26 27 19 February 2009 Gabriele Cosmo (gdml-V09-02-02) 28 - Fix in G4GDMLStructure class for missing caching of auxiliary information 29 from child modules, causing auxiliary information defined within separated 30 modules to get lost and therefore not assigned to volumes. 31 Fixes problem report #1049. 19 32 20 33 23 January 2009 Gabriele Cosmo (gdml-V09-02-01) -
trunk/source/persistency/gdml/include/G4GDMLEvaluator.hh
r850 r987 26 26 // 27 27 // $Id: G4GDMLEvaluator.hh,v 1.16 2008/07/16 15:46:33 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // -
trunk/source/persistency/gdml/include/G4GDMLParser.hh
r921 r987 26 26 // 27 27 // $Id: G4GDMLParser.hh,v 1.57 2009/01/22 11:02:07 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // -
trunk/source/persistency/gdml/src/G4GDMLEvaluator.cc
r850 r987 25 25 // 26 26 // 27 // $Id: G4GDMLEvaluator.cc,v 1.2 0 2008/07/16 15:46:34gcosmo Exp $27 // $Id: G4GDMLEvaluator.cc,v 1.22 2009/02/26 10:13:35 gcosmo Exp $ 28 28 // GEANT4 tag $ Name:$ 29 29 // … … 144 144 G4String G4GDMLEvaluator::SolveBrackets(const G4String& in) 145 145 { 146 const std::string::size_type open = in.find("[",0); 147 const std::string::size_type close = in.find("]",0); 146 std::string::size_type full = in.size(); 147 std::string::size_type open = in.find("[",0); 148 std::string::size_type close = in.find("]",0); 148 149 149 150 if (open==close) { return in; } … … 158 159 std::string::size_type begin = open; 159 160 std::string::size_type end = 0; 160 161 std::string::size_type end1 = 0; 161 162 std::string out; 162 163 out.append(in,0,open); 164 165 do // Loop for all possible matrix elements in 'in' 166 { 167 do // SolveBrackets for one matrix element 168 { 169 end = in.find(",",begin+1); 170 end1= in.find("]",begin+1); 171 if (end>end1) { end = end1; } 172 if (end==std::string::npos) { end = close;} 173 174 std::stringstream indexStream; 175 indexStream << "_" << EvaluateInteger(in.substr(begin+1,end-begin-1))-1; 176 177 out.append(indexStream.str()); 178 179 begin = end; 180 181 } while (end<close); 182 183 if (full==close) { return out; } 184 185 open = in.find("[",begin); 186 close = in.find("]",begin+1); 187 188 if (open==close) { out.append(in.substr(end+1,full-end-1)); return out; } 189 out.append(in.substr(end+1,open-end-1)); 190 191 begin=open; 192 193 } while (close<full); 163 194 164 do165 {166 end = in.find(",",begin+1);167 if (end==std::string::npos) { end = close; }168 169 std::stringstream indexStream;170 indexStream << "_" << EvaluateInteger(in.substr(begin+1,end-begin-1));171 172 out.append(indexStream.str());173 174 begin = end;175 176 } while (end<close);177 178 195 return out; 179 196 }
Note: See TracChangeset
for help on using the changeset viewer.