Classes | Namespaces | Functions
EDepSimVolumeId.hh File Reference
#include <vector>
#include <ostream>
#include <G4VPhysicalVolume.hh>
#include <G4TouchableHandle.hh>

Go to the source code of this file.

Classes

class  EDepSim::VolumeId
 
class  EDepSim::VolumeId::Volume
 

Namespaces

 EDepSim
 Construct a module from components.
 

Functions

bool operator== (const EDepSim::VolumeId &x, const EDepSim::VolumeId &y)
 
bool operator== (const EDepSim::VolumeId &x, const G4TouchableHandle &y)
 
bool operator== (const G4TouchableHandle &x, const EDepSim::VolumeId &y)
 
bool operator!= (const EDepSim::VolumeId &x, const EDepSim::VolumeId &y)
 
bool operator!= (const EDepSim::VolumeId &x, const G4TouchableHandle &y)
 
bool operator!= (const G4TouchableHandle &x, const EDepSim::VolumeId &y)
 
bool operator< (const EDepSim::VolumeId &x, const EDepSim::VolumeId &y)
 
std::ostream & operator<< (std::ostream &stream, const EDepSim::VolumeId &v)
 

Function Documentation

bool operator!= ( const EDepSim::VolumeId x,
const EDepSim::VolumeId y 
)

Definition at line 67 of file EDepSimVolumeId.cc.

67  {
68  return !(x==y);
69 }
bool operator!= ( const EDepSim::VolumeId x,
const G4TouchableHandle &  y 
)

Definition at line 93 of file EDepSimVolumeId.cc.

93  {
94  return !(x==y);
95 }
bool operator!= ( const G4TouchableHandle &  x,
const EDepSim::VolumeId y 
)

Definition at line 97 of file EDepSimVolumeId.cc.

97  {
98  return !(y==x);
99 }
list x
Definition: train.py:276
bool operator< ( const EDepSim::VolumeId x,
const EDepSim::VolumeId y 
)

Definition at line 101 of file EDepSimVolumeId.cc.

101  {
102  if (x.fVolumes.size() < y.fVolumes.size()) return true;
103  if (x.fVolumes.size() > y.fVolumes.size()) return false;
106  for (a = x.fVolumes.begin(), b = y.fVolumes.begin();
107  a != x.fVolumes.end();
108  ++a, ++b) {
109  if (a->fHandle < b->fHandle) return true;
110  if (a->fHandle > b->fHandle) return false;
111  if (a->fHandle == b->fHandle) {
112  if (a->fReplica < b->fReplica) return true;
113  if (a->fReplica > b->fReplica) return false;
114  }
115  }
116  return false;
117 }
intermediate_table::const_iterator const_iterator
const double a
static bool * b
Definition: config.cpp:1043
std::ostream& operator<< ( std::ostream &  stream,
const EDepSim::VolumeId v 
)

Definition at line 119 of file EDepSimVolumeId.cc.

119  {
121  stream<< "<VolumeId ";
122  if (v.fVolumes.size()<1) {
123  stream << "empty>";
124  return stream;
125  }
126  if (!v.fVolumes.front().fHandle) {
127  stream << "null>";
128  return stream;
129  }
130  stream << v.fVolumes.front().fHandle->GetName() << ">";
131  return stream;
132 }
intermediate_table::const_iterator const_iterator
static bool * b
Definition: config.cpp:1043
bool operator== ( const EDepSim::VolumeId x,
const EDepSim::VolumeId y 
)

Definition at line 54 of file EDepSimVolumeId.cc.

54  {
55  if (x.fVolumes.size() != y.fVolumes.size()) return false;
58  for (a = x.fVolumes.begin(), b = y.fVolumes.begin();
59  a != x.fVolumes.end();
60  ++a, ++b) {
61  if (a->fHandle != b->fHandle) return false;
62  if (a->fReplica != b->fReplica) return false;
63  }
64  return true;
65 }
intermediate_table::const_iterator const_iterator
const double a
static bool * b
Definition: config.cpp:1043
bool operator== ( const EDepSim::VolumeId x,
const G4TouchableHandle &  y 
)

Definition at line 71 of file EDepSimVolumeId.cc.

71  {
72  unsigned int historyDepth = y->GetHistoryDepth();
73  if (x.fVolumes.size() != historyDepth) return false;
75  int b;
76  for (a = x.fVolumes.begin(), b=0;
77  a != x.fVolumes.end() && b < 4;
78  ++a, ++b) {
79  if (a->fHandle != y->GetVolume(b)) {
80  return false;
81  }
82  if (a->fReplica != y->GetReplicaNumber(b)) {
83  return false;
84  }
85  }
86  return true;
87 }
intermediate_table::const_iterator const_iterator
const double a
static bool * b
Definition: config.cpp:1043
bool operator== ( const G4TouchableHandle &  x,
const EDepSim::VolumeId y 
)

Definition at line 89 of file EDepSimVolumeId.cc.

89  {
90  return (y==x);
91 }
list x
Definition: train.py:276