#
#    File:	LHO_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.01; Modified December 14, 2012
#    		Version for ERx running before aLigo
#               2.02; Modified January 20, 2013
#               Pre-ER7 reconfiguration.
#		2.03; Modified October 16, 2014
#		ER7 kleineWelle configurations
#
#-
#
#    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:LHO_Monitor
#
#==========================================================================
#
#=======================================  Infrastructure process definitions
#
#   Servers
#   Load unmeasured
#
NameServer 100	{NameServer } \
	  	{$comnode} \
	  	{-log -no-output} \
		{}
#
TriggerManager 100 \
	       {TrigMgr -ofile $DMTRIGDIR -ntrig 100 \
	       		-streams TrigStream_LHO.cfg} \
	       {$comnode} \
	       {-when:"waitProc NameServ 3" -log -no-output:data:trend} \
	       {TrigMgr.conf,TrigStream_LHO.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 dmt-er.ligo-wa.caltech.edu:32104} \
	       {$comnode} \
	       {-no-output -log} \
	       {}
#
#=======================================  h(t) calibration process definitions
htCalib_H1 400 \
	       {$HOME/bin/htCalib} \
	       {$htpart} \
	       {-no-output:trend:data -log} \
	       {}
#
#---> Set up low-latency 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:31201} \
	       {$htpart} \
	       {-no-output -log} \
	       {}
#
#---> Set up low-latency 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 dmt-er.ligo-wa.caltech.edu:32105} \
	       {$htpart} \
	       {-no-output -log} \
	       {}
#
#---> Science Segment generation
Science_Segs_H1 125 \
		{SegGener -osc hoft_dq_flags.osc -conf Science_Segs_H1.cnf \
			  -partition $HOFTSMPART +seg} \
		{$htpart} \
		{-no-output:trend:data} \
		{hoft_dq_flags.osc,Science_Segs_H1.cnf}
#
#=======================================  Monitoring process definitions
#
#   Webview processes
#   Load unmeasured
#
#
#---> kleineWelle Glitch detection
#     Note that this produces data to /dmt/triggers/
kleineWelle_H1 2500 \
		  {kleineWelleM $HOME/pars/H-ER7_KW_AUX.cfg \
		  		-inlist $HOME/pars/default_in.txt} \
	    	  {$float} \
		  {-log -cd:$DMTRIGDIR/H-KW_TRIGGERS -no-output:trend:data} \
		  {H-ER7_KW_AUX.cfg default_in.txt}
#
#---> kleineWelle h(t) Glitch detection
#     Note that this produces data to /dmt/triggers/
kleineWelle_HOFT_H1 500 \
		  {kleineWelleM $HOME/pars/H-ER7_KW_HOFT.cfg \
		  		-inlist $HOME/pars/htpart_in.txt} \
	    	  {$htpart} \
		  {-log -cd:$DMTRIGDIR/H-KW_HOFT -no-output:trend:data} \
		  {H-ER7_KW_HOFT.cfg htpart_in.txt}
#
#---> Omega on alignment channels
#
Omega_ASC_H1 3000 \
	      {dmt_wstream H1-ER7_ASC_Omega_stream.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-ASC_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log} \
	      {H1-ER7_ASC_Omega_stream.cfg frameStreamList.txt}
#
#---> Omega on Auxillary channels
#
Omega_AUX_H1 3000 \
	      {dmt_wstream H1-ER7_AUX_Omega_stream.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-AUX_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log} \
	      {H1-ER7_AUX_Omega_stream.cfg frameStreamList.txt}
#
#---> Omega on calibrated h(t) data
#
Omega_HOFT_H1 300 \
	      {dmt_wstream H1-ER7_HOFT_Omega_stream.cfg htStreamList.txt \
	      		   $DMTRIGDIR/H-HOFT_Omega/%5g 0} \
	      {$htnode} \
	      {-no-output:trend:data -log} \
	      {H1-ER7_HOFT_Omega_stream.cfg htStreamList.txt}
#
#---> Omega on channels measuring Length DOFs
#
Omega_LSC_H1 3000 \
	      {dmt_wstream H1-ER7_LSC_Omega_stream.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-LSC_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log} \
	      {H1-ER7_LSC_Omega_stream.cfg frameStreamList.txt}
#
#---> Omega on environmental channels
#
Omega_PEM_H1 3000 \
	      {dmt_wstream H1-ER7_PEM_Omega_stream.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-PEM_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log} \
	      {H1-ER7_PEM_Omega_stream.cfg frameStreamList.txt}
#
#   PCalMon
PCalMon_H1 300 \
	      {PCalMon -c H1:CAL-DELTAL_EXTERNAL_DQ -f 33.1 \
		       -c H1:CAL-DELTAL_EXTERNAL_DQ -f 36.7 \
		       -c H1:CAL-DELTAL_EXTERNAL_DQ -f 534.7 \
		       -c H1:CAL-DELTAL_EXTERNAL_DQ -f 540.7 \
		       -stride 10 -OSCfile h1_locked.osc \
		       -OSCcond H1:IFO_LOCKED -debug 0} \
              {$comnode} \
              {-no-output:data -log} \
              {h1_locked.osc}
#
#   PlaneMon
PlaneMon_LHO 200 \
		{PlaneMon -loc H -verbosity 2 -makejpg} \
		{$comnode} \
		{-no-output:data:trend} \
		{PlaneMon_LHO.conf}
#
#   Seismic BLRMS
Seis_Blrms_H1 125 \
	      {blrms_monitor	-mons Seis_Blrms_H1 \
				-if $DMTPARS/blrmsconfig_LHO.conf \
				-trendname Seis_Blrms \
				-of $DMTOUTPUT/blrms%t.data -mtxt no} \
	      {$float} \
	      {-no-output:data} \
	      {blrmsconfig_LHO.conf half_decade_set_3.filter}
#
#   BLRMS from SEI STS seismometers
H1_STS_Blrms 125 \
	      {blrms_monitor	-mons H1_STS_Blrms \
				-if $DMTPARS/LHO_SEI_blrms.conf \
				-trendname H1_STS_Blrms \
				-of $DMTOUTPUT/blrms%t.data -mtxt no} \
	      {$float} \
	      {-no-output:data} \
	      {LHO_SEI_blrms.conf STS_Seis_Blrms.filter}
#
#   Segment generation
#   Load 68 Mips measured 5/16/2005 4.5% of 2x750
#
SegGener_H1 125	{SegGener -osc  SegGener_LHO.osc \
			  -conf SegGener_LHO.cnf +seg} \
		{$float} \
		{-no-output:trend:data} \
		{SegGener_LHO.osc H1-HIFOY.osc SegGener_ODC_LHO.osc \
		 SegGener_LHO.cnf H1-HIFOY.cnf SegGener_ODC_LHO.cnf}
#
#   NS Binary inspiral sensitivity
#
SenseMonitor_H1 125 \
		{SenseMonitor -config SenseMonitor_hoft_H1.conf \
                              -partition $HOFTSMPART} \
                {$htpart} \
                {-no-output:data} \
                {SenseMonitor_hoft_H1.conf}
#
#   NS Binary inspiral sensitivity
#
SenseMonitor_CAL_H1 125 \
		{SenseMonitor -config SenseMonitor_CAL_H1.conf \
                              -partition $LIGOSMPART} \
                {$htpart} \
                {-no-output:data} \
                {SenseMonitor_CAL_H1.conf}
#
