Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4AttDef.hh File Reference
#include "globals.hh"
#include "G4TypeKey.hh"
#include <map>

Go to the source code of this file.

Classes

class  G4AttDef
 

Functions

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

Function Documentation

◆ operator<<()

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

Definition at line 33 of file G4AttDef.cc.

35{
36 using namespace std;
37 if (!definitions) {
38 os << "G4AttCheck: ERROR: zero definitions pointer." << endl;
39 return os;
40 }
41 G4String storeKey;
42 if (G4AttDefStore::GetStoreKey(definitions, storeKey)) {
43 os << storeKey << ":";
44 }
45 std::map<G4String,G4AttDef>::const_iterator i;
46 for (i = definitions->begin(); i != definitions->end(); ++i) {
47 if (i->second.GetCategory() == "Physics") {
48 os << "\n " << i->second.GetDesc()
49 << " (" << i->first << "): ";
50 if (!i->second.GetExtra().empty()) {
51 if (i->second.GetExtra() != "G4BestUnit") os << "unit: ";
52 os << i->second.GetExtra() << " (";
53 }
54 os << i->second.GetValueType();
55 if (!i->second.GetExtra().empty()) os << ")";
56 }
57 }
58 os << endl;
59 return os;
60}
G4int first(char) const
G4bool GetStoreKey(const std::map< G4String, G4AttDef > *definitions, G4String &key)