source: PSPA/madxPSPA/src/mad_sodd.c @ 447

Last change on this file since 447 was 430, checked in by touze, 11 years ago

import madx-5.01.00

File size: 3.5 KB
Line 
1#include "madx.h"
2
3void
4exec_sodd(struct in_cmd* cmd)
5{
6  struct name_list* nl_sodd = NULL;
7  int ierr,pos,nosixtrack;
8
9  /* use correct beam for sequence to be plotted - HG 031127 */
10  struct command* keep_beam = current_beam;
11
12
13  if (attach_beam(current_sequ) == 0)
14    fatal_error("TWISS - sequence without beam:", current_sequ->name);
15  /* end part1 of HG 031127 */
16
17  /* <JMJ 7/11/2002> The following ifndef exclusion is a quick fix so that
18     the WIN32 version
19     does not try to do X11 graphics. However this has the consequence that
20     the program will not make Postscript files.  HG needs to separate these things.
21     </JMJ 7/11/2002> */
22  /*FS 27.03.2004 works now on Windows using gxx11ps.F and gxx11psc.c courtesy HG */
23
24  /* get nosixtrack */
25
26  if (this_cmd != NULL && this_cmd->clone != NULL)
27  {
28    nl_sodd = this_cmd->clone->par_names;
29  }
30  else
31    fatal_error("SODD "," - No existing command");
32
33  pos = name_list_pos("nosixtrack", nl_sodd);
34  nosixtrack = nl_sodd->inform[pos];
35  if(nosixtrack == 0)
36  {
37    printf("Build-up of input file fc.34 by call to program sixtrack. \n");
38    conv_sixtrack(cmd);
39    // fclose(f34);
40    printf("input file fc.34 is ready. \n");
41  }
42  sodd_table_70 = make_table("detune_1_end", "sodd_detune_5", sodd_detune_5_cols,
43                             sodd_detune_5_types, 2);
44  sodd_table_70->dynamic = 1;
45  add_to_table_list(sodd_table_70, table_register);
46  sodd_table_71 = make_table("detune_1_all", "sodd_detune_5", sodd_detune_5_cols,
47                             sodd_detune_5_types, 2);
48  sodd_table_71->dynamic = 1;
49  add_to_table_list(sodd_table_71, table_register);
50  sodd_table_72 = make_table("detune_2_hor", "sodd_detune_5", sodd_detune_5_cols,
51                             sodd_detune_5_types, 2);
52  sodd_table_72->dynamic = 1;
53  add_to_table_list(sodd_table_72, table_register);
54  sodd_table_73 = make_table("detune_2_ver", "sodd_detune_5", sodd_detune_5_cols,
55                             sodd_detune_5_types, 2);
56  sodd_table_73->dynamic = 1;
57  add_to_table_list(sodd_table_73, table_register);
58  sodd_table_74 = make_table("distort_1_f_end", "sodd_distort1_8", sodd_distort1_8_cols,
59                             sodd_distort1_8_types, 2);
60  sodd_table_74->dynamic = 1;
61  add_to_table_list(sodd_table_74, table_register);
62  sodd_table_75 = make_table("distort_1_h_end", "sodd_distort1_8", sodd_distort1_8_cols,
63                             sodd_distort1_8_types, 2);
64  sodd_table_75->dynamic = 1;
65  add_to_table_list(sodd_table_75, table_register);
66  sodd_table_76 = make_table("distort_1_f_all", "sodd_distort1_11", sodd_distort1_11_cols,
67                             sodd_distort1_11_types, 2);
68  sodd_table_76->dynamic = 1;
69  add_to_table_list(sodd_table_76, table_register);
70  sodd_table_77 = make_table("distort_1_h_all", "sodd_distort1_11", sodd_distort1_11_cols,
71                             sodd_distort1_11_types, 2);
72  sodd_table_77->dynamic = 1;
73  add_to_table_list(sodd_table_77, table_register);
74  sodd_table_78 = make_table("distort_2_f_end", "sodd_distort2_9", sodd_distort2_9_cols,
75                             sodd_distort2_9_types, 2);
76  sodd_table_78->dynamic = 1;
77  add_to_table_list(sodd_table_78, table_register);
78  sodd_table_79 = make_table("distort_2_h_end", "sodd_distort2_9", sodd_distort2_9_cols,
79                             sodd_distort2_9_types, 2);
80  sodd_table_79->dynamic = 1;
81  add_to_table_list(sodd_table_79, table_register);
82  soddin_(&ierr);
83
84  /* part 2 of HG 031127 */
85  current_beam = keep_beam;
86  /* end of part 2 of HG 031127 */
87}
88
Note: See TracBrowser for help on using the repository browser.