Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
}
36 changes: 36 additions & 0 deletions etc/services/data-ai-uber.yml
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
2 changes: 1 addition & 1 deletion etc/services/data-ai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ configuration:
# dcFeedthroughs: "OFF"
io-services:
writer:
schema_dir: data-ai
schema_dir: dst
services:
MAGFIELDS:
magfieldSolenoidMap: Symm_solenoid_r601_phi1_z1201_13June2018.dat
Expand Down
36 changes: 36 additions & 0 deletions etc/services/data-aicv-uber.yml
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
4 changes: 2 additions & 2 deletions etc/services/data-aicv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ services:
name: CALIB
configuration:
global:
variation: rgb_spring2019
variation: rgd_fall2023
# timestamp: 12/31/2020-00:00:00
## uncomment the following two lines for compatibility with alignments before the DC fixes
# dcMinistagger: "NOTONREFWIRE"
# dcFeedthroughs: "OFF"
io-services:
writer:
schema_dir: data-aicv
schema_dir: dst
#schema_dir: "/home/clas12-1/chef/myClara/plugins/clas12/etc/bankdefs/dst"
services:
MAGFIELDS:
Expand Down
34 changes: 34 additions & 0 deletions etc/services/data-cv-uber.yml
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
4 changes: 2 additions & 2 deletions etc/services/data-cv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ services:
name: CALIB
configuration:
global:
variation: rgb_spring2019
variation: rgd_fall2023
# timestamp: 12/31/2020-00:00:00
# triggerMask: "0x1"
## uncomment the following two lines for compatibility with alignments before the DC fixes
# dcMinistagger: "NOTONREFWIRE"
# dcFeedthroughs: "OFF"
io-services:
writer:
schema_dir: data-cv
schema_dir: dst
services:
MAGFIELDS:
magfieldSolenoidMap: Symm_solenoid_r601_phi1_z1201_13June2018.dat
Expand Down
2 changes: 1 addition & 1 deletion etc/services/mc-ai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ configuration:
# dcFeedthroughs: "OFF"
io-services:
writer:
schema_dir: mc-ai
schema_dir: dst
#schema_dir: "/home/clas12-1/chef/myClara/plugins/clas12/etc/bankdefs/dst"
services:
MAGFIELDS:
Expand Down
2 changes: 1 addition & 1 deletion etc/services/mc-cv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ configuration:
# dcFeedthroughs: "OFF"
io-services:
writer:
schema_dir: mc-cv
schema_dir: dst
services:
MAGFIELDS:
magfieldSolenoidMap: Symm_solenoid_r601_phi1_z1201_13June2018.dat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public DCHBPostClusterAI() {
this.getBanks().init("HitBasedTrkg", "", "AI");
}

public DCHBPostClusterAI(String outputBankPrefix) {
super("DCHAI");
this.getBanks().init("HitBasedTrkg", "", outputBankPrefix);
}

@Override
public void setDropBanks() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ public EBTBAIEngine(){
setUsePOCA(false);
}

public EBTBAIEngine(String outputBankPrefix) {
super("EBTBAI");
setUsePOCA(false);
setOutputBankPrefix(outputBankPrefix);
}

@Override
public boolean processDataEvent(DataEvent de) {
return super.processDataEvent(de,ebScalers);
Expand Down
1 change: 1 addition & 0 deletions reconstruction/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<module>postproc</module>
<module>recoil</module>
<module>calib</module>
<module>uber</module>
</modules>

<build>
Expand Down
Loading