Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
c1c6670
relax permissions and use decoder pool and new convenience method
baltzell Aug 27, 2026
76ab360
add multi-threaded recon-util
baltzell Aug 27, 2026
c047bcd
break it up
baltzell Aug 27, 2026
fa7f432
fininsh
baltzell Aug 27, 2026
11298f1
optimize
baltzell Aug 27, 2026
efc2394
cleanup
baltzell Aug 27, 2026
8c4e160
cleanup
baltzell Aug 27, 2026
71a0520
enlarge read queue
baltzell Aug 28, 2026
d8c8487
cleanup
baltzell Aug 28, 2026
124a0ee
cleanup
baltzell Aug 28, 2026
06c9b0b
try this
baltzell Aug 28, 2026
90d0c54
and the other one ...
baltzell Aug 28, 2026
448cdac
switch to recon-mutil in github ci test
baltzell Aug 30, 2026
4835468
fix
baltzell Aug 31, 2026
04d51ce
cleanup
baltzell Aug 31, 2026
4b54db4
switch to frames
baltzell Aug 31, 2026
28164eb
try this
baltzell Aug 31, 2026
b5e865a
try this
baltzell Aug 31, 2026
bc8f9e0
try this
baltzell Aug 31, 2026
0846c70
protect
baltzell Aug 31, 2026
bb64864
cleanup
baltzell Aug 31, 2026
5a52ade
release memory
baltzell Aug 31, 2026
535ce92
cleanup
baltzell Aug 31, 2026
ac9d837
fix
baltzell Aug 31, 2026
fff88ea
fix
baltzell Aug 31, 2026
dd4d5bf
switch scaling test to recon-mutil
baltzell Aug 31, 2026
056cdc5
no need for negatives for #events and #skip
baltzell Aug 31, 2026
e39db29
cleanup
baltzell Aug 31, 2026
2405005
cleanup
baltzell Aug 31, 2026
c176743
debug
baltzell Aug 31, 2026
a08374e
fixup
baltzell Aug 31, 2026
505db5f
fix
baltzell Aug 31, 2026
65b61d5
try this
baltzell Aug 31, 2026
f93f532
try this
baltzell Aug 31, 2026
48cc2de
fix
baltzell Aug 31, 2026
4474d7c
fix
baltzell Aug 31, 2026
86e98a0
fix
baltzell Aug 31, 2026
24a3342
fix
baltzell Aug 31, 2026
59075e8
cleanup
baltzell Aug 31, 2026
b5c130b
fix
baltzell Aug 31, 2026
63704cc
fix
baltzell Aug 31, 2026
3692d65
fix
baltzell Sep 1, 2026
001ae7a
normalize
baltzell Sep 1, 2026
a8977a5
start splitting
baltzell Sep 1, 2026
f899dd3
cleanup
baltzell Sep 1, 2026
cc305d1
reset
baltzell Sep 1, 2026
700dbcc
build clara from source
baltzell Sep 1, 2026
c6dca3d
fix path
baltzell Sep 1, 2026
6e2022f
fix
baltzell Sep 1, 2026
43390ab
cleanup
baltzell Sep 1, 2026
92adfb7
add getter for number of calls
baltzell Sep 1, 2026
4b3f0f0
add rethreading
baltzell Sep 1, 2026
2fbb0bf
cleanup
baltzell Sep 1, 2026
275ff78
reuse events during rethreading
baltzell Sep 1, 2026
fc96f68
cleanup, more accessibility
baltzell Sep 2, 2026
32fc55e
playing
baltzell Sep 2, 2026
e6cc9c3
start
baltzell Sep 2, 2026
57c42ac
more
baltzell Sep 2, 2026
6933b44
cleanup
baltzell Sep 2, 2026
0aac1c6
privatize
baltzell Sep 2, 2026
83ed13e
cleanup
baltzell Sep 2, 2026
a7bf60d
cleanup
baltzell Sep 2, 2026
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
9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,20 +224,15 @@ jobs:
clas_018779.evio.00001
- name: untar build
run: |
tar xzvf clara.tar.gz
tar xzvf coatjava.tar.gz
- run: ls
- name: run test
run: ./bin/run-clara -y ./etc/services/rgd-clarode.yml -t 4 -n 500 -c ./clara -o ./tmp ./clas_018779.evio.00001
- name: ls tmp
run: ls -lhtr tmp
- name: rename
run: mv -v tmp/rec_clas_018779.evio.00001.hipo rec.hipo
run: ./coatjava/bin/recon-mutil -t 4 -n 500 -y etc/services/rgd-clarode.yml -o rec_clas_018779.evio.00001.hipo -i clas_018779.evio.00001
- uses: actions/upload-artifact@v7
with:
name: test_clara_result
retention-days: 1
path: rec.hipo
path: rec_clas_018779.evio.00001.hipo

test_coatjava:
needs: [ build ]
Expand Down
12 changes: 12 additions & 0 deletions bin/recon-mutil
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

. `dirname $0`/../libexec/env.sh

split_cli $@

export MALLOC_ARENA_MAX=1

java ${JAVA_OPTS-} -Xms10240m -XX:+UseParallelGC ${jvm_options[@]} \
-cp ${COATJAVA_CLASSPATH:-''} \
org.jlab.clas.reco.ReconMutil \
${class_options[@]}
2 changes: 1 addition & 1 deletion build-coatjava.sh
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,6 @@ done
echo "installed coatjava to: $prefix_dir"

