#
#    File:	LLO_MonitorDQ_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:	3.01; Modified August 1, 2015
#    		Draft version for ER8/O1
#
#-
#
#    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_MonitorDQ
#
#==========================================================================
#
#=======================================  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 $LOWLATENCY_HOST:32104} \
	       {$comnode} \
	       {-no-output -log} \
	       {}
#
#=======================================  h(t) calibration process definitions
htCalib_L1 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 $DQHOFTPART lowlatency.ligo.caltech.edu:31202} \
	       {$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 $DQHOFTPART $LOWLATENCY_HOST:32105} \
	       {$htpart} \
	       {-no-output -log} \
	       {}
#
#---> DMTDQ generation utility
DMTDQ_L1 100    {dq-module -inlists dq-streams_LLO.txt L-DQmod_ER9.json} \
                {$htpart} \
                {-no-output} \
                {dq-streams-LLO.txt dq-streams-LLO_Online.txt \
		 dq-streams-LLO_hoft.txt L-DQmod_ER9.json}
#
#---> Science Segment generation
Science_Segs_L1 125 \
                {SegGener -osc hoft_dq_flags.osc -conf Science_Segs_L1.cnf \
                          -partition $DQHOFTPART +seg} \
                {$htpart} \
                {-no-output:trend:data} \
                {hoft_dq_flags.osc,Science_Segs_L1.cnf}
#
#=======================================  Monitoring process definitions
#
#
#---> Duotone
#     Load unmeasured
DuoTone_L1 200 \
	   {DuoTone --offset 72 -cSLSCX L1:CAL-PCALX_FPGA_DTONE_IN1_DQ \
 	   	                -cSLSCY L1:CAL-PCALY_FPGA_DTONE_IN1_DQ} \
           {$float} \
           {-log -no-output:data} \
           {}
#
#---> Test for data valid errors
dvTest	100 \
          {dvTest -conf dvTest_O1_LLO.cfg} \
 	  {$float} \
 	  {-no-output:data} \
 	  {dvTest_O1_LLO.cfg}
#
#---> End_Times
EndTimes_L1 200 \
	  {EndTimes -conf EndTimes_L1.cfg -osc LockLoss.osc} \
	  {$float} \
	  {-no-output:trend:data} \
	  {EndTimes_L1.cfg LockLoss.osc}
#
#---> IRIGB
#     Load unmeasured
IRIG-B_L1 200 \
	  {IRIG-B -c L1: -t L1:DMT-IRIG_B_LVEA} \
	  {$float} \
	  {-no-output:trend:data -disable} \
	  {}
#
#
#---> kleineWelle Glitch detection
#     Note that this produces data to /dmt/triggers/
kleineWelle_L1 2500 \
		  {kleineWelleM $HOME/pars/L-ER9_KW_AUX.cfg \
		  		-inlist $HOME/pars/default_in.txt} \
	    	  {$float} \
		  {-log -cd:$DMTRIGDIR/L-KW_TRIGGERS -no-output:trend:data} \
		  {L-ER9_KW_AUX.cfg default_in.txt}
#
#---> kleineWelle h(t) Glitch detection
#     Note that this produces data to /dmt/triggers/
kleineWelle_HOFT_L1 500 \
		  {kleineWelleM $HOME/pars/L-ER8_KW_HOFT.cfg \
		  		-inlist $HOME/pars/htpart_in.txt} \
	    	  {$htpart} \
		  {-log -cd:$DMTRIGDIR/L-KW_HOFT -no-output:trend:data} \
		  {L-ER8_KW_HOFT.cfg htpart_in.txt}
#
#---> Line Monitoring
#
LineMon_L1_exc	200 \
		{LineMonitor -i LineMon_L1_exc.cf} \
                {$float} \
                {-log -no-output:data -disable} \
                {LineMon_L1_exc.cf}
