Project

General

Profile

How to setup a test connection to the ART event dispatcher

To test the online monitoring it is convenient to be able to run a dispatcher separate from the DAQ that can otherwise mimic the performance of the DAQ's event dispatcher. Here's how to setup a dispatcher which can spool events from a disk-resident .raw file to clients running on separate machines:

  • Log into the computer
     % ssh novatest01.fnal.gov 
  • Set up the DAQ development environment
     setup_novadaq 

    If you need help with this command, please see my shell configuration file:
    /home/messier/.bash_profile
    
  • Identify a raw file you would like to serve. I have one in my home area
     % cp /home/messier/novadaq/work/data.raw . 
  • Start the dispatcher with the following two commands:
    % EventFileToSHM -f data.raw -m MARK -s 34000000 -d 200 -b -l
    % EventDispatcher -c -m MARK -p 8989
    

    In the above "MARK" is a unique identifier. Make it something that won't conflict with anyone else. Likewise the port number "-p" should be chosen uniquely. The "-d" option sets the delay in milliseconds, so the above should feed events at a rate of 5/second. You will want to keep this low enough so that you don't stress the machines you are working on too much. The "-p" option sets the port number. You'll want to remember this port number for later.

To clean up after yourself, you can check to see if there is a shared memory block allocated to you and remove it using ipcs and ipcrm:

% ipcs

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x32100122 4227079    biery     666        503316640  0                       
0x4d454d53 9404433    anorman   666        32768000   0                       
0x00000000 6946834    ron       777        40000      2          dest         
0x4d454d54 9469980    jpaley    666        20971520   0                       
0x4b52414d 13402152   messier   666        32000000   0   

% ipcrm -m 13402152
% ipcs

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x32100122 4227079    biery     666        503316640  0                       
0x4d454d53 9404433    anorman   666        32768000   0                       
0x00000000 6946834    ron       777        40000      2          dest         
0x4d454d54 9469980    jpaley    666        20971520   0                       

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages 

  • Start a client. This could be on the novagpvm cluster. In jobs running there, you will want to reset the source definitions in your job's .fcl file. Quoting from onmonjob.fcl:
    source:
    {
      module_type: NOvASocketInput
      fileNames:  [ "novatest01.fnal.gov:8989" ]
    
      FilterCorruptedNanoslices: false
      DoFillFlatDAQData: true
      maxEvents: -1
    }
    

    A job configured using the above should make the connection on the port 8989 you set up in the steps above.

Thank you, Andrew Norman, who showed me these steps.

https://cdcvs.fnal.gov/redmine/projects/novadaq-dqm-om/wiki