# install clara
if $installClara; then ./bin/install-clara -c $prefix_dir $clara_home; fi
if $installClara; then ./bin/install-clara -b -c $prefix_dir $clara_home; fi

echo "COATJAVA SUCCESSFULLY BUILT !"
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
import org.jlab.clara.engine.EngineDataType;
import java.util.Arrays;
import org.jlab.coda.jevio.EvioException;
import org.jlab.detector.decode.CLASDecoder4;
import org.jlab.detector.decode.CLASDecoder;
import org.jlab.detector.decode.CLASDecoderPool;
import org.jlab.io.evio.EvioDataEvent;
import org.jlab.io.evio.EvioSource;
import org.jlab.io.hipo.HipoDataEvent;
import org.jlab.jnp.hipo4.data.Event;
import org.jlab.jnp.hipo4.data.SchemaFactory;
import org.json.JSONObject;
import org.jlab.utils.ClaraYaml;
Expand All @@ -36,13 +35,13 @@ public class EngineProcessor {
public static final String ENGINE_CLASS_BG = "org.jlab.service.bg.BackgroundEngine";
public static final String ENGINE_CLASS_PP = "org.jlab.service.postproc.PostprocEngine";

private final Map<String,ReconstructionEngine> processorEngines = new LinkedHashMap<>();
protected final Map<String,ReconstructionEngine> processorEngines = new LinkedHashMap<>();
private static final Logger LOGGER = Logger.getLogger(EngineProcessor.class.getPackage().getName());
private boolean updateDictionary = true;
private SchemaFactory banksToKeep = null;
private final List<String> schemaExempt = Arrays.asList("RUN::config","DC::tdc");

private CLASDecoder4 decoder = new CLASDecoder4();
protected final CLASDecoderPool decoders = new CLASDecoderPool(64,"default",null);

public EngineProcessor(){}

Expand Down Expand Up @@ -94,7 +93,7 @@ private void setPreloadFiles(String filenames, boolean restream, boolean rebuild
findEngine(ENGINE_CLASS_PP).init();
}

private void updateDictionary(HipoDataSource source, HipoDataSync sync){
protected void updateDictionary(HipoDataSource source, HipoDataSync sync){
SchemaFactory fsync = sync.getWriter().getSchemaFactory();
SchemaFactory fsrc = source.getReader().getSchemaFactory();
List<String> schemaList = fsync.getSchemaKeys();
Expand Down Expand Up @@ -255,7 +254,8 @@ public void addEngine(String name, String clazz, String jsonConf) {
}
this.processorEngines.put(name == null ? engine.getName() : name, engine);
} else {
LOGGER.log(Level.SEVERE, ">>>> ERROR: class is not a reconstruction engine : {0}", clazz);
LOGGER.log( clazz.contains("DecoderEngine") ? Level.INFO : Level.SEVERE,
"Class is not a reconstruction engine : {0}", clazz);
}

} catch (ClassNotFoundException | InstantiationException | IllegalAccessException ex) {
Expand Down Expand Up @@ -342,9 +342,13 @@ public void processFile(EvioSource reader, HipoDataSync writer, int skipEvents,
ByteBuffer bb = reader.getEventBuffer(eventsRead, true);
if (skipEvents <= 0 || eventsRead > skipEvents) {
EvioDataEvent evio = new EvioDataEvent(bb.array(), ByteOrder.LITTLE_ENDIAN);
Event hipo = decoder.getDecodedEvent(evio, -1, eventsRead, null, null);
HipoDataEvent hipo2 = new HipoDataEvent(hipo, decoder.getSchemaFactory());
processEvent(hipo2, writer);
try {
CLASDecoder d = decoders.take();
processEvent(d.getDecodedDataEvenet(evio), writer);
decoders.put(d);
} catch (InterruptedException ex) {
System.getLogger(EngineProcessor.class.getName()).log(System.Logger.Level.ERROR, (String) null, ex);
}
}
if (maxEvents > 0 && eventsRead > maxEvents+skipEvents) break;
} catch (EvioException ex) {
Expand Down Expand Up @@ -394,17 +398,17 @@ protected static OptionParser getParser() {
OptionParser parser = new OptionParser("recon-util");
parser.addRequired("-o","output.hipo");
parser.addRequired("-i","input.evio/hipo");
parser.setRequiresInputList(false);
parser.addOption("-c","0","use default configuration [0 - no, 1 - yes/default, 2 - all services] ");
parser.addOption("-s","-1","number of events to skip");
parser.addOption("-n","-1","number of events to process");
parser.addOption("-s","0","number of events to skip");
parser.addOption("-n","0","number of events to process");
parser.addOption("-y","0","yaml file");
parser.addOption("-u","true","update dictionary from writer ? ");
parser.addOption("-S",null,"schema directory");
parser.addOption("-B",null,"background file");
parser.addOption("-P",null,"preload file for post-processing");
parser.addOption("-R","0","rebuild scalers");
parser.addOption("-H","0","restream helicity");
parser.setRequiresInputList(false);
return parser;
}

Expand Down
Loading
Loading