diff options
author | Thomas White <taw@physics.org> | 2023-05-11 14:32:44 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2023-07-28 13:22:04 +0200 |
commit | 7e93cbd5e5ec143a80c52746470fbed7eeb24bac (patch) | |
tree | 7fdaced1a67f41df2af8eaa66739715552c24432 /src | |
parent | 26ba4671d07e05101ff18b9669ecf2e97ee8255f (diff) |
align_detector: Run pede
Diffstat (limited to 'src')
-rw-r--r-- | src/align_detector.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/align_detector.c b/src/align_detector.c index 8a1af962..c6e73497 100644 --- a/src/align_detector.c +++ b/src/align_detector.c @@ -69,6 +69,8 @@ int main(int argc, char *argv[]) char *out_geom = NULL; int level = 0; char *rval; + int i; + FILE *fh; /* Long options */ const struct option longopts[] = { @@ -136,5 +138,24 @@ int main(int argc, char *argv[]) return 1; } + fh = fopen("millepede.txt", "w"); + if ( fh == NULL ) { + ERROR("Couldn't open Millepede steering file\n"); + return 1; + } + + for ( i=optind; i<argc; i++ ) { + fprintf(fh, "%s\n", argv[i]); + } + + fprintf(fh, "Parameter\n"); + fprintf(fh, "1 0 0\n"); + fprintf(fh, "2 0 0\n"); + fprintf(fh, "method inversion 5 0.1\n"); + fprintf(fh, "end\n"); + fclose(fh); + + system("pede millepede.txt"); + return 0; } |