#
#    File:	LLO_Monitor_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:	2.00; Modified October 20, 2012
#    		      Version for ERx running before aLigo
#               2.02; Modified January 20 2013
#                     ER7 configuration.
#               2.03; Modified June 3, 2014
#                     Move toward aLigo configuration - Split SegGener 
#                     configurations and conditions by sub-system
#               2.04; Modified October 16, 2014
#		      ER7 kleineWelle configuration.
#
#-
#
#    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_Monitor
#
#==========================================================================
#
#=======================================  Infrastructure process definitions
#
#   Servers
#   Load unmeasured
#
NameServer 100	{NameServer } \
	  	{$comnode} \
	  	{-log -no-output} \
		{}
#
TriggerManager 100 \
	       {TrigMgr -ofile $DMTRIGDIR -ntrig 100 -streams TrigStream_LLO.cfg} \
	       {$comnode} \
	       {-when:"waitProc NameServ 3" -log -no-output:data:trend} \
	       {TrigMgr.conf,TrigStream_LLO.cfg}
#	       
AlarmManager 100 \
	       {AlarmMgr} \
	       {$comnode} \
	       {-when:"waitProc NameServ 3" -log -no-output} \
	       {}
#
#   Webview processes
#   Load unmeasured
#
webview_1 100	{webview -p 9991 -l $HOME/logs/webview_1.log} \
	  	{$comnode} \
	  	{-no-output} \
		{}
#
#   Set up raw data transfer to the ldas cluster.
link_raw  100  {framelink --delta 1 --stats 300 \
	       		  --verbose $HOME/logs/link_raw-verbose.log \
	       		  push $LIGOSMPART $LDAS_DMT_ER:32104} \
	       {$comnode} \
	       {-no-output:trend:data -log} \
	       {}
#
#=======================================  h(t) calibration process definitions
htCalib_L1	400 \
	       {$HOME/bin/htCalib} \
	       {$htpart} \
	       {-no-output -log} \
	       {}
#
#   Set up h(t) data transfer to the Caltech cluster.
link_hoft_CIT 100 \
	       {framelink --delta 4 --stats 300 \
	       		  --verbose $HOME/logs/link_hoft_CIT-verbose.log \
	       		  push $HOFTSMPART ldas-grid.ligo.caltech.edu:31202} \
	       {$htpart} \
	       {-no-output:trend:data -log} \
	       {}
#
#   Set up h(t) data transfer to the local cluster.
link_hoft 100  {framelink --delta 4 --stats 300 \
	       		  --verbose $HOME/logs/link_hoft-verbose.log \
	       		  push $HOFTSMPART $LDAS_DMT_ER:32105} \
	       {$htpart} \
	       {-no-output:trend:data -log} \
	       {}
#
#---> Science Segment generation
Science_Segs_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
#
#   Webview processes
#   Load unmeasured
#
#
#---> kleineWelle Glitch detection
#     Note that this produces data to /dmt/triggers/
kleineWelle_L1 2500 \
		  {kleineWelleM $HOME/pars/L-ER7_KW_AUX.cfg \
		  		-inlist $HOME/pars/default_in.txt} \
	    	  {$float} \
		  {-log -cd:$DMTRIGDIR/L-KW_TRIGGERS -no-output:trend:data} \
		  {L-ER7_KW_AUX.cfg default_in.txt}
#
#---> kleineWelle Glitch detection
#     Note that this produces data to /dmt/triggers/
kleineWelle_HOFT_L1 500 \
		  {kleineWelleM $HOME/pars/L-ER7_KW_HOFT.cfg \
		  		-inlist $HOME/pars/htpart_in.txt} \
	    	  {$htpart} \
		  {-log -cd:$DMTRIGDIR/L-KW_HOFT -no-output:trend:data} \
		  {L-ER7_KW_HOFT.cfg htpart_in.txt}
