Project

General

Profile

Idea #20982

Iterate artdaq_database into quick-mrb-start.sh / run_demo.sh.

Added by Gennadiy Lukhanin about 1 year ago. Updated 2 months ago.

Status:
Assigned
Priority:
Normal
Category:
Needed Enhancements
Target version:
-
Start date:
09/28/2018
Due date:
% Done:

80%

Estimated time:
Duration:

Description

Add an option to the quick-mrb-start.sh script that would create an instance of artdaq_database and populate it with default test configurations so they can be used by run_demo.sh.

History

#1 Updated by Eric Flumerfelt about 1 year ago

  • Project changed from artdaq to artdaq Demo
  • Target version set to artdaq_demo v3_04_00
  • Experiment deleted (-)

I think this should be the defining feature of the v3_04_00 release.

#2 Updated by Gennadiy Lukhanin 10 months ago

  • % Done changed from 0 to 80
  • Assignee set to Gennadiy Lukhanin
  • Status changed from New to Assigned
  • Category set to Needed Enhancements

Instructions for testing the integration of run_demo.sh with artdaq_database.

http://scisoft.fnal.gov/scisoft/packages/artdaq_database/v1_04_68/

  1. Install and test artdaq_demo; take a note of its qualifiers.
  2. Download and install a new version of artdaq_database with the same qualifiers as artdaq_demo into the $MRB_TOP/products directory.
    source ./setupARTDAQDEMO
    cd $MRB_TOP/products
    wget http://scisoft.fnal.gov/scisoft/packages/artdaq_database/v1_04_68/artdaq_database-1.04.68-slf7-x86_64-e15-s64-prof.tar.bz2 -qO- | tar jxvf
    
  3. Change the current branch of artdaq_demo to feature/lukhanin_artdaqdb_integration.
    cd $MRB_TOP/srcs/artdaq_demo
    git checkout feature/lukhanin_artdaqdb_integration
    
  4. Rebuild and install artdaq_demo.
    cd $MRB_TOP; mrb b -j32; mrb i
  5. If run_demo.sh is in the $MRB_TOP directory then copy configure_artdaq_database.sh and run_demo.sh to $MRB_TOP.
    cp $(find localProducts_* -name configure_artdaq_database.sh) ./
    cp $(find localProducts_* -name run_demo.sh) ./
    chmod a+x ./run_demo.sh
    

    Note: this step will not be required after the feature/lukhanin_artdaqdb_integration branch is merged into the HEAD of the develop branch.
  6. Comment out the put_config_info_base function in $MRB_TOP/artdaq-utilities-daqinterface/rc/control/config_functions_database_v2.py
    diff --git a/rc/control/config_functions_database_v2.py b/rc/control/config_functions_database_v2.py
    index e2d1e35..aa16cfa 100644
    --- a/rc/control/config_functions_database_v2.py
    +++ b/rc/control/config_functions_database_v2.py
    @@ -70,7 +70,7 @@ def get_config_info_base(self):
    
     def put_config_info_base(self):
    -
    +    """ 
         scriptdir = os.environ["ARTDAQ_DAQINTERFACE_DIR"] + "/utils" 
    
         if not os.path.exists( scriptdir ):
    @@ -128,7 +128,7 @@ def put_config_info_base(self):
             proc_types = ["BoardReader", "EventBuilder", "DataLogger", "Dispatcher", "RoutingMaster"]
    
             proc_line = {}
    -
    +        
             with open("%s/ranks.txt" % (runrecord)) as ranksfile:
                 for line in ranksfile.readlines():
                     res = re.search(r"^\s*(\S+)\s+([0-9]+)\s+(\S+)\s+([0-9]+)\s*$", line)
    @@ -154,7 +154,7 @@ def put_config_info_base(self):
                 proc_line_value = proc_line_value[:-1] # Strip the trailing comma
                 proc_line[ proc_line_key ] = proc_line_value + "]" 
                 dataflow_file.write("\n" + proc_line[ proc_line_key ] )
    -
    +        
             with open( "%s/%s/metadata.fcl" % (tmpdir, runnum) ) as metadata_file:
                 for line in metadata_file.readlines():
                     if "Start_time" not in line and "Stop_time" not in line and not line == "":
    @@ -179,7 +179,7 @@ def put_config_info_base(self):
         assert res, "Unable to find uuidgen-generated temporary directory, will perform no deletions" 
    
         shutil.rmtree( tmpdir )
    -
    +    """ 
         return
    
     def listdaqcomps_base(self):
    

    Note: This temporary fix disables archiving of run history records for the tagged version v3_03_02_111318 of artdaq-utilities-daqinterface, which is checked out by default.
  7. Run run_demo.sh as you typically would and it will create a new filesystem database in the $MRB_TOP/database/online_config_db directory and use it for managing configurations.
     ./run_demo.sh --basedir=$MRB_TOP --config demo --comps component{01..2} -- --no_om --runduration 30
    

    Note: Not all configurations are compatible with artdaq_database, a good one to use is called "demo".
  8. Use the "--no_db" option to disable artdaq_database in run_demo.sh.
     ./run_demo.sh --basedir=$MRB_TOP --config demo --comps component{01..2} -- --no_om --runduration 30  --no_db
    
  9. Setup the configuration management tool "conftool.py" from UPS.
    source $MRB_TOP/products/setup;setup artdaq_database v1_04_68 -q e15:prof:s64
    export ARTDAQ_DATABASE_URI=filesystemdb://$MRB_TOP/database/online_config_db
    
  10. Run it...
    $ conftool.py
    Usage: conftool.py [operation] [config name prefix]
    
    Example:
     conftool.py exportConfiguration demo_safemode00003
     conftool.py importConfiguration demo_safemode
     conftool.py getListOfAvailableRunConfigurationPrefixes
     conftool.py getListOfAvailableRunConfigurations
     conftool.py getListOfAvailableRunConfigurations demo_
     conftool.py archiveRunConfiguration demo_safemode 23 #where 23 is a run number
     conftool.py updateArchivedRunConfiguration demo_safemode 23 #where 23 is a run number
     conftool.py getListOfArchivedRunConfigurations 23 #where 23 is a run number
     conftool.py exportArchivedRunConfiguration 23/demo_safemode00003 #where 23/demo_safemode00003 is a configuration name
     conftool.py listDatabases
     conftool.py listCollections
     conftool.py readDatabaseInfo
    

#3 Updated by Eric Flumerfelt 9 months ago

  • Target version deleted (artdaq_demo v3_04_00)

#4 Updated by Ron Rechenmacher 2 months ago

partial merge into develop



Also available in: Atom PDF