Import Geant4 10.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 12:08:39 +02:00
parent 286caacf06
commit c9b32a6c0a
5770 changed files with 1050949 additions and 367105 deletions
+27 -15
View File
@@ -24,35 +24,47 @@
// ********************************************************************
//
//
// $Id: G4AttDef.cc 66376 2012-12-18 09:42:59Z gcosmo $
// $Id: G4AttDef.cc 78955 2014-02-05 09:45:46Z gcosmo $
#include "G4AttDef.hh"
#include "G4AttDefStore.hh"
using namespace std;
// Deprecated - see header.
std::ostream& operator<<
(std::ostream& os, const std::map<G4String,G4AttDef>* definitions)
(std::ostream& os, const std::map<G4String,G4AttDef>* definitions)
{
using namespace std;
if (!definitions) {
os << "Deprecated output function. Use const reference equivalent." << endl;
if (definitions) {
os << *definitions;
} else {
os << "G4AttCheck: ERROR: zero definitions pointer." << endl;
return os;
}
return os;
}
std::ostream& operator<<
(std::ostream& os, const std::map<G4String,G4AttDef>& definitions)
{
G4String storeKey;
if (G4AttDefStore::GetStoreKey(definitions, storeKey)) {
if (G4AttDefStore::GetStoreKey(&definitions, storeKey)) {
os << storeKey << ":";
}
std::map<G4String,G4AttDef>::const_iterator i;
for (i = definitions->begin(); i != definitions->end(); ++i) {
if (i->second.GetCategory() == "Physics") {
os << "\n " << i->second.GetDesc()
<< " (" << i->first << "): ";
if (!i->second.GetExtra().empty()) {
if (i->second.GetExtra() != "G4BestUnit") os << "unit: ";
os << i->second.GetExtra() << " (";
for (i = definitions.begin(); i != definitions.end(); ++i) {
const G4String& name = i->first;
const G4AttDef& attDef = i->second;
if (attDef.GetCategory() == "Physics") {
os << "\n " << attDef.GetDesc()
<< " (" << name << "): ";
if (!attDef.GetExtra().empty()) {
if (attDef.GetExtra() != "G4BestUnit") os << "unit: ";
os << attDef.GetExtra() << " (";
}
os << i->second.GetValueType();
if (!i->second.GetExtra().empty()) os << ")";
os << attDef.GetValueType();
if (!attDef.GetExtra().empty()) os << ")";
}
}
os << endl;