~durga/maus/rel709

« back to all changes in this revision

Viewing changes to src/legacy/Config/MiceModule.cc

  • Committer: Durga Rajaram
  • Date: 2013-10-01 00:19:57 UTC
  • mfrom: (659.1.74 rc)
  • Revision ID: durga@fnal.gov-20131001001957-iswih60vis9rodw0
Tags: MAUS-v0.7.1
MAUS-v0.7.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
 
63
63
MiceModule* MiceModule::deepCopy(const MiceModule& rhs, bool insertInMother)
64
64
{
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;
74
76
 
75
 
   for(unsigned int i=0; i<rhs._daughters.size(); i++)
76
 
   {
 
77
    for(unsigned int i=0; i<rhs._daughters.size(); i++)
 
78
    {
77
79
       mod->_daughters.push_back(deepCopy( *(rhs._daughters[i]) ));
78
80
       mod->_daughters[i]->_mother = mod;
79
 
   }
80
 
   if(insertInMother && mod->_mother) 
 
81
    }
 
82
    if(insertInMother && mod->_mother) 
81
83
      mod->_mother->_daughters.push_back(mod);
82
84
 
83
 
   return mod;
 
85
    return mod;
84
86
}
85
87
 
86
88
void    MiceModule::checkNames()
536
538
  catch(Squeal squee)
537
539
  {
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"));
540
542
  }
541
543
 
542
544
  return prop_h3v;