Changeset 216 in svn for trunk/Utilities/Hector/src
- Timestamp:
- Feb 2, 2009, 12:26:00 PM (16 years ago)
- Location:
- trunk/Utilities/Hector/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/Hector/src/H_AbstractBeamLine.cc
r3 r216 134 134 } 135 135 136 const TMatrix H_AbstractBeamLine::getPartialMatrix(const string elname, const float eloss, const float p_mass, const float p_charge) {136 const TMatrix H_AbstractBeamLine::getPartialMatrix(const string& elname, const float eloss, const float p_mass, const float p_charge) { 137 137 138 138 vector<H_OpticalElement*>::iterator element_i; … … 186 186 187 187 188 H_OpticalElement * H_AbstractBeamLine::getElement(const string el_name) {188 H_OpticalElement * H_AbstractBeamLine::getElement(const string& el_name) { 189 189 for(unsigned int i=0; i < elements.size(); i++) { 190 190 if( (*(elements.begin()+i))->getName() == el_name ) … … 195 195 } 196 196 197 H_OpticalElement * H_AbstractBeamLine::getElement(const string el_name) const {197 H_OpticalElement * H_AbstractBeamLine::getElement(const string& el_name) const { 198 198 for(unsigned int i=0; i < elements.size(); i++) { 199 199 if( (*(elements.begin()+i))->getName() == el_name) … … 435 435 } 436 436 437 void H_AbstractBeamLine::moveElement(const string name, const float new_s) {437 void H_AbstractBeamLine::moveElement(const string& name, const float new_s) { 438 438 /// @param name identifies the element to move 439 439 /// @param new_s is where to put it … … 448 448 } 449 449 450 void H_AbstractBeamLine::alignElement(const string name, const float disp_x, const float disp_y) {450 void H_AbstractBeamLine::alignElement(const string& name, const float disp_x, const float disp_y) { 451 451 /// @param name identifies the element to move 452 452 /// @param disp_x identifies the displacement to add in x [\f$ \mu m \f$] … … 464 464 } 465 465 466 void H_AbstractBeamLine::tiltElement(const string name, const float ang_x, const float ang_y) {466 void H_AbstractBeamLine::tiltElement(const string& name, const float ang_x, const float ang_y) { 467 467 /// @param name identifies the element to move 468 468 /// @param ang_x identifies the angle to add in x -
trunk/Utilities/Hector/src/H_BeamLine.cc
r3 r216 68 68 } 69 69 70 void H_BeamLine::findIP(const string filename) {70 void H_BeamLine::findIP(const string& filename) { 71 71 findIP(filename,"IP5"); 72 72 return; 73 73 } 74 74 75 void H_BeamLine::findIP(const string filename, const stringipname) {75 void H_BeamLine::findIP(const string& filename, const string& ipname) { 76 76 // searches for the IP position in the extended table. 77 77 ifstream tabfile(filename.c_str()); … … 127 127 } 128 128 129 void H_BeamLine::fill(const string filename) {129 void H_BeamLine::fill(const string& filename) { 130 130 fill(filename,1,"IP5"); 131 131 return; … … 133 133 134 134 135 void H_BeamLine::fill(const string filename, const int dir, const stringipname) {135 void H_BeamLine::fill(const string& filename, const int dir, const string& ipname) { 136 136 string headers[40]; // table of all column headers 137 137 int header_type[40]; // table of all column types -
trunk/Utilities/Hector/src/H_BeamLineParser.cc
r3 r216 31 31 32 32 /// Identifies the column content from its header 33 int column_identification(const string header) {33 int column_identification(const string& header) { 34 34 // identifies the column type from its name 35 35 -
trunk/Utilities/Hector/src/H_BeamParticle.cc
r3 r216 444 444 } 445 445 446 void H_BeamParticle::propagate(const H_AbstractBeamLine * beam, const string el_name) {446 void H_BeamParticle::propagate(const H_AbstractBeamLine * beam, const string& el_name) { 447 447 propagate(beam->getElement(el_name)->getS()+beam->getElement(el_name)->getLength()); 448 448 return; -
trunk/Utilities/Hector/src/H_OpticalElement.cc
r3 r216 28 28 29 29 /// called by the constructors 30 void H_OpticalElement::init(const string nameE, const int typeE, const double s, const double k, const double l) {30 void H_OpticalElement::init(const string& nameE, const int typeE, const double s, const double k, const double l) { 31 31 // this is called by the constructors 32 32 // must be in public section ! … … 56 56 } 57 57 58 H_OpticalElement::H_OpticalElement(const string nameE, const int typeE, const double s, const double k, const double l) : element_aperture(new H_Aperture()) {58 H_OpticalElement::H_OpticalElement(const string& nameE, const int typeE, const double s, const double k, const double l) : element_aperture(new H_Aperture()) { 59 59 init(nameE,typeE,s,k,l); 60 60 } 61 61 62 H_OpticalElement::H_OpticalElement(const string nameE, const int typeE, const double s, const double k, const double l, H_Aperture* the_app) : element_aperture(the_app->clone()) {62 H_OpticalElement::H_OpticalElement(const string& nameE, const int typeE, const double s, const double k, const double l, H_Aperture* the_app) : element_aperture(the_app->clone()) { 63 63 init(nameE,typeE,s,k,l); 64 64 } -
trunk/Utilities/Hector/src/H_RectangularCollimator.cc
r3 r216 30 30 } 31 31 32 H_RectangularCollimator::H_RectangularCollimator(const string nameE, const double s, const double l) :H_Drift(nameE,s,l){32 H_RectangularCollimator::H_RectangularCollimator(const string& nameE, const double s, const double l) :H_Drift(nameE,s,l){ 33 33 type = RCOLLIMATOR; 34 34 init(); -
trunk/Utilities/Hector/src/H_RomanPot.cc
r3 r216 32 32 } 33 33 34 H_RomanPot::H_RomanPot(const string nameE, const double s, const double app) :H_Drift(nameE,s,RP_LENGTH){34 H_RomanPot::H_RomanPot(const string& nameE, const double s, const double app) :H_Drift(nameE,s,RP_LENGTH){ 35 35 type = RP; 36 36 init();
Note:
See TracChangeset
for help on using the changeset viewer.