attpcdaq.daq.models.Experiment¶
-
class
attpcdaq.daq.models.Experiment(*args, **kwargs)[source]¶ Represents an experiment and the settings relevant to one.
This model keeps track of run numbers and knows the name of the experiment. It is queried when rearranging data files at the end of a run, when the experiment name is used as the name of the directory in which to store the files.
Fields
nameThe name of the experiment. is_activeIs this the active experiment? Only one experiment may be active at a time. Properties
is_runningWhether a run is currently being recorded. latest_runGet the most recent run in the experiment. next_run_numberGet the number that the next run should have. Methods
start_run()Creates and saves a new RunMetadataobject with the next run number for the experiment.stop_run()Stops the current run. save(*args, **kwargs)Override of save to enforce only one active experiment at a time.