Generally speaking, this class is provided to hide the details of how the information is encoded into an aipsrc variables and to avoid having to change applications if the information moves from being coded into a variable to being deduced at runtime.
It is expected that the information which is available from this class will accrete with time.
if (AppInfo::nProcessors() > 1) { ... do something clever in parallel ... } else { ... serial code ... }
If no suitable directories are found (i.e., writable directories with enough free space), a zero-length vector is returned. A warning is issued to the logging system for directories which do not exist or are not writable.
Choose a workDirectory with at least minimumFreeSpace MB of free space available. It uses workDirectories. If there is more than one valid directory it arranges to choose different directories in succession in an attempt to spread out the I/O. That is, on the first call it will return directory1, on the second it will return directory2, etc. in a cyclical fashion. One can imagine more elaborate algorithms than this, however this should suffice for some time, if not forever.
This function returns a fully qualified filename for a non-existent file in a work directory with enough free space. That is, you can create a temporary file with the name returned from this function. Tthis function calls workDirectory and then appends a unique (files does not exist) filename. By default the prefix of temporary file name is aipstmp_, but you can override this if you choose.
How much memory is available for this process? Note that this number can be less than zero if the process has overdrawn its account. This function returns:
AppInfo::memoryInMB() - Memory::allocatedMemoryInBytes()/1024/1024;You should use this value when making determinations about whether to put something in memory or do I/O instead.
Total memory in MB that the process may use. Reports system.resources.memory if it is set, otherwise return 64 (considered to be the base level for AIPS++).
Number of processors on the local host. Returns system.resources.numcpu if it is set, otherwise 1.
Return the local time zone offset in day fractions. This value has to be added to UTC to get local time. Generally the OS supplied value will be used, however it can be overridden with system.time.tzoffset if necessary.