Skip to content
Snippets Groups Projects
Commit 730ede84 authored by zhang's avatar zhang
Browse files

04/11/2010

1) Delete unused functions: get_hcorr/vcorr/bpm/qt_number( ).
parent eb10ba29
Branches
Tags
No related merge requests found
......@@ -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++;
/* SOLEIL print out lattice functions, with all the optical information for the lattice with design values */
printlatt();
printglob();
}
}
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;
}
/****************************************************************************/
/* 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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment