#
#    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:	4.01; Modified June 29, 2016
#    		Draft version for ER9/O2
#
#-
#
#    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 $LOWLATENCY_HOST: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 lowlatency.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 $LOWLATENCY_HOST: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
#
#
#---> Duotone
#     Load unmeasured
DuoTone_H1 200 \
	   {DuoTone --offset 72 -cSLSCX H1:CAL-PCALX_FPGA_DTONE_IN1_DQ \
	   	                -cSLSCY H1:CAL-PCALY_FPGA_DTONE_IN1_DQ} \
           {$float} \
           {-log -no-output:data} \
           {}
#
#---> Test for data valid errors
dvTest	100 \
	  {dvTest -conf dvTest_O2_LHO.cfg} \
	  {$float} \
	  {-no-output:data} \
	  {dvTest_O2_LHO.cfg}
#
#---> EndTimes
EndTimes_H1 200 \
	  {EndTimes -conf EndTimes_H1.cfg -osc LockLoss.osc} \
	  {$float} \
	  {-no-output:trend:data} \
	  {EndTimes_H1.cfg LockLoss.osc}
#
#---> IRIGB
#     Load unmeasured
IRIG-B_H1 200 \
	  {IRIG-B -c H1: -t H1:DMT-IRIG_B_LVEA} \
	  {$float} \
	  {-no-output:trend:data -disable} \
	  {}
#
#
#---> kleineWelle Glitch detection
#     Note that this produces data to /dmt/triggers/
kleineWelle_H1 2500 \
		  {kleineWelleM $HOME/pars/H-O2_KW_AUX.cfg \
		  		-inlist $HOME/pars/default_in.txt} \
	    	  {$float} \
		  {-log -cd:$DMTRIGDIR/H-KW_TRIGGERS -no-output:trend:data} \
		  {H-O2_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-O2_KW_HOFT.cfg \
		  		-inlist $HOME/pars/htpart_in.txt} \
	    	  {$htpart} \
		  {-log -cd:$DMTRIGDIR/H-KW_HOFT -no-output:trend:data} \
		  {H-O2_KW_HOFT.cfg htpart_in.txt}
#
#---> Line Monitoring
#
LineMon_H1_exc	200 \
		{LineMonitor -i LineMon_H1_exc.cf} \
                {$float} \
                {-log -no-output:data -disable} \
                {LineMon_H1_exc.cf}
#
#---> Omega on lock alignment channels
#
Omega_ALS_H1 3000 \
	      {dmt_wstream H1-ALS_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-ALS_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {H1-ALS_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on Alignment channels
#
Omega_ASC_H1 3000 \
	      {dmt_wstream H1-ASC_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-ASC_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {H1-ASC_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on calibrated h(t) data
#
Omega_HOFT_H1 300 \
	      {dmt_wstream H1-HOFT_OMEGA.cfg htStreamList.txt \
	      		   $DMTRIGDIR/H-HOFT_Omega/%5g 0} \
	      {$htpart} \
	      {-no-output:trend:data -log} \
	      {H1-HOFT_OMEGA.cfg htStreamList.txt}
#
#---> Omega on hepi (HPI) channels
#
Omega_HPI_H1 3000 \
	      {dmt_wstream H1-HPI_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-HPI_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {H1-HPI_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on hepi (HPI) channels
#
Omega_HPI_SLOW_H1 3000 \
	      {dmt_wstream H1-HPI_SLOW_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-HPI_SLOW_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {H1-HPI_SLOW_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on Alignment channels
#
Omega_IMC_H1 3000 \
	      {dmt_wstream H1-IMC_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-IMC_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {H1-IMC_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on Alignment channels
#
Omega_ISI_H1 3000 \
	      {dmt_wstream H1-ISI_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-ISI_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {H1-ISI_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on Alignment channels
#
Omega_ISI_SLOW_H1 3000 \
	      {dmt_wstream H1-ISI_SLOW_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-ISI_SLOW_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {H1-ISI_SLOW_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on channels measuring Length DOFs
#
Omega_LSC_H1 3000 \
	      {dmt_wstream H1-LSC_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-LSC_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {H1-LSC_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on channels measuring Length DOFs
#
Omega_OMC_H1 3000 \
	      {dmt_wstream H1-OMC_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-OMC_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {H1-OMC_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on environmental channels
#
Omega_PEM_H1 3000 \
	      {dmt_wstream H1-PEM_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-PEM_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {H1-PEM_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on slow environmental channels
#
Omega_PEM_SLOW_H1 3000 \
	      {dmt_wstream H1-PEM_SLOW_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-PEM_SLOW_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {H1-PEM_SLOW_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on pre-stablized laser channels
#
Omega_PSL_H1 3000 \
	      {dmt_wstream H1-PSL_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-PSL_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {H1-PSL_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on suspension (SUS) channels
#
Omega_SUS_H1 3000 \
	      {dmt_wstream H1-SUS_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-SUS_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {H1-SUS_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on slow suspension (SUS) channels
#
Omega_SUS_SLOW_H1 3000 \
	      {dmt_wstream H1-SUS_SLOW_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/H-SUS_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {H1-SUS_SLOW_OMEGA.cfg frameStreamList.txt}
#
#   PCalMon
#   Parameters modified as requested by Greg 1/8/2015
PCalMon_H1 300 \
	      {PCalMon -c H1:CAL-CS_LINE_SUM_DQ -f 37.3 \
	      	       -c H1:CAL-DARM_ERR_WHITEN_OUT_DBL_DQ -f 35.9 \
		       -c H1:CAL-DARM_ERR_WHITEN_OUT_DBL_DQ -f 36.7 \
		       -c H1:CAL-DARM_ERR_WHITEN_OUT_DBL_DQ -f 37.3 \
		       -c H1:CAL-DARM_ERR_WHITEN_OUT_DBL_DQ -f 331.9 \
		       -c H1:CAL-DARM_ERR_WHITEN_OUT_DBL_DQ -f 1083.7 \
		       -c H1:CAL-DARM_ERR_WHITEN_OUT_DBL_DQ -f 3001.3 \
		       -c H1:CAL-PCALY_RX_PD_OUT_DQ -f 36.7 \
		       -c H1:CAL-PCALY_RX_PD_OUT_DQ -f 331.9 \
		       -c H1:CAL-PCALY_RX_PD_OUT_DQ -f 1083.7 \
		       -c H1:CAL-PCALX_RX_PD_OUT_DQ -f 3001.3 \
		       -stride 10 -OSCfile h1_locked.osc \
		       -OSCcond H1:IFO_LOCKED -debug 0} \
              {$float} \
              {-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}
#
#   Binary BH inspiral sensitivity
#
SenseMonitor_BBH_30_30_H1 150 \
		{SenseMonitor -config $DMTPARS/SenseMonitor_BBH_30_30_H1.conf} \
		{$float} \
		{-no-output:data} \
		{SenseMonitor_BBH_30_30_H1.conf SenseMonitor_BBH_30_30.txt}
#
#   NS Binary inspiral sensitivity
#
SenseMonitor_CAL_H1 125 \
		{SenseMonitor -config SenseMonitor_CAL_H1.conf \
                              -partition $LIGOSMPART} \
                {$htpart} \
                {-no-output:data} \
                {SenseMonitor_CAL_H1.conf}
#
#---> SixtHertzMon
SixtyHertzMon_H1 200 \
        {SixtyHertzMon -c H1:LSC-DARM_ERR -cf 60.0 -cf 50.0 -cf 70.0 -cf 40.0 \
                       -cf 80.0 -hf 60.0 -hf 120.0 -hf 180.0 -t 60.0 -ver H1} \
        {$float} \
        {-disable} \
        {}
#
