Skip to content

Commit 48eaa66

Browse files
authored
Merge pull request #24 from baltzell/development
Actually use the new waveform conversion approach for AHDC
2 parents 5636a1a + 0bd4108 commit 48eaa66

File tree

2 files changed

+24
-25
lines changed

2 files changed

+24
-25
lines changed

common-tools/clas-detector/src/main/java/org/jlab/detector/decode/CLASDecoder4.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import org.jlab.detector.helicity.HelicityBit;
1515
import org.jlab.detector.helicity.HelicitySequence;
1616
import org.jlab.detector.helicity.HelicityState;
17-
import org.jlab.detector.pulse.Mode3;
17+
import org.jlab.detector.pulse.ModeAHDC;
1818

1919
import org.jlab.logging.DefaultLogger;
2020

@@ -47,8 +47,8 @@ public class CLASDecoder4 {
4747
private HipoDataEvent hipoEvent = null;
4848
private boolean isRunNumberFixed = false;
4949
private int decoderDebugMode = 0;
50-
private SchemaFactory schemaFactory = new SchemaFactory();
51-
private Mode3 mode3 = new Mode3();
50+
private SchemaFactory schemaFactory = new SchemaFactory();
51+
private ModeAHDC ahdcExtractor = new ModeAHDC();
5252

5353
public CLASDecoder4(boolean development){
5454
codaDecoder = new CodaEventDecoder();
@@ -248,7 +248,7 @@ public List<DetectorDataDgtz> getEntriesSCALER(DetectorType type,
248248
}
249249

250250
public void extractPulses(Event event) {
251-
mode3.update(6, null, event, schemaFactory, "AHDC::wf", "AHDC::adc");
251+
ahdcExtractor.update(6, null, event, schemaFactory, "AHDC::wf", "AHDC::adc");
252252
}
253253

254254
public Bank getDataBankWF(String name, DetectorType type) {

etc/bankdefs/hipo4/data.json

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
[
2+
{
3+
"name" : "AHDC::wf",
4+
"group": 22400,
5+
"item" : 10,
6+
"info": "Waveform bank for the AHDC",
7+
"entries":[
8+
{ "name":"sector" , "type":"B", "info":"sector"},
9+
{ "name":"layer" , "type":"B", "info":"layer (1-6)"},
10+
{ "name":"component" , "type":"S", "info":"strips"},
11+
{ "name":"order" , "type":"B", "info":"order: 0 - ADCL , 1 - ADCR"},
12+
{ "name":"timestamp" , "type":"L", "info":"timestamp"},
13+
{ "name":"s1" , "type":"S", "info":"sample #1"},
14+
{ "name":"s2" , "type":"S", "info":"sample #2"},
15+
{ "name":"s3" , "type":"S", "info":"sample #3"},
16+
{ "name":"s4" , "type":"S", "info":"sample #4"},
17+
{ "name":"s5" , "type":"S", "info":"sample #5"},
18+
{ "name":"s6" , "type":"S", "info":"sample #6"}
19+
]
20+
},
221
{
322
"name" : "AHDC::adc",
423
"group": 22400,
@@ -42,27 +61,7 @@
4261
{ "name":"time" , "type":"F", "info":"time from pulse fit"},
4362
{ "name":"ped" , "type":"S", "info":"pedestal from pulse analysis"},
4463
{ "name":"integral" , "type":"I", "info":"ADC integral (sum over the pulse)"},
45-
{ "name":"timestamp" , "type":"L", "info":"timestamp"},
46-
{ "name":"id" , "type":"S", "info":"link to BMT::wf"}
47-
]
48-
},
49-
{
50-
"name" : "BMT::wf",
51-
"group": 20100,
52-
"item" : 12,
53-
"info": "WF bank for the Barrel MicroMegas Tracker",
54-
"entries":[
55-
{ "name":"sector" , "type":"B", "info":"sector"},
56-
{ "name":"layer" , "type":"B", "info":"layer (1-6)"},
57-
{ "name":"component" , "type":"S", "info":"strips"},
58-
{ "name":"order" , "type":"B", "info":"order: 0 - ADCL , 1 - ADCR"},
59-
{ "name":"timestamp" , "type":"L", "info":"timestamp"},
60-
{ "name":"s1" , "type":"S", "info":"sample #1"},
61-
{ "name":"s2" , "type":"S", "info":"sample #2"},
62-
{ "name":"s3" , "type":"S", "info":"sample #3"},
63-
{ "name":"s4" , "type":"S", "info":"sample #4"},
64-
{ "name":"s5" , "type":"S", "info":"sample #5"},
65-
{ "name":"s6" , "type":"S", "info":"sample #6"}
64+
{ "name":"timestamp" , "type":"L", "info":"timestamp"}
6665
]
6766
},
6867
{

0 commit comments

Comments
 (0)