#
#    File:	LLO_RedundantDQ_ProcList
#
#    Purpose:	This ProcList file is used by the procsetup utility to 
#		create the node-specific configuration files for the
#		process manager.
#
#    Author:	J. Zweizig
#
#    Version:	1.0; Modified January 15, 2015
#    		Version for ER7 running before aLigo
#
#-
#
#    This file contains one configuration line for each process to be 
#    run. The configuration line may be continued over multiple text 
#    by ending a non-terminal line with a backslash (\). Comments start
#    with a hash-mark (#) and continue to the end of the line. The 
#    configuration line contains the following fields:
#
#    1) Process name
#    2) CPU usage
#    3) Command to be executed by the process
#    4) Node assignment constraints
#    5) Procmgr tag
#    6) Files used by the process
#
#    Each field should be enclosed in braces if it contains white-space 
#    characters. The command line may contain symbols or escape sequences
#    as allowed by the process manager. The "node assignment constraints" 
#    field is a perl expression that evaluates to true if the process may
#    be run on a given node. The symbols in this expression are substituted 
#    with values defined in the node list on a node-by-node basis.
#
#    Generate procmgt configure files from this file by running the 
#    following command:
#
#       procsetup --file:LLO_RedundantDQ
#
#==========================================================================
#
#=======================================  Infrastructure process definitions
#
#   Servers
#   Load unmeasured
#
NameServer 100	{NameServer } \
	  	{$comnode} \
	  	{-log -no-output} \
		{}
#
RTriggerManager 100 \
	       {TrigMgr -ofile $DMTRIGDIR -ntrig 100 -streams TrigRStream_LLO.cfg} \
	       {$comnode} \
	       {-when:"waitProc NameServ 3" -log -no-output:data:trend} \
	       {TrigMgr.conf,TrigRStream_LLO.cfg}
#	       
AlarmManager 100 \
	       {AlarmMgr} \
	       {$comnode} \
	       {-when:"waitProc NameServ 3" -log -no-output} \
	       {}
#
#=======================================  Redundant h(t) calibration process
htCalibR_L1 400 \
	       {$HOME/bin/htCalibR} \
	       {$htpart} \
	       {-no-output:trend:data -log} \
	       {}
#
#---> DMTDQ generation utility
DMTDQ_L1 100    {Placeholder_Monitor -channel L1:IMC-ODC_CHANNEL_OUT_DQ \
	 			     -oChannel L1:DMT-DQ_VECTOR \
				     -oPart /online/$DMTDQSMPART -stride 4} \
		{$htpart} \
		{-no-output} \
		{}
#
#---> Combine_L1
Combine_L1 100	{DMTGen -conf combine_data_llo.cfg -realtime} \
	   	{$htpart} \
		{-log -no-output} \
		{combine_data_llo.cfg}
#
#---> Write h(t) data to the gds file system.
L1_ht_Frames 100 \
	    {Frame_Log --delta 4 --partition $COMBOSMPART --filename \
	    	       "$DMTFRAMEDIR/hoft/L1/.temp/L-L1_ER_C00_L1-%g-4.gwf"} \
	    {$htpart} \
	    {-no-output -log} \
	    {}
#
#---> Rename frames to reflect true data length
L1_rename_Frames 100 \
	    {$HOME/bin/name-check L-L1_ER_C00_L1 "$DMTFRAMEDIR/hoft/L1/.temp" \
	    			  "$DMTFRAMEDIR/hoft/L1/"} \
	    {$htpart} \
	    {-no-output -log} \
	    {}
#
#---> Science Segment generation
Science_RSegs_L1 125 \
		{SegGener -osc hoft_dq_flags.osc -conf Science_Segs_L1.cnf \
			  -partition $HOFTSMPART +seg} \
		{$htpart} \
		{-no-output:trend:data} \
		{hoft_dq_flags.osc,Science_Segs_L1.cnf}
#
#=======================================  Monitoring process definitions
#
#
#---> kleineWelle h(t) Glitch detection
#     Note that this produces data to /dmt/triggers/
kleineWelle_RHOFT_L1 500 \
		  {kleineWelleM $HOME/pars/L-ER7_KW_RHOFT.cfg \
		  		-inlist $HOME/pars/htpart_in.txt} \
	    	  {$htpart} \
		  {-log -cd:$DMTRIGDIR/L-KW_HOFT -no-output:trend:data} \
		  {L-ER7_KW_RHOFT.cfg htpart_in.txt}
#
#   NS Binary inspiral sensitivity
#
SenseMonitor_RHOFT_L1 125 \
		{SenseMonitor -config SenseMonitor_hoft_L1.conf \
                	      -partition $COMBOSMPART} \
                {$htpart} \
                {-no-output:data} \
                {SenseMonitor_hoft_L1.conf}
#
