Changing and adding artdaq configurations with

To edit a configuration, do the following once you've logged onto <daqhost>

source /software/database/
tmpdir=$database_work_dir/$( uuidgen )   
mkdir $tmpdir
cd $tmpdir

At this point you'll have set up the database environment, created a temporary directory, and cd'd into that directory. Now let's get the configuration we want to edit: exportConfiguration <configuration name>

...and assuming you've selected a legal <configuration name>, the FHiCL documents will have been downloaded into the directory; the last line of the Python output should simply read "True". It it reads "False", something went wrong, and take no further action.

To find which configurations are available, type: getListOfAvailableRunConfigurations

Once you've exported your configuration, edit the FHiCL documents as you see fit, and when you're done, save them via the following commands:

cd $tmpdir    # This takes you to the base of the configuration directory tree importConfiguration <configuration name>

Where with importConfiguration, if you use the same configuration name as you did with the exportConfiguration command, then the database will automatically bump the integer suffix of the configuration name for you - e.g., if you did " exportConfiguration sample_database00007", performed edits, and then did " importConfiguration sample_database00007", then to retrieve your edits later you'd execute " exportConfiguration sample_database00008".

On the other hand, if you want to provide a new name entirely after you've performed your edits, then you'd execute something like " importConfiguration just_an_example"; in that case, the database appends a "00001" to the configuration name, so later you can retrieve it using " exportConfiguration just_an_example00001".

Just as with the exportConfiguration command, with the importConfiguration command you'll want the last line of the Python output to just read as "True".

Once you've done this, you can then clean up the temporary directory you've made. Of course, make sure you know what you're doing before you execute the "rm -rf" command!

#make certain you're looking at the FHiCL tree you edited before executing the next command
ls $tmpdir 
rm -rf $tmpdir