63
63
MiceModule* MiceModule::deepCopy(const MiceModule& rhs, bool insertInMother)
65
MiceModule * mod = new MiceModule();
66
mod->_isroot = rhs._isroot;
67
mod->_name = rhs._name;
68
mod->_mother = rhs._mother;
69
mod->_bools = rhs._bools;
70
mod->_ints = rhs._ints;
71
mod->_doubles = rhs._doubles;
72
mod->_strings = rhs._strings;
73
mod->_hep3vectors = rhs._hep3vectors;
65
MiceModule * mod = new MiceModule();
66
mod->_isroot = rhs._isroot;
67
mod->_name = rhs._name;
68
mod->_mother = rhs._mother;
69
mod->_rotation = rhs._rotation;
70
mod->_bools = rhs._bools;
71
mod->_ints = rhs._ints;
72
mod->_doubles = rhs._doubles;
73
mod->_strings = rhs._strings;
74
mod->_hep3vectors = rhs._hep3vectors;
75
mod->_parameters = rhs._parameters;
75
for(unsigned int i=0; i<rhs._daughters.size(); i++)
77
for(unsigned int i=0; i<rhs._daughters.size(); i++)
77
79
mod->_daughters.push_back(deepCopy( *(rhs._daughters[i]) ));
78
80
mod->_daughters[i]->_mother = mod;
80
if(insertInMother && mod->_mother)
82
if(insertInMother && mod->_mother)
81
83
mod->_mother->_daughters.push_back(mod);
86
88
void MiceModule::checkNames()
536
538
catch(Squeal squee)
538
540
std::string error = squee.GetMessage();
539
throw(Squeal(Squeal::recoverable, "Error parsing MiceModule "+fullName()+" property "+property+". Error was reported as \'"+error+"\'", "MiceModule::propertyDouble"));
541
throw(Squeal(Squeal::recoverable, "Error parsing MiceModule "+fullName()+" property "+property+". Error was reported as \'"+error+"\'", "MiceModule::propertyHep3Vector"));