@@ -22,7 +22,16 @@ def number_of_pending_jobs():
2222
2323
2424def run_script (
25- script : str , date , config : Path , no_dl2 : bool , no_gainsel : bool , no_calib : bool , simulate : bool , force : bool
25+ script : str ,
26+ date ,
27+ config : Path ,
28+ no_dl2 : bool ,
29+ no_gainsel : bool ,
30+ no_calib : bool ,
31+ no_dl1ab : bool ,
32+ simulate : bool ,
33+ force : bool ,
34+ overwrite_tailcuts : bool ,
2635):
2736 """Run the sequencer for a given date."""
2837 osa_config = Path (config ).resolve ()
@@ -38,12 +47,18 @@ def run_script(
3847 if no_calib :
3948 cmd .append ("--no-calib" )
4049
50+ if no_dl1ab :
51+ cmd .append ("--no-dl1ab" )
52+
4153 if simulate :
4254 cmd .append ("--simulate" )
4355
4456 if force :
4557 cmd .append ("--force" )
4658
59+ if overwrite_tailcuts :
60+ cmd .append ("--overwrite-tailcuts" )
61+
4762 # Append the telescope to the command in the last place
4863 cmd .append ("LST1" )
4964
@@ -69,8 +84,10 @@ def get_list_of_dates(dates_file):
6984@click .option ("--no-dl2" , is_flag = True , help = "Do not run the DL2 step." )
7085@click .option ("--no-gainsel" , is_flag = True , help = "Do not require gain selection to be finished." )
7186@click .option ("--no-calib" , is_flag = True , help = "Do not run the calibration step." )
87+ @click .option ("--no-dl1ab" , is_flag = True , help = "Do not run the DL1AB step." )
7288@click .option ("-s" , "--simulate" , is_flag = True , help = "Activate simulation mode." )
7389@click .option ("-f" , "--force" , is_flag = True , help = "Force the autocloser to close the day." )
90+ @click .option ("--overwrite-tailcuts" , is_flag = True , help = "Overwrite the tailcuts config file if it already exists." )
7491@click .option (
7592 "-c" ,
7693 "--config" ,
@@ -79,7 +96,7 @@ def get_list_of_dates(dates_file):
7996 help = "Path to the OSA config file." ,
8097)
8198@click .argument (
82- "script" , type = click .Choice (["sequencer" , "closer" , "copy_datacheck" , "autocloser" ])
99+ "script" , type = click .Choice (["sequencer" , "closer" , "copy_datacheck" , "autocloser" , "sequencer_catB_tailcuts" ])
83100)
84101@click .argument ("dates-file" , type = click .Path (exists = True ))
85102def main (
@@ -89,9 +106,11 @@ def main(
89106 no_dl2 : bool = False ,
90107 no_gainsel : bool = False ,
91108 no_calib : bool = False ,
109+ no_dl1ab : bool = False ,
92110 simulate : bool = False ,
93111 force : bool = False ,
94- ):
112+ overwrite_tailcuts : bool = False ,
113+ ):
95114 """
96115 Loop over the dates listed in the input file and launch the script for each of them.
97116 The input file should list the dates in the format YYYY-MM-DD one date per line.
@@ -107,7 +126,7 @@ def main(
107126 # Avoid running jobs while it is still night time
108127 wait_for_daytime ()
109128
110- run_script (script , date , config , no_dl2 , no_gainsel , no_calib , simulate , force )
129+ run_script (script , date , config , no_dl2 , no_gainsel , no_calib , no_dl1ab , simulate , force , overwrite_tailcuts )
111130 log .info ("Waiting 1 minute to launch the process for the next date...\n " )
112131 time .sleep (60 )
113132
0 commit comments