From 730ede842d8ff9eb3a49fd46300f505139a0dfc6 Mon Sep 17 00:00:00 2001 From: zhang <zhang@9a6e40ed-f3a0-4838-9b4a-bf418f78e88d> Date: Thu, 4 Nov 2010 14:26:06 +0000 Subject: [PATCH] 04/11/2010 1) Delete unused functions: get_hcorr/vcorr/bpm/qt_number( ). --- tracy/tracy/src/soleilcommon.cc | 182 +------------------------------- 1 file changed, 4 insertions(+), 178 deletions(-) diff --git a/tracy/tracy/src/soleilcommon.cc b/tracy/tracy/src/soleilcommon.cc index ea68ed4..29f2267 100644 --- a/tracy/tracy/src/soleilcommon.cc +++ b/tracy/tracy/src/soleilcommon.cc @@ -105,7 +105,7 @@ void Read_Lattice(char *fic) fprintf(stdout, "ReadLattice: Error while opening file %s \n", fic_maille); - fprintf(stdout, "The lattice file has to end by .lat \n"); + fprintf(stdout, "The lattice file name is wrong! \n"); exit(1); } @@ -213,186 +213,12 @@ void Read_Lattice(char *fic) TransTwiss(alpha, beta, eta, etap, codvect); } } - -} - - -/****************************************************************************/ -/* long get_bpm_number(void) - - Purpose: called by Read_Lattice - Compute number of bpm in the lattice - The bpm name has to begin with 'bpm' - - Input: - none - - Output: - bpm bpm number found into the lattice - - Return: - none - - Global variables: - none - - specific functions: - none - - Comments: - none - -****************************************************************************/ -long get_bpm_number(void) -{ - int i; - int nbpm = 0; - CellType Cell; - - for (i = 0; i < globval.Cell_nLoc; i++) - { - getelem(i, &Cell); /* get element */ - if (strncmp(Cell.Elem.PName, "bpm", 3) == 0) - { - globval.bpm_list[nbpm] = (long) i; - nbpm++; - } - } - return (long) nbpm; -} - -/****************************************************************************/ -/* long get_hcorr_number(void) - - Purpose: called by Read_Lattice - Compute number of corrector into the lattice - The corrector name has to begin with 'ch' - - Input: - none - - Output: - corrector number found in the lattice - - Return: - none - - Global variables: - none - - specific functions: - none - - Comments: - none - -****************************************************************************/ -long get_hcorr_number(void) -{ - int i; - int nb = 0; - CellType Cell; - - for (i = 0; i < globval.Cell_nLoc; i++) - { - getelem(i, &Cell); /* get element */ - if (strncmp(Cell.Elem.PName, "ch", 2) == 0) - { - globval.hcorr_list[nb] = (long)i; - nb++; - } - } - return (long) nb; -} - -/****************************************************************************/ -/* long get_vcorr_number(void) - - Purpose: called by Read_Lattice - Compute number of vertical corrector in the lattice - The corrector name has to begin with 'cv' - - Input: - none - - Output: - corrector number found into the lattice - - Return: - none - - Global variables: - none - - specific functions: - none - - Comments: - none - -****************************************************************************/ -long get_vcorr_number(void) -{ - int i; - int nb = 0; - CellType Cell; - - for (i = 0; i <= globval.Cell_nLoc; i++) - { - getelem(i, &Cell); /* get element */ - if (strncmp(Cell.Elem.PName, "cv", 2) == 0) - { - globval.vcorr_list[nb] = (long) i; - nb++; - } - } - return (long) nb; + /* SOLEIL print out lattice functions, with all the optical information for the lattice with design values */ + printlatt(); + printglob(); } -/****************************************************************************/ -/* long get_qt_number(void) - - Purpose: called by Read_Lattice - Compute number of skew quadrupoles in the lattice - The skew quad name has to begin with 'qt' - - Input: - none - - Output: - skew quadrupole number found into the lattice - - Return: - none - - Global variables: - none - specific functions: - none - - Comments: - none - -****************************************************************************/ -long get_qt_number(void) -{ - int i; - long nb = 0L; - CellType Cell; - - for (i = 0; i <= globval.Cell_nLoc; i++) - { - getelem(i, &Cell); /* get element */ - if (strncmp(Cell.Elem.PName, "qt", 2) == 0) - { - globval.qt_list[nb] = i; - Cell.Elem.M->Porder = 2L; - nb++; - } - } - return nb; -} -- GitLab