#
#---> Omega on alignment channels
#
Omega_ALS_L1 3000 \
	      {dmt_wstream L1-ALS_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-ALS_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {L1-ALS_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on Alignment channels
#
Omega_ASC_L1 3000 \
	      {dmt_wstream L1-ASC_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-ASC_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {L1-ASC_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on calibrated h(t) data
#
Omega_HOFT_L1 300 \
	      {dmt_wstream L1-HOFT_OMEGA.cfg htStreamList.txt \
	      		   $DMTRIGDIR/L-HOFT_Omega/%5g 0} \
	      {$htpart} \
	      {-no-output:trend:data -log} \
	      {L1-HOFT_OMEGA.cfg htStreamList.txt}
#
#---> Omega on hepi (HPI) channels
#
Omega_HPI_L1 3000 \
	      {dmt_wstream L1-HPI_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-HPI_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {L1-HPI_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on hepi (HPI) channels
#
Omega_HPI_SLOW_L1 3000 \
	      {dmt_wstream L1-HPI_SLOW_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-HPI_SLOW_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {L1-HPI_SLOW_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on Alignment channels
#
Omega_IMC_L1 3000 \
	      {dmt_wstream L1-IMC_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-IMC_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {L1-IMC_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on Alignment channels
#
Omega_ISI_L1 3000 \
	      {dmt_wstream L1-ISI_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-ISI_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {L1-ISI_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on Alignment channels
#
Omega_ISI_SLOW_L1 3000 \
	      {dmt_wstream L1-ISI_SLOW_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-ISI_SLOW_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {L1-ISI_SLOW_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on channels measuring Length DOFs
#
Omega_LSC_L1 3000 \
	      {dmt_wstream L1-LSC_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-LSC_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {L1-LSC_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on channels measuring Length DOFs
#
Omega_OMC_L1 3000 \
	      {dmt_wstream L1-OMC_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-OMC_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {L1-OMC_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on environmental channels
#
Omega_PEM_L1 3000 \
	      {dmt_wstream L1-PEM_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-PEM_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {L1-PEM_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on slow environmental channels
#
Omega_PEM_SLOW_L1 3000 \
	      {dmt_wstream L1-PEM_SLOW_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-PEM_SLOW_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {L1-PEM_SLOW_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on pre-stablized laser channels
#
Omega_PSL_L1 3000 \
	      {dmt_wstream L1-PSL_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-PSL_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {L1-PSL_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on suspension (SUS) channels
#
Omega_SUS_L1 3000 \
	      {dmt_wstream L1-SUS_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-SUS_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {L1-SUS_OMEGA.cfg frameStreamList.txt}
#
#---> Omega on slow suspension (SUS) channels
#
Omega_SUS_SLOW_L1 3000 \
	      {dmt_wstream L1-SUS_SLOW_OMEGA.cfg frameStreamList.txt \
	      		   $DMTRIGDIR/L-SUS_Omega_Triggers} \
	      {$comnode} \
	      {-no-output:trend:data -log -disable} \
	      {L1-SUS_SLOW_OMEGA.cfg frameStreamList.txt}
#
#   PCalMon
#   Parameters modified as requested by Greg 1/8/2015
PCalMon_L1 300 \
	      {PCalMon -c L1:CAL-CS_LINE_SUM_DQ -f 35.3 \
	      	       -c L1:CAL-DARM_ERR_WHITEN_OUT_DBL_DQ -f 33.7 \
		       -c L1:CAL-DARM_ERR_WHITEN_OUT_DBL_DQ -f 34.7 \
		       -c L1:CAL-DARM_ERR_WHITEN_OUT_DBL_DQ -f 35.3 \
		       -c L1:CAL-DARM_ERR_WHITEN_OUT_DBL_DQ -f 331.3 \
		       -c L1:CAL-DARM_ERR_WHITEN_OUT_DBL_DQ -f 1083.1 \
		       -c L1:CAL-DARM_ERR_WHITEN_OUT_DBL_DQ -f 3001.1 \
		       -c L1:CAL-PCALY_RX_PD_OUT_DQ -f 34.7 \
		       -c L1:CAL-PCALY_RX_PD_OUT_DQ -f 331.3 \
		       -c L1:CAL-PCALY_RX_PD_OUT_DQ -f 1083.1 \
		       -c L1:CAL-PCALX_RX_PD_OUT_DQ -f 3001.1 \
		       -stride 10 -OSCfile l1_locked.osc \
		       -OSCcond L1:IFO_LOCKED -debug 0} \
              {$comnode} \
              {-no-output:data -log} \
              {l1_locked.osc}
#
#   PlaneMon
PlaneMon_LLO 200 \
		{PlaneMon -loc L -verbosity 2 -makejpg} \
		{$comnode} \
		{-no-output:data:trend} \
		{PlaneMon_LLO.conf}
#
#   Seismic BLRMS
Seis_Blrms_L1 125 \
	      {blrms_monitor	-mons Seis_Blrms_L1 \
				-if $DMTPARS/blrmsconfig_LLO.conf \
				-trendname Seis_Blrms \
				-of $DMTOUTPUT/blrms%t.data -mtxt no} \
	      {$float} \
	      {-no-output:data} \
	      {blrmsconfig_LLO.conf half_decade_set_3.filter}
#
#   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}
#
#   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.osc L1-HIFOY.osc SegGener_ODC_LLO.osc \
		 SegGener_LLO.cnf L1-HIFOY.cnf SegGener_ODC_LLO.cnf}
#
#   NS Binary inspiral sensitivity
#
SenseMonitor_L1 125 \
		{SenseMonitor -config SenseMonitor_hoft_L1.conf \
                              -partition $HOFTSMPART} \
                {$htpart} \
                {-no-output:data} \
                {SenseMonitor_hoft_L1.conf}
#
#   Binary BH inspiral sensitivity
#
SenseMonitor_BBH_30_30_L1 \
		{SenseMonitor -config $DMTPARS/SenseMonitor_BBH_30_30.conf} \
		{$float} \
		{-no-output:data} \
		{SenseMonitor_BBH_30_30.conf SenseMonitor_BBH_30_30.txt}
#
#   NS Binary inspiral sensitivity
#
SenseMonitor_CAL_L1 125 \
		{SenseMonitor -config SenseMonitor_CAL_L1.conf \
                              -partition $LIGOSMPART} \
                {$htpart} \
                {-no-output:data} \
                {SenseMonitor_CAL_L1.conf}
#
#---> SixtHertzMon
SixtyHertzMon_L1 200 \
        {SixtyHertzMon -c L1: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 L1} \
        {$float} \
        {-disable} \
        {}
#
