Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4AttDef.cc File Reference
#include "G4AttDef.hh"
#include "G4AttDefStore.hh"
Include dependency graph for G4AttDef.cc:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const std::map< G4String, G4AttDef > *definitions)
 
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 37 of file G4AttDef.cc.

38 {
39  os << "Deprecated output function. Use const reference equivalent." << endl;
40  if (definitions) {
41  os << *definitions;
42  } else {
43  os << "G4AttCheck: ERROR: zero definitions pointer." << endl;
44  }
45  return os;
46 }
std::ostream& operator<< ( std::ostream &  os,
const std::map< G4String, G4AttDef > &  definitions 
)

Definition at line 49 of file G4AttDef.cc.

50 {
51  G4String storeKey;
52  if (G4AttDefStore::GetStoreKey(&definitions, storeKey)) {
53  os << storeKey << ":";
54  }
55  std::map<G4String,G4AttDef>::const_iterator i;
56  for (i = definitions.begin(); i != definitions.end(); ++i) {
57  const G4String& name = i->first;
58  const G4AttDef& attDef = i->second;
59  if (attDef.GetCategory() == "Physics") {
60  os << "\n " << attDef.GetDesc()
61  << " (" << name << "): ";
62  if (!attDef.GetExtra().empty()) {
63  if (attDef.GetExtra() != "G4BestUnit") os << "unit: ";
64  os << attDef.GetExtra() << " (";
65  }
66  os << attDef.GetValueType();
67  if (!attDef.GetExtra().empty()) os << ")";
68  }
69  }
70  os << endl;
71  return os;
72 }
const XML_Char * name
Definition: expat.h:151
G4bool GetStoreKey(const std::map< G4String, G4AttDef > *definitions, G4String &key)
G4int first(char) const
const G4String & GetExtra() const
Definition: G4AttDef.hh:87
const G4String & GetValueType() const
Definition: G4AttDef.hh:88
const G4String & GetDesc() const
Definition: G4AttDef.hh:85
const G4String & GetCategory() const
Definition: G4AttDef.hh:86

Here is the call graph for this function: