Skip to content

Commit

Permalink
Merge pull request #1062 from JeffersonLab/iss1061
Browse files Browse the repository at this point in the history
Fix an issue in SinglesTrigger2019ReadoutDriver
  • Loading branch information
tongtongcao authored Dec 10, 2024
2 parents 054ee5d + 9470e0e commit 7329532
Showing 1 changed file with 25 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,31 @@ public void process(EventHeader event) {
// Check that clusters are available for the trigger.
Collection<Cluster> clusters = null;
Collection<HodoscopePattern> hodoPatterns = null;
ArrayList<HodoscopePattern> hodoPatternList = null;
if(ReadoutDataManager.checkCollectionStatus(inputCollectionNameEcal, localTime) && ReadoutDataManager.checkCollectionStatus(inputCollectionNameHodo, localTime)) {
clusters = ReadoutDataManager.getData(localTime, localTime + 4.0, inputCollectionNameEcal, Cluster.class);
hodoPatterns = ReadoutDataManager.getData(localTime, localTime + 4.0, inputCollectionNameHodo, HodoscopePattern.class);

localTime += 4.0;

if(clusters.size() == 0 || hodoPatterns.size() == 0) return;

hodoPatternList = new ArrayList<>(hodoPatterns);

} else { return; }
ArrayList<HodoscopePattern> hodoPatternList = new ArrayList<>();

if(triggerType.equals("singles3")) {
if(ReadoutDataManager.checkCollectionStatus(inputCollectionNameEcal, localTime) && ReadoutDataManager.checkCollectionStatus(inputCollectionNameHodo, localTime)) {
clusters = ReadoutDataManager.getData(localTime, localTime + 4.0, inputCollectionNameEcal, Cluster.class);
hodoPatterns = ReadoutDataManager.getData(localTime, localTime + 4.0, inputCollectionNameHodo, HodoscopePattern.class);

localTime += 4.0;

if(clusters.size() == 0 || hodoPatterns.size() == 0) return;

hodoPatternList.addAll(hodoPatterns);

} else { return; }
}
else {
if(ReadoutDataManager.checkCollectionStatus(inputCollectionNameEcal, localTime)) {
clusters = ReadoutDataManager.getData(localTime, localTime + 4.0, inputCollectionNameEcal, Cluster.class);

localTime += 4.0;

if(clusters.size() == 0) return;

} else { return; }
}

// Track whether or not a trigger was seen.
boolean triggered = false;
Expand Down

0 comments on commit 7329532

Please sign in to comment.