-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
the SuMo library needs to get rewritten so that it is easily interface-able with the ANNIE ToolDAQ. To accomplish this, we need to create a spec that defines the usage of the PSEC electronics in terms of library methods. I propose the following methods and members and will work on reimplementing the code to reflect it
class SuMoInterface {
SuMoInterface();
~SuMoInterface();
void configure(string filename);
void getStatus();
void calibrate();
bool hasTriggered();
void forceTrigger();
DataClass getData();
void reset();
private:
SuMo sumo;
};
The corresponding code for ToolDAQ would look someting like this:
void initialise() {
SuMoInterface s;
s.configure("myconfig.yaml");
s.calibrate();
}
void execute() {
if (someGlobalTrigger) {
s.forceTrigger()
DataClass data = s.getData();
parseData(data);
else if (s.hasTriggered()) {
DataClass data = s.getData();
parseData(data);
}
}
void finalise() {}
void parseData(DataClass data) {
// Whatever code needed to put data into the data-model
}
I would really appreciate additions and comments.
Metadata
Metadata
Assignees
Labels
No labels