include_and_ingest
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
include_and_ingest [2024/07/19 11:06] – created johnsoevans | include_and_ingest [2024/07/20 06:32] (current) – johnsoevans | ||
---|---|---|---|
Line 2: | Line 2: | ||
The TOPAS #include and #ingest commands let you bring extra information into an INP file. #ingest will be available from TA v8 onwards. | The TOPAS #include and #ingest commands let you bring extra information into an INP file. #ingest will be available from TA v8 onwards. | ||
- | Putting command "# | + | <code topas># |
+ | Putting command "# | ||
- | #ingest is similar, but reads information | + | <code topas># |
+ | "# | ||
+ | |||
+ | The FILE_NAME can also be a macro name. The macro itself can come from the following sources: | ||
+ | |||
+ | * From TOPAS.INC | ||
+ | * From the command line, for example type: tc ingest-1.inp “macro Name_Of_Macro { FILE_NAME_CONTAINING_INPTEXT.inc } “ | ||
+ | * From a #include file included at the command line, for example: tc ingest-1.inp “#include SOME_INCLUDE_FILE “ | ||
+ | |||
+ | Any macro defined in SOME_INCLUDE_FILE can be used as a FILE_NAME for #ingest. | ||
+ | |||
+ | Macros define in the INP file itself cannot be used as a #ingest FILE_NAME. | ||
+ | |||
+ | Macros used as a FILE_NAME for #ingest can use the internal items: | ||
+ | |||
+ | * ROOT : Returns the root directory of the program. | ||
+ | * INP_File : Returns current INP file name without a path or extension. | ||
+ | * Run_Number : Returns the current run number. | ||
+ | * File_Can_Open($file) : Returns 1 if $file can be opened or 0 of it can't be opened. | ||
+ | |||
+ | The above means that #ingest can be used with num_rums etc. | ||
+ | |||
+ | Examples will be in test_examples\ingest\. | ||
include_and_ingest.1721387202.txt.gz · Last modified: 2024/07/19 11:06 by johnsoevans