File tree Expand file tree Collapse file tree
reconstruction/alert/src/test/java/org/jlab/service/alert Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package org .jlab .service .alert ;
2+
3+ import org .junit .Test ;
4+ import static org .junit .Assert .assertEquals ;
5+
6+ import org .jlab .io .base .DataEvent ;
7+ import org .jlab .detector .base .DetectorType ;
8+ import org .jlab .jnp .hipo4 .data .SchemaFactory ;
9+ import org .jlab .logging .DefaultLogger ;
10+ import org .jlab .utils .system .ClasUtilsFile ;
11+ import org .jlab .analysis .physics .TestEvent ;
12+ import org .jlab .service .atof .ATOFEngine ;
13+
14+ /**
15+ * @N-Plx
16+ */
17+ public class ATOFTest {
18+
19+ @ Test
20+ public void run () {
21+ System .setProperty ("CLAS12DIR" , "../../" );
22+ DefaultLogger .debug ();
23+ String dir = ClasUtilsFile .getResourceDir ("CLAS12DIR" , "etc/bankdefs/hipo4" );
24+ SchemaFactory schemaFactory = new SchemaFactory ();
25+ schemaFactory .initFromDirectory (dir );
26+
27+ DataEvent event = TestEvent .get (DetectorType .ATOF );
28+
29+ ATOFEngine engine = new ATOFEngine ();
30+ engine .init ();
31+ engine .processDataEvent (event );
32+
33+ event .show ();
34+ event .getBank ("ATOF::hits" ).show ();
35+ event .getBank ("ATOF::clusters" ).show ();
36+
37+ assertEquals (event .hasBank ("FAKE::Bank" ), false );
38+ assertEquals (event .hasBank ("ATOF::tdc" ), true );
39+ assertEquals (event .getBank ("ATOF::hits" ).rows (), 8 );
40+ }
41+
42+ public static void main (String [] args ) {
43+ ATOFTest t = new ATOFTest ();
44+ t .run ();
45+ }
46+ }
You can’t perform that action at this time.
0 commit comments