-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented options -d/--data for $QW_DATA support
QwEventBuffer is the only class using $QW_DATA env var support. Now we have a static default data directory ("/adaq1/data1/apar") which is overriden by QW_DATA or -d/--data. QwOptions was slightly modified in its env var parsing. Instead of requiring a prefix "Qw" (i.e. Qwrun=100 is equivalent to --run=100) it now uses "QW_" as prefix. Unfortunately boost::program_options::parse_environment does not allow for the "allow_unregistered()" decorator, so we immediately trip up over the unparsed $QW_FIELDMAP and the like. We bypass this problem by writing a functor to which we can specify a set of lowercase appendages to ignore (e.g. "fieldmap"). The rest the functor does it stripping the prefix "QW_" and turning the rest to lowercase for parsing "QW_DATA" as "data" and then recognizing as the argument of --data. tl;dr ``` build/qwparity_simple -r 10 -d /my/data/path QW_DATA=/your/data/path build/qwparity_simple -r 10 -d /my/data/path QW_DATA=/my/data/path build/qwparity_simple -r 10 ``` now all have the same result.
- Loading branch information
Showing
3 changed files
with
37 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters