G4AttDef.cc File Reference

#include "G4AttDef.hh"
#include "G4AttDefStore.hh"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const std::map< G4String, G4AttDef > *definitions)


Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const std::map< G4String, G4AttDef > *  definitions 
)

Definition at line 34 of file G4AttDef.cc.

References G4String::first(), and G4AttDefStore::GetStoreKey().

00035 {
00036   using namespace std;
00037   if (!definitions) {
00038     os << "G4AttCheck: ERROR: zero definitions pointer." << endl;
00039     return os;
00040   }
00041   G4String storeKey;
00042   if (G4AttDefStore::GetStoreKey(definitions, storeKey)) {
00043     os << storeKey << ":";
00044   }
00045   std::map<G4String,G4AttDef>::const_iterator i;
00046   for (i = definitions->begin(); i != definitions->end(); ++i) {
00047     if (i->second.GetCategory() == "Physics") {
00048       os << "\n  " << i->second.GetDesc()
00049              << " (" << i->first << "): ";
00050       if (!i->second.GetExtra().empty()) {
00051         if (i->second.GetExtra() != "G4BestUnit") os << "unit: ";
00052         os << i->second.GetExtra() << " (";
00053       }
00054       os << i->second.GetValueType();
00055       if (!i->second.GetExtra().empty()) os << ")";
00056     }
00057   }
00058   os << endl;
00059   return os;
00060 }


Generated on Mon May 27 17:50:38 2013 for Geant4 by  doxygen 1.4.7