Fork me on GitHub

Ignore:
Timestamp:
Feb 2, 2009, 12:26:00 PM (16 years ago)
Author:
Xavier Rouby
Message:

passing all objects as references

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/Hector/src/H_AbstractBeamLine.cc

    r3 r216  
    134134}
    135135
    136 const TMatrix H_AbstractBeamLine::getPartialMatrix(const string elname, const float eloss, const float p_mass, const float p_charge) {
     136const TMatrix H_AbstractBeamLine::getPartialMatrix(const string& elname, const float eloss, const float p_mass, const float p_charge) {
    137137
    138138        vector<H_OpticalElement*>::iterator element_i;
     
    186186
    187187
    188 H_OpticalElement * H_AbstractBeamLine::getElement(const string el_name) {
     188H_OpticalElement * H_AbstractBeamLine::getElement(const string& el_name) {
    189189        for(unsigned int i=0; i < elements.size(); i++) {
    190190                if( (*(elements.begin()+i))->getName() == el_name )
     
    195195}
    196196
    197 H_OpticalElement * H_AbstractBeamLine::getElement(const string el_name) const {
     197H_OpticalElement * H_AbstractBeamLine::getElement(const string& el_name) const {
    198198        for(unsigned int i=0; i < elements.size(); i++) {
    199199                if( (*(elements.begin()+i))->getName() == el_name)
     
    435435}
    436436
    437 void H_AbstractBeamLine::moveElement(const string name, const float new_s) {
     437void H_AbstractBeamLine::moveElement(const string& name, const float new_s) {
    438438        /// @param name identifies the element to move
    439439        /// @param new_s is where to put it
     
    448448}
    449449
    450 void H_AbstractBeamLine::alignElement(const string name, const float disp_x, const float disp_y) {
     450void H_AbstractBeamLine::alignElement(const string& name, const float disp_x, const float disp_y) {
    451451        /// @param name identifies the element to move
    452452        /// @param disp_x identifies the displacement to add in x [\f$ \mu m \f$]
     
    464464}
    465465
    466 void H_AbstractBeamLine::tiltElement(const string name, const float ang_x, const float ang_y) {
     466void H_AbstractBeamLine::tiltElement(const string& name, const float ang_x, const float ang_y) {
    467467        /// @param name identifies the element to move
    468468        /// @param ang_x identifies the angle to add in x
Note: See TracChangeset for help on using the changeset viewer.