9 #define BOOST_TEST_MODULE ( readout_types_fhicl_test ) 10 #include "boost/test/unit_test.hpp" 25 #include <type_traits> 29 template <
typename Config>
36 std::cout <<
"===> FHiCL configuration:";
37 if (configStr.empty()) std::cout <<
" <empty>";
38 else std::cout <<
"\n" << configStr;
40 validatedConfig.print_allowed_configuration
41 (std::cout <<
"===> Expected configuration: ");
44 validatedConfig.validate_ParameterSet(pset);
45 return validatedConfig;
57 ID_t
const expectedID { 2U };
59 auto validatedConfig = validateConfig<Config>(configStr)();
62 static_assert(std::is_same_v<decltype(
id), ID_t
const>);
63 BOOST_TEST(
id.isValid == expectedID.isValid);
64 if (expectedID.isValid) {
65 BOOST_TEST(validatedConfig.Cryo().ID() == expectedID);
66 BOOST_TEST(
id == expectedID);
76 std::string const configStr {
"Cryo: { isValid:false }" };
77 ID_t
const expectedID {};
79 auto validatedConfig = validateConfig<Config>(configStr)();
82 static_assert(std::is_same_v<decltype(
id), ID_t
const>);
83 BOOST_TEST(
id.isValid == expectedID.isValid);
84 if (expectedID.isValid) {
85 BOOST_TEST(validatedConfig.Cryo().ID() == expectedID);
86 BOOST_TEST(
id == expectedID);
98 auto const expectedID = std::make_optional<ID_t>(1U);
100 auto validatedConfig = validateConfig<Config>(configStr)();
102 std::optional<ID_t>
const id =
readOptionalID(validatedConfig.Cryo);
103 BOOST_TEST(
id.has_value() == expectedID.has_value());
104 if (expectedID.has_value()) {
105 BOOST_TEST(id->isValid == expectedID->isValid);
106 if (expectedID->isValid) BOOST_TEST(
id.
value() == expectedID.value());
120 std::optional<ID_t>
const expectedID;
122 auto validatedConfig = validateConfig<Config>(configStr)();
124 std::optional<ID_t>
const id 126 BOOST_TEST(
id.has_value() == expectedID.has_value());
127 if (expectedID.has_value()) {
128 BOOST_TEST(id->isValid == expectedID->isValid);
129 if (expectedID->isValid) BOOST_TEST(
id.
value() == expectedID.value());
141 std::string const configStr {
"Cryos: [ { C:0 }, { C:2 } ]" };
144 std::array<ID_t, 2U>
const expectedIDs {{ ID_t{ 0U }, ID_t{ 2U } }};
146 auto validatedConfig = validateConfig<Config>(configStr)();
149 static_assert(std::is_same_v<decltype(ids), std::vector<ID_t>>);
151 BOOST_TEST(ids.size() == expectedIDs.size());
152 auto const n =
std::min(ids.size(), expectedIDs.size());
153 for (std::size_t i = 0; i <
n; ++i) {
154 auto const&
id = ids[i];
155 ID_t
const& expectedID = expectedIDs[i];
157 BOOST_TEST_CONTEXT(
"Item [" << i <<
"]") {
158 BOOST_TEST(
id.isValid == expectedID.isValid);
159 if (expectedID.isValid) BOOST_TEST(
id == expectedID);
174 auto validatedConfig = validateConfig<Config>(configStr)();
177 static_assert(std::is_same_v<decltype(ids), std::vector<ID_t>>);
179 BOOST_TEST(ids.size() == 0U);
190 std::string const configStr {
"Cryos: [ { C:0 }, { C:2 } ]" };
191 std::optional<std::vector<ID_t>>
const expectedIDs
192 (std::in_place, { ID_t{ 0U }, ID_t{ 2U } });
194 auto validatedConfig = validateConfig<Config>(configStr)();
198 (std::is_same_v<decltype(ids), std::optional<std::vector<ID_t>>>);
200 BOOST_TEST(ids.has_value() == expectedIDs.has_value());
201 if (expectedIDs.has_value()) {
202 BOOST_TEST(ids->size() == expectedIDs->size());
203 auto const n =
std::min(ids->size(), expectedIDs->size());
204 for (std::size_t i = 0; i <
n; ++i) {
205 auto const&
id = ids.value()[i];
206 ID_t
const& expectedID = expectedIDs.value()[i];
208 BOOST_TEST_CONTEXT(
"Item [" << i <<
"]") {
209 BOOST_TEST(
id.isValid == expectedID.isValid);
210 if (expectedID.isValid) BOOST_TEST(
id == expectedID);
225 std::optional<std::vector<ID_t>>
const expectedIDs(std::in_place);
227 auto validatedConfig = validateConfig<Config>(configStr)();
231 (std::is_same_v<decltype(ids), std::optional<std::vector<ID_t>>>);
233 BOOST_TEST(ids.has_value() == expectedIDs.has_value());
234 if (expectedIDs.has_value()) {
235 BOOST_TEST(ids->size() == expectedIDs->size());
236 auto const n =
std::min(ids->size(), expectedIDs->size());
237 for (std::size_t i = 0; i <
n; ++i) {
238 auto const&
id = ids.value()[i];
239 ID_t
const& expectedID = expectedIDs.value()[i];
241 BOOST_TEST_CONTEXT(
"Item [" << i <<
"]") {
242 BOOST_TEST(
id.isValid == expectedID.isValid);
243 if (expectedID.isValid) BOOST_TEST(
id == expectedID);
258 std::optional<std::vector<ID_t>>
const expectedIDs(std::nullopt);
260 auto validatedConfig = validateConfig<Config>(configStr)();
264 (std::is_same_v<decltype(ids), std::optional<std::vector<ID_t>>>);
266 BOOST_TEST(ids.has_value() == expectedIDs.has_value());
267 if (expectedIDs.has_value()) {
268 BOOST_TEST(ids->size() == expectedIDs->size());
269 auto const n =
std::min(ids->size(), expectedIDs->size());
270 for (std::size_t i = 0; i <
n; ++i) {
271 auto const&
id = ids.value()[i];
272 ID_t
const& expectedID = expectedIDs.value()[i];
274 BOOST_TEST_CONTEXT(
"Item [" << i <<
"]") {
275 BOOST_TEST(
id.isValid == expectedID.isValid);
276 if (expectedID.isValid) BOOST_TEST(
id == expectedID);
294 std::string const configStr {
"TPCset: { C:2 S:3 }" };
295 ID_t
const expectedID { 2U, 3U };
297 auto validatedConfig = validateConfig<Config>(configStr)();
300 static_assert(std::is_same_v<decltype(
id), ID_t
const>);
301 BOOST_TEST(
id.isValid == expectedID.isValid);
302 if (expectedID.isValid) {
303 BOOST_TEST(validatedConfig.TPCset().ID() == expectedID);
304 BOOST_TEST(
id == expectedID);
314 std::string const configStr {
"TPCset: { isValid:false }" };
315 ID_t
const expectedID {};
317 auto validatedConfig = validateConfig<Config>(configStr)();
320 static_assert(std::is_same_v<decltype(
id), ID_t
const>);
321 BOOST_TEST(
id.isValid == expectedID.isValid);
322 if (expectedID.isValid) {
323 BOOST_TEST(validatedConfig.TPCset().ID() == expectedID);
324 BOOST_TEST(
id == expectedID);
335 std::string const configStr {
"TPCset: { C:1 S:2 }" };
336 std::optional<ID_t>
const expectedID { std::in_place, 1U, 2U };
338 auto validatedConfig = validateConfig<Config>(configStr)();
340 std::optional<ID_t>
const id =
readOptionalID(validatedConfig.TPC);
341 BOOST_TEST(
id.has_value() == expectedID.has_value());
342 if (expectedID.has_value()) {
343 BOOST_TEST(id->isValid == expectedID->isValid);
344 if (expectedID->isValid) BOOST_TEST(
id.
value() == expectedID.value());
358 std::optional<ID_t>
const expectedID { std::nullopt };
360 auto validatedConfig = validateConfig<Config>(configStr)();
362 std::optional<ID_t>
const id 364 BOOST_TEST(
id.has_value() == expectedID.has_value());
365 if (expectedID.has_value()) {
366 BOOST_TEST(id->isValid == expectedID->isValid);
367 if (expectedID->isValid) BOOST_TEST(
id.
value() == expectedID.value());
379 std::string const configStr {
"TPCsets: [ { C:0 S:1 }, { C:2 S:3 } ]" };
382 std::array<ID_t, 2U>
const expectedIDs {{ ID_t{ 0U, 1U }, ID_t{ 2U, 3U } }};
384 auto validatedConfig = validateConfig<Config>(configStr)();
387 static_assert(std::is_same_v<decltype(ids), std::vector<ID_t>>);
389 BOOST_TEST(ids.size() == expectedIDs.size());
390 auto const n =
std::min(ids.size(), expectedIDs.size());
391 for (std::size_t i = 0; i <
n; ++i) {
392 auto const&
id = ids[i];
393 ID_t
const& expectedID = expectedIDs[i];
395 BOOST_TEST_CONTEXT(
"Item [" << i <<
"]") {
396 BOOST_TEST(
id.isValid == expectedID.isValid);
397 if (expectedID.isValid) BOOST_TEST(
id == expectedID);
412 auto validatedConfig = validateConfig<Config>(configStr)();
415 static_assert(std::is_same_v<decltype(ids), std::vector<ID_t>>);
417 BOOST_TEST(ids.size() == 0U);
429 std::string const configStr {
"TPCsets: [ { C:0 S:1 }, { C:2 S:3 } ]" };
430 std::optional<std::vector<ID_t>>
const expectedIDs
431 (std::in_place, { ID_t{ 0U, 1U }, ID_t{ 2U, 3U } });
433 auto validatedConfig = validateConfig<Config>(configStr)();
437 (std::is_same_v<decltype(ids), std::optional<std::vector<ID_t>>>);
439 BOOST_TEST(ids.has_value() == expectedIDs.has_value());
440 if (expectedIDs.has_value()) {
441 BOOST_TEST(ids->size() == expectedIDs->size());
442 auto const n =
std::min(ids->size(), expectedIDs->size());
443 for (std::size_t i = 0; i <
n; ++i) {
444 auto const&
id = ids.value()[i];
445 ID_t
const& expectedID = expectedIDs.value()[i];
447 BOOST_TEST_CONTEXT(
"Item [" << i <<
"]") {
448 BOOST_TEST(
id.isValid == expectedID.isValid);
449 if (expectedID.isValid) BOOST_TEST(
id == expectedID);
465 std::optional<std::vector<ID_t>>
const expectedIDs(std::in_place);
467 auto validatedConfig = validateConfig<Config>(configStr)();
471 (std::is_same_v<decltype(ids), std::optional<std::vector<ID_t>>>);
473 BOOST_TEST(ids.has_value() == expectedIDs.has_value());
474 if (expectedIDs.has_value()) {
475 BOOST_TEST(ids->size() == expectedIDs->size());
476 auto const n =
std::min(ids->size(), expectedIDs->size());
477 for (std::size_t i = 0; i <
n; ++i) {
478 auto const&
id = ids.value()[i];
479 ID_t
const& expectedID = expectedIDs.value()[i];
481 BOOST_TEST_CONTEXT(
"Item [" << i <<
"]") {
482 BOOST_TEST(
id.isValid == expectedID.isValid);
483 if (expectedID.isValid) BOOST_TEST(
id == expectedID);
499 std::optional<std::vector<ID_t>>
const expectedIDs(std::nullopt);
501 auto validatedConfig = validateConfig<Config>(configStr)();
505 (std::is_same_v<decltype(ids), std::optional<std::vector<ID_t>>>);
507 BOOST_TEST(ids.has_value() == expectedIDs.has_value());
508 if (expectedIDs.has_value()) {
509 BOOST_TEST(ids->size() == expectedIDs->size());
510 auto const n =
std::min(ids->size(), expectedIDs->size());
511 for (std::size_t i = 0; i <
n; ++i) {
512 auto const&
id = ids.value()[i];
513 ID_t
const& expectedID = expectedIDs.value()[i];
515 BOOST_TEST_CONTEXT(
"Item [" << i <<
"]") {
516 BOOST_TEST(
id.isValid == expectedID.isValid);
517 if (expectedID.isValid) BOOST_TEST(
id == expectedID);
534 std::string const configStr {
"ROP: { C:2 S:3 R:1 }" };
535 ID_t
const expectedID { 2U, 3U, 1U };
537 auto validatedConfig = validateConfig<Config>(configStr)();
540 static_assert(std::is_same_v<decltype(
id), ID_t
const>);
541 BOOST_TEST(
id.isValid == expectedID.isValid);
542 if (expectedID.isValid) {
543 BOOST_TEST(validatedConfig.ROP().ID() == expectedID);
544 BOOST_TEST(
id == expectedID);
554 std::string const configStr {
"ROP: { isValid:false }" };
555 ID_t
const expectedID {};
557 auto validatedConfig = validateConfig<Config>(configStr)();
560 static_assert(std::is_same_v<decltype(
id), ID_t
const>);
561 BOOST_TEST(
id.isValid == expectedID.isValid);
562 if (expectedID.isValid) {
563 BOOST_TEST(validatedConfig.ROP().ID() == expectedID);
564 BOOST_TEST(
id == expectedID);
574 std::string const configStr {
"ROP: { C:1 S:2 R:1 }" };
575 std::optional<ID_t>
const expectedID { std::in_place, 1U, 2U, 1U };
577 auto validatedConfig = validateConfig<Config>(configStr)();
579 std::optional<ID_t>
const id =
readOptionalID(validatedConfig.ROP);
580 BOOST_TEST(
id.has_value() == expectedID.has_value());
581 if (expectedID.has_value()) {
582 BOOST_TEST(id->isValid == expectedID->isValid);
583 if (expectedID->isValid) BOOST_TEST(
id.
value() == expectedID.value());
596 std::optional<ID_t>
const expectedID { std::nullopt };
598 auto validatedConfig = validateConfig<Config>(configStr)();
600 std::optional<ID_t>
const id 602 BOOST_TEST(
id.has_value() == expectedID.has_value());
603 if (expectedID.has_value()) {
604 BOOST_TEST(id->isValid == expectedID->isValid);
605 if (expectedID->isValid) BOOST_TEST(
id.
value() == expectedID.value());
618 {
"ROPs: [ { C:0 S:1 R:1 }, { C:2 S:3 R:0 } ]" };
619 std::array<ID_t, 2U>
const expectedIDs
622 {{ ID_t{ 0U, 1U, 1U }, ID_t{ 2U, 3U, 0U } }};
624 auto validatedConfig = validateConfig<Config>(configStr)();
627 static_assert(std::is_same_v<decltype(ids), std::vector<ID_t>>);
629 BOOST_TEST(ids.size() == expectedIDs.size());
630 auto const n =
std::min(ids.size(), expectedIDs.size());
631 for (std::size_t i = 0; i <
n; ++i) {
632 auto const&
id = ids[i];
633 ID_t
const& expectedID = expectedIDs[i];
635 BOOST_TEST_CONTEXT(
"Item [" << i <<
"]") {
636 BOOST_TEST(
id.isValid == expectedID.isValid);
637 if (expectedID.isValid) BOOST_TEST(
id == expectedID);
651 auto validatedConfig = validateConfig<Config>(configStr)();
654 static_assert(std::is_same_v<decltype(ids), std::vector<ID_t>>);
656 BOOST_TEST(ids.size() == 0U);
668 {
"ROPs: [ { C:0 S:1 R:1 }, { C:2 S:3 R:0 } ]" };
669 std::optional<std::vector<ID_t>>
const expectedIDs
670 (std::in_place, { ID_t{ 0U, 1U, 1U }, ID_t{ 2U, 3U, 0U } });
672 auto validatedConfig = validateConfig<Config>(configStr)();
676 (std::is_same_v<decltype(ids), std::optional<std::vector<ID_t>>>);
678 BOOST_TEST(ids.has_value() == expectedIDs.has_value());
679 if (expectedIDs.has_value()) {
680 BOOST_TEST(ids->size() == expectedIDs->size());
681 auto const n =
std::min(ids->size(), expectedIDs->size());
682 for (std::size_t i = 0; i <
n; ++i) {
683 auto const&
id = ids.value()[i];
684 ID_t
const& expectedID = expectedIDs.value()[i];
686 BOOST_TEST_CONTEXT(
"Item [" << i <<
"]") {
687 BOOST_TEST(
id.isValid == expectedID.isValid);
688 if (expectedID.isValid) BOOST_TEST(
id == expectedID);
703 std::optional<std::vector<ID_t>>
const expectedIDs(std::in_place);
705 auto validatedConfig = validateConfig<Config>(configStr)();
709 (std::is_same_v<decltype(ids), std::optional<std::vector<ID_t>>>);
711 BOOST_TEST(ids.has_value() == expectedIDs.has_value());
712 if (expectedIDs.has_value()) {
713 BOOST_TEST(ids->size() == expectedIDs->size());
714 auto const n =
std::min(ids->size(), expectedIDs->size());
715 for (std::size_t i = 0; i <
n; ++i) {
716 auto const&
id = ids.value()[i];
717 ID_t
const& expectedID = expectedIDs.value()[i];
719 BOOST_TEST_CONTEXT(
"Item [" << i <<
"]") {
720 BOOST_TEST(
id.isValid == expectedID.isValid);
721 if (expectedID.isValid) BOOST_TEST(
id == expectedID);
736 std::optional<std::vector<ID_t>>
const expectedIDs(std::nullopt);
738 auto validatedConfig = validateConfig<Config>(configStr)();
742 (std::is_same_v<decltype(ids), std::optional<std::vector<ID_t>>>);
744 BOOST_TEST(ids.has_value() == expectedIDs.has_value());
745 if (expectedIDs.has_value()) {
746 BOOST_TEST(ids->size() == expectedIDs->size());
747 auto const n =
std::min(ids->size(), expectedIDs->size());
748 for (std::size_t i = 0; i <
n; ++i) {
749 auto const&
id = ids.value()[i];
750 ID_t
const& expectedID = expectedIDs.value()[i];
752 BOOST_TEST_CONTEXT(
"Item [" << i <<
"]") {
753 BOOST_TEST(
id.isValid == expectedID.isValid);
754 if (expectedID.isValid) BOOST_TEST(
id == expectedID);
782 "ROP: { C:1 S:5 R:0 }" 783 "\nMaybeROP: { C:1 S:5 R:1 }" 786 "\nROPs: [ { C:1 S:5 R:2 }, { C:1 S:5 R:3 } ] " 787 "\nMaybeROPs: [ { C:1 S:5 R:4 } ] " 792 auto const&
config = validateConfig<Config>(configStr);
794 ID_t
const expected1 { 1U, 5U, 0U };
795 ID_t
const expected2 { 1U, 5U, 1U };
796 std::array<ID_t, 2U>
const expected4
799 {{ ID_t{ 1U, 5U, 2U }, ID_t{ 1U, 5U, 3U } }};
800 std::array<ID_t, 1U>
const expected5
803 {{ ID_t{ 1U, 5U, 4U } }};
805 ID_t
const default3 { 1U, 5U, 5U };
806 auto default3value = default3;
808 std::vector<ID_t>
const default6({
809 ID_t{ 1U, 5U, 6U }, ID_t{ 1U, 5U, 7U }, ID_t{ 1U, 5U, 8U }
811 auto default6value = default6;
817 static_assert(std::is_same_v<decltype(id11), ID_t>);
818 BOOST_TEST(id11 == expected1);
826 static_assert(std::is_same_v<decltype(id21), std::optional<ID_t>>);
827 BOOST_TEST(id21.has_value());
828 if (id21.has_value()) BOOST_TEST(id21.value() == expected2);
830 default3value = default3;
832 static_assert(std::is_same_v<decltype(id22), ID_t>);
833 BOOST_TEST(id22 == expected2);
834 BOOST_TEST(default3value == default3);
836 default3value = default3;
839 static_assert(std::is_same_v<decltype(id23), ID_t>);
840 BOOST_TEST(id23 == expected2);
841 BOOST_TEST(default3value == default3);
845 static_assert(std::is_same_v<decltype(id31), std::optional<ID_t>>);
846 BOOST_TEST(!id31.has_value());
848 default3value = default3;
850 static_assert(std::is_same_v<decltype(id32), ID_t>);
851 BOOST_TEST(id32 == default3);
852 BOOST_TEST(default3value == default3);
854 default3value = default3;
856 static_assert(std::is_same_v<decltype(id33), ID_t>);
857 BOOST_TEST(id33 == default3);
868 static_assert(std::is_same_v<decltype(id41), std::vector<ID_t>>);
869 BOOST_TEST(id41.size() == expected4.size());
870 std::size_t max41 =
std::max(id41.size(), expected4.size());
871 for (std::size_t i = 0U; i < max41; ++i) BOOST_TEST_CONTEXT(
"element " << i) {
872 BOOST_TEST(id41[i] == expected4[i]);
881 (std::is_same_v<decltype(id51), std::optional<std::vector<ID_t>>>);
882 BOOST_TEST(id51.has_value());
883 if (id51.has_value()) {
884 BOOST_CHECK_EQUAL_COLLECTIONS
885 (id51->begin(), id51->end(), expected5.begin(), expected5.end());
888 default6value = default6;
890 static_assert(std::is_same_v<decltype(id52), std::vector<ID_t>>);
891 BOOST_CHECK_EQUAL_COLLECTIONS
892 (id52.begin(), id52.end(), expected5.begin(), expected5.end());
893 BOOST_CHECK_EQUAL_COLLECTIONS(
894 default6value.begin(), default6value.end(),
895 default6.begin(), default6.end()
898 default6value = default6;
901 static_assert(std::is_same_v<decltype(id53), std::vector<ID_t>>);
902 BOOST_CHECK_EQUAL_COLLECTIONS
903 (id53.begin(), id53.end(), expected5.begin(), expected5.end());
904 BOOST_CHECK_EQUAL_COLLECTIONS(
905 default6value.begin(), default6value.end(),
906 default6.begin(), default6.end()
912 (std::is_same_v<decltype(id61), std::optional<std::vector<ID_t>>>);
913 BOOST_TEST(!id61.has_value());
915 default6value = default6;
917 static_assert(std::is_same_v<decltype(id62), std::vector<ID_t>>);
918 BOOST_CHECK_EQUAL_COLLECTIONS
919 (id62.begin(), id62.end(), default6.begin(), default6.end());
920 BOOST_CHECK_EQUAL_COLLECTIONS(
921 default6value.begin(), default6value.end(),
922 default6.begin(), default6.end()
925 default6value = default6;
928 static_assert(std::is_same_v<decltype(id63), std::vector<ID_t>>);
929 BOOST_CHECK_EQUAL_COLLECTIONS
930 (id63.begin(), id63.end(), default6.begin(), default6.end());
934 BOOST_TEST(default6value.empty());
void test_OptionalTPCsetIDsequence_empty()
void test_ROPID_invalid()
void test_ROPIDsequence_normal()
fhicl::Table< Config > validateConfig(std::string const &configStr)
OptionalID< readout::TPCsetID > OptionalTPCsetID
Member type of optional validated readout::TPCsetID parameter.
void test_OptionalROPIDsequence_omitted()
std::vector< ID > readIDsequence(IDsequence< SrcID > const &seq)
Returns a vector of IDs extracted from the specified ID sequence.
Classes identifying readout-related concepts.
void test_OptionalCryostatID_present()
static ParameterSet make(intermediate_table const &tbl)
BOOST_AUTO_TEST_CASE(CryostatID_testcase)
IDparameter< readout::ROPID > ROPID
Member type of validated readout::ROPID parameter.
void test_OptionalCryostatID_omitted()
void test_OptionalROPID_present()
ChannelGroupService::Name Name
void test_TPCsetID_invalid()
void test_ROPIDsequence_empty()
OptionalID< readout::ROPID > OptionalROPID
Member type of optional validated readout::ROPID parameter.
OptionalIDsequence< readout::TPCsetID > OptionalTPCsetIDsequence
Member type of optional sequence of readout::TPCsetID parameters.
void test_OptionalCryostatIDsequence_omitted()
IDparameter< readout::CryostatID > CryostatID
Member type of validated readout::CryostatID parameter.
ID readID(IDparameter< SrcID > const &atom)
Returns an ID extracted from the specified ID atom.
IDsequence< readout::ROPID > ROPIDsequence
Member type of sequence of readout::ROPID parameters.
void test_OptionalCryostatIDsequence_normal()
OptionalIDsequence< readout::ROPID > OptionalROPIDsequence
Member type of optional sequence of readout::ROPID parameters.
void test_TPCsetIDsequence_normal()
typename config_impl< T >::type Config
void test_TPCsetIDsequence_empty()
OptionalIDsequence< readout::CryostatID > OptionalCryostatIDsequence
Member type of optional sequence of readout::CryostatID parameters.
void test_OptionalTPCsetID_omitted()
std::optional< ID > readOptionalID(OptionalID< SrcID > const &atom)
Returns an ID extracted from the specified optional ID atom.
IDparameter< readout::TPCsetID > TPCsetID
Member type of validated readout::TPCsetID parameter.
void test_CryostatID_normal()
Utilities for using readout IDs in FHiCL validated configuration.
std::optional< std::vector< ID > > readOptionalIDsequence(OptionalIDsequence< SrcID > const &seq)
Returns a vector of IDs extracted from the specified optional ID sequence.
void test_CryostatIDsequence_normal()
void test_OptionalROPIDsequence_empty()
static int max(int a, int b)
Class identifying a set of planes sharing readout channels.
void test_CryostatIDsequence_empty()
void test_OptionalROPID_omitted()
void test_OptionalCryostatIDsequence_empty()
OptionalID< readout::CryostatID > OptionalCryostatID
Member type of optional validated readout::CryostatID parameter.
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
void test_OptionalTPCsetIDsequence_normal()
void test_ROPUnifiedInterface()
IDsequence< readout::TPCsetID > TPCsetIDsequence
Member type of sequence of readout::TPCsetID parameters.
IDsequence< readout::CryostatID > CryostatIDsequence
Member type of sequence of readout::CryostatID parameters.
void test_OptionalTPCsetIDsequence_omitted()
void test_OptionalROPIDsequence_normal()
void test_TPCsetID_normal()
ID readParameter(IDparameter< SrcID > const &atom)
void test_CryostatID_invalid()
geo::CryostatID CryostatID
QTextStream & endl(QTextStream &s)
void test_OptionalTPCsetID_present()