package test.microlevel.tonicfiring;
...
import java.util.*;
import repast.simphony.*;
...
public class TonicFiringTester extends TesterAgent {
  ...
  private Vector<Double> mnSpikes;
  private Vector<Double> fnActivities; 

  public TonicFiringTester() {
    ...
    mnSpikes = new Vector<Double>();
    fnActivities = new Vector<Double>();
  }

  @Watch(watcheeClassName="motorunit.RunningNeuron", 
  watcheeFieldNames = "membranePotential", 
  query = "colocated", 
  triggerCondition = "$watchee.getPotential()>-45", 
  whenToTrigger = WatcherTriggerSchedule.IMMEDIATE)
  public void monitorMotorneuronActivity() {
    double tick=RepastEnvironment.getCurrentTick();
    mnSpikes.add(tick);
  }

  @Watch(watcheeClassName="motorunit.FakeNeuron", 
  watcheeFieldNames = "membranePotential", 
  query = "colocated", 
  triggerCondition = "$watchee.getPotential()>-55", 
  whenToTrigger = WatcherTriggerSchedule.IMMEDIATE)
  public void monitorFakeNeuronActivity() {
    double tick=RepastEnvironment.getCurrentTick();
    fnActivities.add(tick);
  }
  ...
}