#
#---> Omega on ASC channels
#
Omega_ASC_L1 3000 \
	      {dmt_wstream L1-ER7_ASC_Omega_stream.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-ASC_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log} \
	      {L1-ER7_ASC_Omega_stream.cfg frameStreamList.txt}
#
#---> Omega on Auxillary channels
#
Omega_AUX_L1 3000 \
	      {dmt_wstream L1-ER7_AUX_Omega_stream.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-AUX_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log} \
	      {L1-ER7_AUX_Omega_stream.cfg frameStreamList.txt}
#
#---> Omega on calibrated h(t) data
#
Omega_HOFT_L1 300 \
	      {dmt_wstream L1-ER7_HOFT_Omega_stream.cfg htStreamList.txt \
	      		   $DMTRIGDIR/L-HOFT_Omega/%5g 0} \
	      {$htnode} \
	      {-no-output:trend:data -log} \
	      {L1-ER7_HOFT_Omega_stream.cfg htStreamList.txt}
#
#---> Omega on channels measuring Length DOFs
#
Omega_LSC_L1 3000 \
	      {dmt_wstream L1-ER7_LSC_Omega_stream.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-LSC_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log} \
	      {L1-ER7_LSC_Omega_stream.cfg frameStreamList.txt}
#
#---> Omega on environmental channels
#
Omega_PEM_L1 3000 \
	      {dmt_wstream L1-ER7_PEM_Omega_stream.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-PEM_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log} \
	      {L1-ER7_PEM_Omega_stream.cfg frameStreamList.txt}
#
#   PCalMon
PCalMon_L1 300	{PCalMon -c L1:OAF-CAL_DARM_DQ -f 33.7 \
			 -c L1:OAF-CAL_DARM_DQ -f 37.3 \
			 -c L1:OAF-CAL_DARM_DQ -f 533.3 \
			 -c L1:OAF-CAL_DARM_DQ -f 539.9 \
			 -stride 10 -OSCfile l1_locked.osc \
			 -OSCcond L1:IFO_LOCKED -debug 0} \
		{$comnode} \
		{-no-output:data -log} \
		{l1_locked.osc}
#
#   Segment generation
#   Load 68 Mips measured 5/16/2005 4.5% of 2x750
#
SegGener_L1 125	{SegGener -osc SegGener_LLO.osc -conf SegGener_LLO.cnf +seg} \
		{$float} \
		{-no-output:trend:data} \
		{SegGener_LLO.cnf SegGener_ODC_LLO.cnf SegGener_IOS_LLO.cnf \
	         SegGener_LSC_LLO.cnf SegGener_PEM_LLO.cnf \
		 SegGener_LLO.osc SegGener_ODC_LLO.osc SegGener_IOS_LLO.osc \
                 SegGener_LSC_LLO.osc SegGener_PEM_LLO.osc}
#
#   NS Binary inspiral sensitivity
#
SenseMonitor_L1 125 \
		{SenseMonitor -config SenseMonitor_hoft_L1.conf \
                              -partition $HOFTSMPART} \
                {$htpart} \
                {-no-output:data} \
                {SenseMonitor_hoft_L1.conf}
#
#   NS Binary inspiral sensitivity
#
SenseMonitor_CAL_L1 125 \
		{SenseMonitor -config SenseMonitor_CAL_L1.conf} \
                {$htpart} \
                {-no-output:data} \
                {SenseMonitor_CAL_L1.conf}
#
#   BLRMS from SEI STS seismometers
L1_STS_Blrms 125 \
	      {blrms_monitor	-mons L1_STS_Blrms \
				-if $DMTPARS/LLO_SEI_blrms.conf \
				-trendname L1_STS_Blrms \
				-of $DMTOUTPUT/blrms%t.data -mtxt no} \
	      {$float} \
	      {-no-output:data} \
	      {LLO_SEI_blrms.conf STS_Seis_Blrms.filter}
#
