@@ -41,12 +41,14 @@ class StateBuilder:
4141 should not be used by itself, but subclassed.
4242 """
4343
44- def __init__ (self , logger = None ):
44+ def __init__ (self , logger = None , hrc_states = False ):
4545 if logger is None :
4646 # Make a logger but with no output
4747 logger = logging .getLogger ("statebuilder-no-logger" )
4848 self .logger = logger
4949 self .state_keys = STATE_KEYS .copy ()
50+ if hrc_states :
51+ self .state_keys += ["hrc_15v" , "hrc_24v" , "hrc_i" , "hrc_s" ]
5052
5153 def get_prediction_states (self , tlm ):
5254 """
@@ -132,9 +134,7 @@ def __init__(
132134 hrc_states : boolean, optional
133135 Whether to add HRC-specific states. Default: False
134136 """
135- super ().__init__ (logger = logger )
136- if hrc_states :
137- self .state_keys += ["hrc_15v" , "hrc_24v" , "hrc_i" , "hrc_s" ]
137+ super ().__init__ (logger = logger , hrc_states = hrc_states )
138138
139139 # Note: `interrupt` is ignored in this class. This concept is not needed
140140 # since backstop 6.9, which provides the RUNNING_LOAD_TERMINATION_TIME
@@ -247,6 +247,7 @@ def __init__(
247247 outdir = None ,
248248 verbose = 2 ,
249249 logger = None ,
250+ hrc_states = False ,
250251 ):
251252 """
252253 Give the ACISStateBuilder arguments that were passed in
@@ -270,6 +271,8 @@ def __init__(
270271 - obtained from the model invocation command line arguments.
271272 logger : Logger object, optional
272273 The Python Logger object to be used when logging.
274+ hrc_states : boolean, optional
275+ Whether to add HRC-specific states. Default: False
273276 """
274277 # Import the BackstopHistory class
275278 from backstop_history import BackstopHistory
@@ -284,7 +287,7 @@ def __init__(
284287 outdir ,
285288 verbose ,
286289 )
287- super ().__init__ ()
290+ super ().__init__ (hrc_states = hrc_states )
288291
289292 # Save some arguments to class attributes
290293 self .interrupt = interrupt
0 commit comments