Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/persistency/ascii/src/G4tgrMaterialFactory.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /persistency/ascii/src/G4tgrMaterialFactory.cc (Version 11.3.0) and /persistency/ascii/src/G4tgrMaterialFactory.cc (Version 11.2)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 // G4tgrMaterialFactory implementation             26 // G4tgrMaterialFactory implementation
 27 //                                                 27 //
 28 // Author: P.Arce, CIEMAT (November 2007)          28 // Author: P.Arce, CIEMAT (November 2007)
 29 // -------------------------------------------     29 // --------------------------------------------------------------------
 30                                                    30 
 31 #include "G4tgrMaterialFactory.hh"                 31 #include "G4tgrMaterialFactory.hh"
 32 #include "G4tgrUtils.hh"                           32 #include "G4tgrUtils.hh"
 33 #include "G4tgrElementSimple.hh"                   33 #include "G4tgrElementSimple.hh"
 34 #include "G4tgrElementFromIsotopes.hh"             34 #include "G4tgrElementFromIsotopes.hh"
 35 #include "G4tgrMaterialSimple.hh"                  35 #include "G4tgrMaterialSimple.hh"
 36 #include "G4tgrMaterialMixture.hh"                 36 #include "G4tgrMaterialMixture.hh"
 37 #include "G4tgrFileReader.hh"                      37 #include "G4tgrFileReader.hh"
 38 #include "G4tgrMessenger.hh"                       38 #include "G4tgrMessenger.hh"
 39                                                    39 
 40 G4ThreadLocal G4tgrMaterialFactory* G4tgrMater     40 G4ThreadLocal G4tgrMaterialFactory* G4tgrMaterialFactory::theInstance = nullptr;
 41                                                    41 
 42 // -------------------------------------------     42 // --------------------------------------------------------------------
 43 G4tgrMaterialFactory::G4tgrMaterialFactory()       43 G4tgrMaterialFactory::G4tgrMaterialFactory()
 44 {                                                  44 {
 45 }                                                  45 }
 46                                                    46 
 47 // -------------------------------------------     47 // --------------------------------------------------------------------
 48 G4tgrMaterialFactory* G4tgrMaterialFactory::Ge     48 G4tgrMaterialFactory* G4tgrMaterialFactory::GetInstance()
 49 {                                                  49 {
 50   if(theInstance == nullptr)                       50   if(theInstance == nullptr)
 51   {                                                51   {
 52     theInstance = new G4tgrMaterialFactory;        52     theInstance = new G4tgrMaterialFactory;
 53   }                                                53   }
 54   return theInstance;                              54   return theInstance;
 55 }                                                  55 }
 56                                                    56 
 57 // -------------------------------------------     57 // --------------------------------------------------------------------
 58 G4tgrMaterialFactory::~G4tgrMaterialFactory()      58 G4tgrMaterialFactory::~G4tgrMaterialFactory()
 59 {                                                  59 {
 60   for(auto isotcite = theG4tgrIsotopes.cbegin(     60   for(auto isotcite = theG4tgrIsotopes.cbegin();
 61            isotcite != theG4tgrIsotopes.cend()     61            isotcite != theG4tgrIsotopes.cend(); ++isotcite)
 62   {                                                62   {
 63     delete(*isotcite).second;                      63     delete(*isotcite).second;
 64   }                                                64   }
 65   theG4tgrIsotopes.clear();                        65   theG4tgrIsotopes.clear();
 66                                                    66 
 67   for(auto elemcite = theG4tgrElements.cbegin(     67   for(auto elemcite = theG4tgrElements.cbegin();
 68            elemcite != theG4tgrElements.cend()     68            elemcite != theG4tgrElements.cend(); ++elemcite)
 69   {                                                69   {
 70     delete(*elemcite).second;                      70     delete(*elemcite).second;
 71   }                                                71   }
 72   theG4tgrElements.clear();                        72   theG4tgrElements.clear();
 73                                                    73 
 74   for(auto matcite = theG4tgrMaterials.cbegin(     74   for(auto matcite = theG4tgrMaterials.cbegin();
 75            matcite != theG4tgrMaterials.cend()     75            matcite != theG4tgrMaterials.cend(); ++matcite)
 76   {                                                76   {
 77     delete(*matcite).second;                       77     delete(*matcite).second;
 78   }                                                78   }
 79   theG4tgrMaterials.clear();                       79   theG4tgrMaterials.clear();
 80   delete theInstance;                              80   delete theInstance;
 81 }                                                  81 }
 82                                                    82 
 83 // -------------------------------------------     83 // --------------------------------------------------------------------
 84 G4tgrIsotope* G4tgrMaterialFactory::AddIsotope     84 G4tgrIsotope* G4tgrMaterialFactory::AddIsotope(const std::vector<G4String>& wl)
 85 {                                                  85 {
 86   //---------- Look if isotope exists              86   //---------- Look if isotope exists
 87   if(FindIsotope(G4tgrUtils::GetString(wl[1]))     87   if(FindIsotope(G4tgrUtils::GetString(wl[1])) != 0)
 88   {                                                88   {
 89     ErrorAlreadyExists("isotope", wl);             89     ErrorAlreadyExists("isotope", wl);
 90   }                                                90   }
 91                                                    91 
 92   G4tgrIsotope* isot = new G4tgrIsotope(wl);       92   G4tgrIsotope* isot = new G4tgrIsotope(wl);
 93   theG4tgrIsotopes[isot->GetName()] = isot;        93   theG4tgrIsotopes[isot->GetName()] = isot;
 94                                                    94 
 95   return isot;                                     95   return isot;
 96 }                                                  96 }
 97                                                    97 
 98 // -------------------------------------------     98 // --------------------------------------------------------------------
 99 G4tgrElementSimple*                                99 G4tgrElementSimple*
100 G4tgrMaterialFactory::AddElementSimple(const s    100 G4tgrMaterialFactory::AddElementSimple(const std::vector<G4String>& wl)
101 {                                                 101 {
102   //---------- Look if element exists             102   //---------- Look if element exists
103   if(FindElement(G4tgrUtils::GetString(wl[1]))    103   if(FindElement(G4tgrUtils::GetString(wl[1])) != 0)
104   {                                               104   {
105     ErrorAlreadyExists("element", wl);            105     ErrorAlreadyExists("element", wl);
106   }                                               106   }
107                                                   107 
108   G4tgrElementSimple* elem = new G4tgrElementS    108   G4tgrElementSimple* elem = new G4tgrElementSimple(wl);
109   theG4tgrElements[elem->GetName()] = elem;       109   theG4tgrElements[elem->GetName()] = elem;
110                                                   110 
111   return elem;                                    111   return elem;
112 }                                                 112 }
113                                                   113 
114 // -------------------------------------------    114 // --------------------------------------------------------------------
115 G4tgrElementFromIsotopes*                         115 G4tgrElementFromIsotopes*
116 G4tgrMaterialFactory::AddElementFromIsotopes(c    116 G4tgrMaterialFactory::AddElementFromIsotopes(const std::vector<G4String>& wl)
117 {                                                 117 {
118   //---------- Look if element exists             118   //---------- Look if element exists
119   if(FindElement(G4tgrUtils::GetString(wl[1]))    119   if(FindElement(G4tgrUtils::GetString(wl[1])) != 0)
120   {                                               120   {
121     ErrorAlreadyExists("element", wl);            121     ErrorAlreadyExists("element", wl);
122   }                                               122   }
123                                                   123 
124   G4tgrElementFromIsotopes* elem = new G4tgrEl    124   G4tgrElementFromIsotopes* elem = new G4tgrElementFromIsotopes(wl);
125   theG4tgrElements[elem->GetName()] = elem;       125   theG4tgrElements[elem->GetName()] = elem;
126                                                   126 
127   return elem;                                    127   return elem;
128 }                                                 128 }
129                                                   129 
130 // -------------------------------------------    130 // --------------------------------------------------------------------
131 G4tgrMaterialSimple*                              131 G4tgrMaterialSimple*
132 G4tgrMaterialFactory::AddMaterialSimple(const     132 G4tgrMaterialFactory::AddMaterialSimple(const std::vector<G4String>& wl)
133 {                                                 133 {
134 #ifdef G4VERBOSE                                  134 #ifdef G4VERBOSE
135   if(G4tgrMessenger::GetVerboseLevel() >= 2)      135   if(G4tgrMessenger::GetVerboseLevel() >= 2)
136   {                                               136   {
137     G4cout << " G4tgrMaterialFactory::AddMater    137     G4cout << " G4tgrMaterialFactory::AddMaterialSimple" << wl[1] << G4endl;
138   }                                               138   }
139 #endif                                            139 #endif
140                                                   140 
141   //---------- Look if material exists            141   //---------- Look if material exists
142   if(FindMaterial(G4tgrUtils::GetString(wl[1])    142   if(FindMaterial(G4tgrUtils::GetString(wl[1])) != 0)
143   {                                               143   {
144     ErrorAlreadyExists("material simple", wl);    144     ErrorAlreadyExists("material simple", wl);
145   }                                               145   }
146                                                   146 
147   G4tgrMaterialSimple* mate = new G4tgrMateria    147   G4tgrMaterialSimple* mate = new G4tgrMaterialSimple("MaterialSimple", wl);
148                                                   148 
149   //---------- register this material             149   //---------- register this material
150   theG4tgrMaterials[mate->GetName()] = mate;      150   theG4tgrMaterials[mate->GetName()] = mate;
151                                                   151 
152   return mate;                                    152   return mate;
153 }                                                 153 }
154                                                   154 
155 // -------------------------------------------    155 // --------------------------------------------------------------------
156 G4tgrMaterialMixture*                             156 G4tgrMaterialMixture*
157 G4tgrMaterialFactory::AddMaterialMixture(const    157 G4tgrMaterialFactory::AddMaterialMixture(const std::vector<G4String>& wl,
158                                          const    158                                          const G4String& mixtType)
159 {                                                 159 {
160 #ifdef G4VERBOSE                                  160 #ifdef G4VERBOSE
161   if(G4tgrMessenger::GetVerboseLevel() >= 2)      161   if(G4tgrMessenger::GetVerboseLevel() >= 2)
162   {                                               162   {
163     G4cout << " G4tgrMaterialFactory::AddMater    163     G4cout << " G4tgrMaterialFactory::AddMaterialMixture " << wl[1] << G4endl;
164   }                                               164   }
165 #endif                                            165 #endif
166                                                   166 
167   //---------- Look if material already exists    167   //---------- Look if material already exists
168   if(FindMaterial(G4tgrUtils::GetString(wl[1])    168   if(FindMaterial(G4tgrUtils::GetString(wl[1])) != 0)
169   {                                               169   {
170     ErrorAlreadyExists("material mixture", wl)    170     ErrorAlreadyExists("material mixture", wl);
171   }                                               171   }
172                                                   172 
173   G4tgrMaterialMixture* mate;                     173   G4tgrMaterialMixture* mate;
174   mate = new G4tgrMaterialMixture(mixtType, wl    174   mate = new G4tgrMaterialMixture(mixtType, wl);
175                                                   175 
176   //---------- register this material             176   //---------- register this material
177   theG4tgrMaterials[mate->GetName()] = mate;      177   theG4tgrMaterials[mate->GetName()] = mate;
178                                                   178 
179   return mate;                                    179   return mate;
180 }                                                 180 }
181                                                   181 
182 // -------------------------------------------    182 // --------------------------------------------------------------------
183 G4tgrIsotope* G4tgrMaterialFactory::FindIsotop    183 G4tgrIsotope* G4tgrMaterialFactory::FindIsotope(const G4String& name) const
184 {                                                 184 {
185 #ifdef G4VERBOSE                                  185 #ifdef G4VERBOSE
186   if(G4tgrMessenger::GetVerboseLevel() >= 3)      186   if(G4tgrMessenger::GetVerboseLevel() >= 3)
187   {                                               187   {
188     G4cout << " G4tgrMaterialFactory::FindIsot    188     G4cout << " G4tgrMaterialFactory::FindIsotope() - " << name << G4endl;
189   }                                               189   }
190 #endif                                            190 #endif
191                                                   191 
192   G4mstgrisot::const_iterator cite;               192   G4mstgrisot::const_iterator cite;
193   cite = theG4tgrIsotopes.find(name);             193   cite = theG4tgrIsotopes.find(name);
194   if(cite == theG4tgrIsotopes.cend())             194   if(cite == theG4tgrIsotopes.cend())
195   {                                               195   {
196     return nullptr;                               196     return nullptr;
197   }                                               197   }
198   else                                            198   else
199   {                                               199   {
200 #ifdef G4VERBOSE                                  200 #ifdef G4VERBOSE
201     if(G4tgrMessenger::GetVerboseLevel() >= 3)    201     if(G4tgrMessenger::GetVerboseLevel() >= 3)
202     {                                             202     {
203       G4cout << " G4tgrIsotope found: " << ((*    203       G4cout << " G4tgrIsotope found: " << ((*cite).second)->GetName()
204              << G4endl;                           204              << G4endl;
205     }                                             205     }
206 #endif                                            206 #endif
207     return (*cite).second;                        207     return (*cite).second;
208   }                                               208   }
209 }                                                 209 }
210                                                   210 
211 // -------------------------------------------    211 // --------------------------------------------------------------------
212 G4tgrElement* G4tgrMaterialFactory::FindElemen    212 G4tgrElement* G4tgrMaterialFactory::FindElement(const G4String& name) const
213 {                                                 213 {
214 #ifdef G4VERBOSE                                  214 #ifdef G4VERBOSE
215   if(G4tgrMessenger::GetVerboseLevel() >= 3)      215   if(G4tgrMessenger::GetVerboseLevel() >= 3)
216   {                                               216   {
217     G4cout << " G4tgrMaterialFactory::FindElem    217     G4cout << " G4tgrMaterialFactory::FindElement() - " << name << G4endl;
218   }                                               218   }
219 #endif                                            219 #endif
220   G4mstgrelem::const_iterator cite;               220   G4mstgrelem::const_iterator cite;
221   cite = theG4tgrElements.find(name);             221   cite = theG4tgrElements.find(name);
222   if(cite == theG4tgrElements.cend())             222   if(cite == theG4tgrElements.cend())
223   {                                               223   {
224     return nullptr;                               224     return nullptr;
225   }                                               225   }
226   else                                            226   else
227   {                                               227   {
228 #ifdef G4VERBOSE                                  228 #ifdef G4VERBOSE
229     if(G4tgrMessenger::GetVerboseLevel() >= 3)    229     if(G4tgrMessenger::GetVerboseLevel() >= 3)
230     {                                             230     {
231       DumpElementList();                          231       DumpElementList();
232       G4cout << " G4tgrElement found: " << ((*    232       G4cout << " G4tgrElement found: " << ((*cite).second)->GetName()
233              << G4endl;                           233              << G4endl;
234     }                                             234     }
235 #endif                                            235 #endif
236     return (*cite).second;                        236     return (*cite).second;
237   }                                               237   }
238 }                                                 238 }
239                                                   239 
240 // -------------------------------------------    240 // --------------------------------------------------------------------
241 G4tgrMaterial* G4tgrMaterialFactory::FindMater    241 G4tgrMaterial* G4tgrMaterialFactory::FindMaterial(const G4String& name) const
242 {                                                 242 {
243 #ifdef G4VERBOSE                                  243 #ifdef G4VERBOSE
244   if(G4tgrMessenger::GetVerboseLevel() >= 3)      244   if(G4tgrMessenger::GetVerboseLevel() >= 3)
245   {                                               245   {
246     G4cout << " G4tgrMaterialFactory::FindMate    246     G4cout << " G4tgrMaterialFactory::FindMaterial() - " << name << G4endl;
247   }                                               247   }
248 #endif                                            248 #endif
249   G4mstgrmate::const_iterator cite;               249   G4mstgrmate::const_iterator cite;
250   cite = theG4tgrMaterials.find(name);            250   cite = theG4tgrMaterials.find(name);
251   if(cite == theG4tgrMaterials.cend())            251   if(cite == theG4tgrMaterials.cend())
252   {                                               252   {
253     return nullptr;                               253     return nullptr;
254   }                                               254   }
255   else                                            255   else
256   {                                               256   {
257     return (*cite).second;                        257     return (*cite).second;
258   }                                               258   }
259 }                                                 259 }
260                                                   260 
261 // -------------------------------------------    261 // --------------------------------------------------------------------
262 void G4tgrMaterialFactory::DumpIsotopeList() c    262 void G4tgrMaterialFactory::DumpIsotopeList() const
263 {                                                 263 {
264   G4cout << " @@@@@@@@@@@@@@@@ DUMPING G4tgrIs    264   G4cout << " @@@@@@@@@@@@@@@@ DUMPING G4tgrIsotope's List " << G4endl;
265   for(auto cite = theG4tgrIsotopes.cbegin();      265   for(auto cite = theG4tgrIsotopes.cbegin();
266            cite != theG4tgrIsotopes.cend(); ++    266            cite != theG4tgrIsotopes.cend(); ++cite)
267   {                                               267   {
268     G4cout << " ISOT: " << (*cite).second->Get    268     G4cout << " ISOT: " << (*cite).second->GetName() << G4endl;
269   }                                               269   }
270 }                                                 270 }
271                                                   271 
272 // -------------------------------------------    272 // --------------------------------------------------------------------
273 void G4tgrMaterialFactory::DumpElementList() c    273 void G4tgrMaterialFactory::DumpElementList() const
274 {                                                 274 {
275   G4cout << " @@@@@@@@@@@@@@@@ DUMPING G4tgrEl    275   G4cout << " @@@@@@@@@@@@@@@@ DUMPING G4tgrElement's List " << G4endl;
276   for(auto cite = theG4tgrElements.cbegin();      276   for(auto cite = theG4tgrElements.cbegin();
277            cite != theG4tgrElements.cend(); ++    277            cite != theG4tgrElements.cend(); ++cite)
278   {                                               278   {
279     G4cout << " ELEM: " << (*cite).second->Get    279     G4cout << " ELEM: " << (*cite).second->GetName() << G4endl;
280   }                                               280   }
281 }                                                 281 }
282                                                   282 
283 // -------------------------------------------    283 // --------------------------------------------------------------------
284 void G4tgrMaterialFactory::DumpMaterialList()     284 void G4tgrMaterialFactory::DumpMaterialList() const
285 {                                                 285 {
286   G4cout << " @@@@@@@@@@@@@@@@ DUMPING G4tgrMa    286   G4cout << " @@@@@@@@@@@@@@@@ DUMPING G4tgrMaterial's List " << G4endl;
287   for(auto cite = theG4tgrMaterials.cbegin();     287   for(auto cite = theG4tgrMaterials.cbegin();
288            cite != theG4tgrMaterials.cend(); +    288            cite != theG4tgrMaterials.cend(); ++cite)
289   {                                               289   {
290     G4tgrMaterial* mate = (*cite).second;         290     G4tgrMaterial* mate = (*cite).second;
291     G4cout << " MATE: " << mate->GetName() <<     291     G4cout << " MATE: " << mate->GetName() << " Type: " << mate->GetType()
292            << " NoComponents= " << mate->GetNu    292            << " NoComponents= " << mate->GetNumberOfComponents() << G4endl;
293   }                                               293   }
294 }                                                 294 }
295                                                   295 
296 // -------------------------------------------    296 // --------------------------------------------------------------------
297 void G4tgrMaterialFactory::ErrorAlreadyExists(    297 void G4tgrMaterialFactory::ErrorAlreadyExists(const G4String& object,
298                                                   298                                               const std::vector<G4String>& wl,
299                                                   299                                               const G4bool bNoRepeating)
300 {                                                 300 {
301   G4String msg = object + G4String(" repeated"    301   G4String msg = object + G4String(" repeated");
302   if(bNoRepeating)                                302   if(bNoRepeating)
303   {                                               303   {
304     G4tgrUtils::DumpVS(wl, (G4String("!!!! EXI    304     G4tgrUtils::DumpVS(wl, (G4String("!!!! EXITING: ") + msg).c_str());
305     G4Exception("G4tgrMaterialFactory", "Fatal    305     G4Exception("G4tgrMaterialFactory", "FatalError", FatalException,
306                 "Aborting...");                   306                 "Aborting...");
307   }                                               307   }
308   else                                            308   else
309   {                                               309   {
310 #ifdef G4VERBOSE                                  310 #ifdef G4VERBOSE
311     if(G4tgrMessenger::GetVerboseLevel() >= 1)    311     if(G4tgrMessenger::GetVerboseLevel() >= 1)
312     {                                             312     {
313       G4tgrUtils::DumpVS(wl, (G4String("!! WAR    313       G4tgrUtils::DumpVS(wl, (G4String("!! WARNING: ") + msg).c_str());
314     }                                             314     }
315 #endif                                            315 #endif
316   }                                               316   }
317 }                                                 317 }
318                                                   318