~christopher-hunt08/maus/maus_integrated_kalman

« back to all changes in this revision

Viewing changes to src/common_cpp/Simulation/MAUSGeant4Manager.hh

  • Committer: Chris Rogers
  • Date: 2013-08-15 11:58:30 UTC
  • mto: (663.6.290 merge)
  • mto: This revision was merged to the branch mainline in revision 688.
  • Revision ID: chris.rogers@stfc.ac.uk-20130815115830-nwnyts6d6k46iueq
Might pass tests now

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
 
96
96
    /** @brief Set the VirtualPlanes
97
97
     *
98
 
     *  Nb: this loses the pointer to the original virtual planes - so if caller
99
 
     *  don't want to keep them, caller must delete the original virtual planes.
 
98
     *  MAUSGeant4Manager takes ownership of memory allocated to the planes
100
99
     */
101
 
    void SetVirtualPlanes(VirtualPlaneManager* virt) {_virtPlanes = virt;}
 
100
    inline void SetVirtualPlanes(VirtualPlaneManager* virt);
102
101
 
103
102
    /** @brief Phased fields in the geometry (e.g. RF cavities)
104
103
     *
183
182
    static bool _isClosed;
184
183
};
185
184
 
 
185
inline void MAUSGeant4Manager::SetVirtualPlanes(VirtualPlaneManager* virt) {
 
186
    if (_virtPlanes != NULL)
 
187
        delete _virtPlanes;
 
188
    _virtPlanes = virt;
 
189
}
186
190
}  // namespace MAUS
187
191
 
188
192
#endif  // _SRC_CPP_CORE_SIMULATION_MAUSGEANT4MANAGER_HH_