Commit fc708dcc authored by Bryan Cazabonne's avatar Bryan Cazabonne
Browse files

Merge branch 'issue-847' into release-11.0

parents 98d5a68a c41d69b0
......@@ -247,7 +247,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H2);
return Stream.of(H2, COMMENTS);
}
},
......@@ -283,7 +283,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H3);
return Stream.of(H3, COMMENTS);
}
},
......@@ -320,7 +320,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H4);
return Stream.of(H4, COMMENTS);
}
},
......@@ -385,7 +385,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H5, C0);
return Stream.of(H5, C0, COMMENTS);
}
},
......@@ -412,7 +412,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(C0);
return Stream.of(C0, COMMENTS);
}
},
......@@ -444,7 +444,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(C1, C2, C3, C4, C5, C6, C7, TEN, ELEVEN, METEO, ANGLES, CALIB, STAT, COMPATIBILITY);
return Stream.of(C1, C2, C3, C4, C5, C6, C7, TEN, ELEVEN, METEO, ANGLES, CALIB, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -481,7 +481,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(C2, C3, C4, C5, C6, C7, TEN, ELEVEN, METEO, ANGLES, CALIB, STAT, COMPATIBILITY);
return Stream.of(C2, C3, C4, C5, C6, C7, TEN, ELEVEN, METEO, ANGLES, CALIB, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -528,7 +528,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(C3, C4, C5, C6, C7, TEN, ELEVEN, METEO, ANGLES, CALIB, STAT, COMPATIBILITY);
return Stream.of(C3, C4, C5, C6, C7, TEN, ELEVEN, METEO, ANGLES, CALIB, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -562,7 +562,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(C4, C5, C6, C7, TEN, ELEVEN, METEO, ANGLES, CALIB, STAT, COMPATIBILITY);
return Stream.of(C4, C5, C6, C7, TEN, ELEVEN, METEO, ANGLES, CALIB, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -605,7 +605,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(C5, C6, C7, TEN, ELEVEN, METEO, ANGLES, CALIB, STAT, COMPATIBILITY);
return Stream.of(C5, C6, C7, TEN, ELEVEN, METEO, ANGLES, CALIB, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -638,7 +638,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(C6, C7, TEN, ELEVEN, METEO, ANGLES, CALIB, STAT, COMPATIBILITY);
return Stream.of(C6, C7, TEN, ELEVEN, METEO, ANGLES, CALIB, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -676,7 +676,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(C7, TEN, ELEVEN, METEO, ANGLES, CALIB, STAT, COMPATIBILITY);
return Stream.of(C7, TEN, ELEVEN, METEO, ANGLES, CALIB, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -693,7 +693,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(TEN, ELEVEN, METEO, ANGLES, CALIB, STAT, COMPATIBILITY);
return Stream.of(TEN, ELEVEN, METEO, ANGLES, CALIB, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -723,7 +723,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H8, TEN, TWELVE, METEO, ANGLES, CALIB, STAT, COMPATIBILITY);
return Stream.of(H8, TEN, TWELVE, METEO, ANGLES, CALIB, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -754,7 +754,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H8, ELEVEN, TWELVE, METEO, ANGLES, CALIB, STAT, COMPATIBILITY);
return Stream.of(H8, ELEVEN, TWELVE, METEO, ANGLES, CALIB, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -771,7 +771,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H8, TEN, ELEVEN, TWELVE, METEO, ANGLES, CALIB, STAT, COMPATIBILITY);
return Stream.of(H8, TEN, ELEVEN, TWELVE, METEO, ANGLES, CALIB, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -803,7 +803,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H8, METEO, METEO_SUPP, TEN, ELEVEN, TWELVE, ANGLES, CALIB, STAT, COMPATIBILITY);
return Stream.of(H8, METEO, METEO_SUPP, TEN, ELEVEN, TWELVE, ANGLES, CALIB, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -820,7 +820,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H8, METEO, METEO_SUPP, TEN, ELEVEN, TWELVE, ANGLES, CALIB, STAT, COMPATIBILITY);
return Stream.of(H8, METEO, METEO_SUPP, TEN, ELEVEN, TWELVE, ANGLES, CALIB, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -865,7 +865,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H8, METEO, TEN, ELEVEN, ANGLES, CALIB, STAT, COMPATIBILITY);
return Stream.of(H8, METEO, TEN, ELEVEN, ANGLES, CALIB, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -882,7 +882,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H8, METEO, CALIB, CALIB_DETAILS, CALIB_SHOT, TEN, ELEVEN, TWELVE, ANGLES, STAT, COMPATIBILITY);
return Stream.of(H8, METEO, CALIB, CALIB_DETAILS, CALIB_SHOT, TEN, ELEVEN, TWELVE, ANGLES, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -899,7 +899,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H8, METEO, CALIB, CALIB_DETAILS, CALIB_SHOT, TEN, ELEVEN, TWELVE, ANGLES, STAT, COMPATIBILITY);
return Stream.of(H8, METEO, CALIB, CALIB_DETAILS, CALIB_SHOT, TEN, ELEVEN, TWELVE, ANGLES, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -916,7 +916,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H8, METEO, CALIB, CALIB_DETAILS, CALIB_SHOT, TEN, ELEVEN, TWELVE, ANGLES, STAT, COMPATIBILITY);
return Stream.of(H8, METEO, CALIB, CALIB_DETAILS, CALIB_SHOT, TEN, ELEVEN, TWELVE, ANGLES, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -933,7 +933,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H8, METEO, CALIB, CALIB_DETAILS, CALIB_SHOT, TEN, ELEVEN, TWELVE, ANGLES, STAT, COMPATIBILITY, H8);
return Stream.of(H8, METEO, CALIB, CALIB_DETAILS, CALIB_SHOT, TEN, ELEVEN, TWELVE, ANGLES, STAT, COMPATIBILITY, H8, COMMENTS);
}
},
......@@ -950,7 +950,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H8, METEO, CALIB, CALIB_DETAILS, CALIB_SHOT, TEN, ELEVEN, TWELVE, ANGLES, STAT, COMPATIBILITY);
return Stream.of(H8, METEO, CALIB, CALIB_DETAILS, CALIB_SHOT, TEN, ELEVEN, TWELVE, ANGLES, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -971,7 +971,9 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H1, H2, H3, H4, H5, H8, C0, C1, C2, C3, C4, C5, C6, C7);
return Stream.of(H1, H2, H3, H4, H5, H8, H9, C0, C1, C2, C3, C4, C5, C6, C7, TEN, ELEVEN, TWELVE, METEO,
METEO_SUPP, ANGLES, CALIB, CALIB_DETAILS, CALIB_SHOT, STAT, COMPATIBILITY, COMMENTS);
}
},
......@@ -1001,7 +1003,7 @@ public class CRDParser {
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H1, H9);
return Stream.of(H1, H9, COMMENTS);
}
},
......
......@@ -539,6 +539,23 @@ public class CRDParserTest {
}
@Test
public void testIssue847() throws IOException {
// Read the file
final String ex = "/ilrs/lageos1-test.npt";
final CRD file = new CRDParser().parse(new DataSource(ex, () -> getClass().getResourceAsStream(ex)));
// Verify
Assert.assertEquals(6, file.getComments().size());
Assert.assertEquals("New CFD in the STOP channel", file.getComments().get(0));
Assert.assertEquals("No CFD in the START channel", file.getComments().get(1));
Assert.assertEquals("New experimental detector (transistor) in the START channel**", file.getComments().get(2));
Assert.assertEquals("New CFD in the STOP channel", file.getComments().get(3));
Assert.assertEquals("No CFD in the START channel", file.getComments().get(4));
Assert.assertEquals("New experimental detector (transistor) in the START channel", file.getComments().get(5));
}
@Before
public void setUp() {
Utils.setDataRoot("regular-data");
......
H1 CRD 1 2021 01 19 23
H2 KTZL 1893 18 01 4
H3 lageos1 7603901 1155 8820 0 1
H4 1 2021 01 19 23 04 46 2021 01 19 23 15 03 0 0 0 0 1 0 2 0
C0 0 532.0 PDAS PCOD NCOL NCOT
C1 0 NCOL ND-YAG 1064.0 10.0 100. 250. 30. 1
C2 0 PCOD PMT 532.0 6. 950.0 .2 PHOTON-DEP 950.0 .2 40. 50. CFD
C3 0 NCOT GPS_Trimble_Thunderbolt_E GPS_Trimble_Thunderbolt_E SR620 02379 .0
60 PDAS 0 3
00 New CFD in the STOP channel
00 No CFD in the START channel
00 New experimental detector (transistor) in the START channel**
40 82905.0 0 PDAS 100 100 -1.000 114600. -50. 153. -1.000 -1.000 -1.0 3 2 0
20 82905.0 1018.0 271.25 44. 0
50 PDAS 130. -1.000 -1.000 -1.0 0
11 83098.3290105 .048305496438 PDAS 2 120 7 48. -1.000 -1.000 -1.0 -1.0 0
11 83174.4241325 .047868166718 PDAS 2 120 2 214. -1.000 -1.000 -1.0 -1.0 0
11 83405.2093544 .047156181526 PDAS 2 120 3 78. -1.000 -1.000 -1.0 -1.0 0
11 83703.1902849 .047649035124 PDAS 2 120 2 29. -1.000 -1.000 -1.0 -1.0 0
20 83860.0 1018.0 271.75 43. 0
40 83860.0 0 PDAS 100 100 -1.000 114650. -50. 183. -1.000 -1.000 -1.0 3 2 0
H8
H1 CRD 01 2021 03 07 18
H2 GRZL 7839 34 02 4
H3 lageos1 7603901 1155 08820 0 1
H4 1 2021 3 6 23 27 40 2021 3 7 0 25 40 0 0 0 0 1 0 2 0
C0 0 532.000 0902 2kHz C_SPAD1 GPS
C1 0 2kHz Nd:Van 1064 2000 0.400 10 10 1
C2 0 C_SPAD1 SPAD 532.0 20 5.0 400 +1V 10 0.3 35 300 WinClean2.2
C3 0 GPS HP58503A HP58503A Graz_Dassault NoSN 0.077
20 85000 970.07 271.92 46.9 1
20 1330 969.72 271.57 49.3 1
40 85000 0 0902 10000 7867 1.742 112113.7 -3.5 16 0.018 -0.632 0 2 2 0
40 1330 0 0902 10000 7802 1.742 112110.2 -3.5 16 0.003 -0.662 -2 2 2 0
11 85023.622463567184 0.054871963187 0902 2 120.0 3649 34.8 0.176 -1.043 -20.9 1.5 0
11 85488.418763574208 0.047872200126 0902 2 120.0 2864 36.0 0.190 -1.076 -18.6 1.2 0
11 86250.143563567664 0.043311230157 0902 2 120.0 11019 35.2 0.258 -1.115 -23.5 4.6 0
11 101.312063571997 0.044236844760 0902 2 120.0 1988 37.0 0.279 -1.109 -22.1 0.8 0
11 420.560063573532 0.047060553626 0902 2 120.0 3267 38.1 0.016 -1.296 -32.7 1.4 0
11 1178.509363568388 0.058935818615 0902 2 120.0 615 37.1 -0.057 -1.204 -25.1 0.3 0
11 1254.730163571425 0.060377378320 0902 2 120.0 697 35.3 -0.316 -1.064 29.6 0.3 0
50 0902 36.0 0.173 -1.139 -23.3 1
H8
H1 CRD 1 2021 03 02 19
H2 KTZL 1893 18 01 4
H3 lageos1 7603901 1155 8820 0 1
H4 1 2021 03 02 19 01 07 2021 03 02 19 08 29 0 0 0 0 1 0 2 0
C0 0 532.0 PDAS PCOD NCOL NCOT
C1 0 NCOL ND-YAG 1064.0 10.0 100. 250. 30. 1
C2 0 PCOD PMT 532.0 6. 950.0 .2 PHOTON-DEP 950.0 .2 40. 50. CFD
C3 0 NCOT GPS_Trimble_Thunderbolt_E GPS_Trimble_Thunderbolt_E SR620 02379 .0
60 PDAS 0 3
00 New CFD in the STOP channel
00 No CFD in the START channel
00 New experimental detector (transistor) in the START channel
40 67877.0 0 PDAS 100 100 -1.000 114572. 16. 174. -1.000 -1.000 -1.0 3 2 0
20 67877.0 1021.0 278.15 64. 0
50 PDAS 151. -1.000 -1.000 -1.0 0
11 68477.6200766 .046543406934 PDAS 2 120 2 78. -1.000 -1.000 -1.0 -1.0 0
11 68624.2106997 .047856299360 PDAS 2 120 5 92. -1.000 -1.000 -1.0 -1.0 0
11 68909.9924172 .051292849408 PDAS 2 120 1 75. -1.000 -1.000 -1.0 -1.0 0
20 69500.0 1020.0 277.85 62. 0
40 69500.0 0 PDAS 100 100 -1.000 114556. 16. 146. -1.000 -1.000 -1.0 3 2 0
H8
H9
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment