- Timestamp:
- 01/21/03 15:02:35 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/ReflectorII/reflector.c
r1622 r1722 47 47 extern CerEventHeader *cheadp; /* var inited in header.c */ 48 48 extern RflEventHeader *rheadp; /* var inited in header.c */ 49 extern void SetAtmModel(int model, float ol); /* from atm.c */ 49 50 50 51 /* Prototypes */ … … 470 471 RflRunHeader RflRunHead; 471 472 472 extern int atmModel; /* current atm. model */ 473 const char *AtmModelNames[]={"ATM_NOATMOSPHERE","ATM_90PERCENT","ATM_CORSIKA"}; 474 extern char atmosphere[256]; /* current atm. model */ 475 int model=0; 473 476 474 477 do … … 490 493 if (newFile) 491 494 { 495 while (strcmp(atmosphere, AtmModelNames[model])) 496 if (++model == sizeof(AtmModelNames)/sizeof(AtmModelNames[0])) 497 { 498 model = 0; 499 Error(" *** Atm model \"%s\" not found.\n", atmosphere); 500 break; 501 } 502 492 503 /* Write Reflector "run header" (one per cer file!): */ 493 504 memcpy(&RflRunHead, cheadp, sizeof(RflRunHead)); 494 505 RflRunHead.wobble_mode = wobble_position; 495 RflRunHead.atmospheric_model = atmModel;506 RflRunHead.atmospheric_model = model; 496 507 fwrite(&RflRunHead, sizeof(RflRunHead), 1, rflfile); 508 509 /* Set up atmosphere (do some necessary calculations) once we 510 * read in the observation level from the run header: 511 */ 512 513 Log("Setting atm model \"%s\" and observation level %.0f cm.\n", AtmModelNames[model], RflRunHead.HeightLev[0]); 514 SetAtmModel(model,RflRunHead.HeightLev[0]); 515 497 516 } 498 517
Note:
See TracChangeset
for help on using the changeset viewer.