-
Notifications
You must be signed in to change notification settings - Fork 28
Add uber services #896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add uber services #896
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1280717
add uber engines
baltzell 0416ad5
abort asap
baltzell 1f9e0cf
use rg-d
baltzell 5448763
fix file name
baltzell e0cdfa6
use rg-d
baltzell 45bcf12
fix bogus stock schema dir
baltzell dc4c5de
fix bogus stock schema names
baltzell 5eccd72
add aicv uber service
baltzell c925ebc
use an rg-d run number
baltzell 1eb7fcf
restore commented-out yaml parameters
baltzell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
83 changes: 83 additions & 0 deletions
83
common-tools/clas-reco/src/main/java/org/jlab/clas/reco/UberEngine.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| package org.jlab.clas.reco; | ||
|
|
||
| import java.util.ArrayList; | ||
| import org.jlab.clara.engine.EngineData; | ||
| import org.jlab.io.base.DataEvent; | ||
|
|
||
| /** | ||
| * A ReconstructionEngine that is a chain of ReconstructionEngines. | ||
| * | ||
| * @author baltzell | ||
| */ | ||
| public abstract class UberEngine extends ReconstructionEngine { | ||
|
|
||
| private final ArrayList<ReconstructionEngine> engines = new ArrayList<>(); | ||
|
|
||
| public UberEngine(String name, String author, String version) { | ||
| super(name,author,version); | ||
| } | ||
|
|
||
| /** | ||
| * Add engines to the chain. | ||
| * @param e | ||
| */ | ||
| protected void add(ReconstructionEngine... e) { | ||
| for (int i=0; i<e.length; ++i) { | ||
| if (UberEngine.class.isInstance(e[i])) | ||
| throw new RuntimeException("UberEngine cannot contain an UberEngine."); | ||
| engines.add(e[i]); | ||
| } | ||
| } | ||
|
|
||
| @Override | ||
| public boolean processDataEvent(DataEvent event) { | ||
| throw new RuntimeException("UberEngine does not implement processDataEvent."); | ||
| } | ||
|
|
||
| /** | ||
| * Process one event through the chain of engines. | ||
| * @param event | ||
| */ | ||
| @Override | ||
| public final void filterEvent(DataEvent event) { | ||
| for (ReconstructionEngine e : engines) | ||
| e.filterEvent(event); | ||
| } | ||
|
|
||
| /** | ||
| * Run all engines' init methods. | ||
| * @return | ||
| */ | ||
| @Override | ||
| public final boolean init() { | ||
| boolean ret = true; | ||
| for (ReconstructionEngine e : engines) | ||
| if (!e.init()) ret = false; | ||
| return ret; | ||
| } | ||
|
|
||
| /** | ||
| * Run all engines' configure methods. | ||
| * @param ed | ||
| * @return | ||
| */ | ||
| @Override | ||
| public EngineData configure(EngineData ed) { | ||
| for (ReconstructionEngine e : engines) { | ||
| e.configure(ed); | ||
| } | ||
| return ed; | ||
| } | ||
|
|
||
| /** | ||
| * Run all engines' execute methods. | ||
| * @param ed | ||
| * @return | ||
| */ | ||
| @Override | ||
| public EngineData execute(EngineData ed) { | ||
| for (ReconstructionEngine e : engines) | ||
| ed = e.execute(ed); | ||
| return ed; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| configuration: | ||
| global: | ||
| variation: rgd_fall2023 | ||
| #dcMinistagger: "NOTONREFWIRE" | ||
| #dcFeedthroughs: "OFF" | ||
| io-services: | ||
| writer: | ||
| schema_dir: dst | ||
| services: | ||
| 1ST: | ||
| magfieldSolenoidMap: Symm_solenoid_r601_phi1_z1201_13June2018.dat | ||
| magfieldTorusMap: Full_torus_r251_phi181_z251_25Jan2021.dat | ||
| HB: | ||
| run: "19000" | ||
| io-services: | ||
| reader: | ||
| class: org.jlab.io.clara.DecoderReader | ||
| name: DecoderReader | ||
| writer: | ||
| class: org.jlab.io.clara.DecoderWriter | ||
| name: DecoderWriter | ||
| services: | ||
| - class: org.jlab.service.uber.Uber$First | ||
| name: 1ST | ||
| - class: org.jlab.service.uber.Uber$ForwardTagger | ||
| name: FT | ||
| - class: org.jlab.service.uber.Uber$Central | ||
| name: CD | ||
| - class: org.jlab.service.uber.Uber$HitBasedAI | ||
| name: HB | ||
| - class: org.jlab.service.uber.Uber$TimeBasedCV | ||
| name: TB | ||
| - class: org.jlab.service.uber.Uber$Last | ||
| name: NTH | ||
| mime-types: | ||
| - binary/data-hipo | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| configuration: | ||
| global: | ||
| variation: rgd_fall2023 | ||
| # dcMinistagger: "NOTONREFWIRE" | ||
| # dcFeedthroughs: "OFF" | ||
| io-services: | ||
| writer: | ||
| schema_dir: dst | ||
| services: | ||
| 1ST: | ||
| magfieldSolenoidMap: Symm_solenoid_r601_phi1_z1201_13June2018.dat | ||
| magfieldTorusMap: Full_torus_r251_phi181_z251_25Jan2021.dat | ||
| HB: | ||
| run: "19000" | ||
| io-services: | ||
| reader: | ||
| class: org.jlab.io.clara.DecoderReader | ||
| name: DecoderReader | ||
| writer: | ||
| class: org.jlab.io.clara.DecoderWriter | ||
| name: DecoderWriter | ||
| services: | ||
| - class: org.jlab.service.uber.Uber$First | ||
| name: 1ST | ||
| - class: org.jlab.service.uber.Uber$ForwardTagger | ||
| name: FT | ||
| - class: org.jlab.service.uber.Uber$Central | ||
| name: CD | ||
| - class: org.jlab.service.uber.Uber$HitBasedAICV | ||
| name: HB | ||
| - class: org.jlab.service.uber.Uber$TimeBasedAICV | ||
| name: TB | ||
| - class: org.jlab.service.uber.Uber$Last | ||
| name: NTH | ||
| mime-types: | ||
| - binary/data-hipo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| configuration: | ||
| global: | ||
| variation: rgd_fall2023 | ||
| io-services: | ||
| writer: | ||
| schema_dir: dst | ||
| services: | ||
| 1ST: | ||
| magfieldSolenoidMap: Symm_solenoid_r601_phi1_z1201_13June2018.dat | ||
| magfieldTorusMap: Full_torus_r251_phi181_z251_25Jan2021.dat | ||
| HB: | ||
| run: "19000" | ||
| io-services: | ||
| reader: | ||
| class: org.jlab.io.clara.DecoderReader | ||
| name: DecoderReader | ||
| writer: | ||
| class: org.jlab.io.clara.DecoderWriter | ||
| name: DecoderWriter | ||
| services: | ||
| - class: org.jlab.service.uber.Uber$First | ||
| name: 1ST | ||
| - class: org.jlab.service.uber.Uber$ForwardTagger | ||
| name: FT | ||
| - class: org.jlab.service.uber.Uber$Central | ||
| name: CD | ||
| - class: org.jlab.service.uber.Uber$HitBasedCV | ||
| name: HB | ||
| - class: org.jlab.service.uber.Uber$TimeBasedCV | ||
| name: TB | ||
| - class: org.jlab.service.uber.Uber$Last | ||
| name: NTH | ||
| mime-types: | ||
| - binary/data-hipo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.