20 #include "cetlib_except/exception.h" 25 #pragma GCC diagnostic push 26 #pragma GCC diagnostic ignored "-Wunused-variable" 102 <<
"We have " << nCryo <<
" cryostats";
105 unsigned int nCryostats = 0, nTPCs = 0, nPlanes = 0, nWires = 0,
106 cumTPCsets = 0, cumROPs = 0;
129 for(
unsigned int c = 0;
c < nCryo; ++
c) {
132 const unsigned int nTPC = cryo.
NTPC();
136 <<
" (" << nTPC <<
" TPCs, " << nTPCsets <<
" TPC sets)";
138 if (runningCID != expCID) {
140 <<
"Cryostat ID incremented to " << runningCID <<
", expected: " 147 <<
"Cryostat ID iterator thinks it's all over at C=" <<
c;
150 else if (iCryostatID->Cryostat !=
c) {
152 <<
"Cryostat ID iterator thinks it's at C=" << (*iCryostatID)
153 <<
" instead of " <<
c;
156 else if (iCryostatID.
get() != &cryo) {
158 <<
"Cryostat ID iterator retrieves CryostatGeo[" 159 << ((
void*) iCryostatID.
get())
160 <<
"] instead of [" << ((
void*) &cryo) <<
"]";
164 if (&*iCryostat != &cryo) {
166 <<
"Cryostat iterator retrieves CryostatGeo[" 167 << ((
void*) iCryostat.
get())
168 <<
"] (" << iCryostat.
ID() <<
") instead of [" 169 << ((
void*) &cryo) <<
"] (C=" <<
c <<
")";
180 unsigned int nPlanesInCryo = 0;
181 unsigned int nWiresInCryo = 0;
183 for(
unsigned int t = 0;
t < nTPC; ++
t){
186 const unsigned int NPlanes =
TPC.Nplanes();
188 MF_LOG_TRACE(
"GeometryIteratorLoopTest") <<
" " << expTID
189 <<
" (" << NPlanes <<
" planes)";
191 if (runningTID != expTID) {
193 <<
"TPC ID incremented to " << runningTID <<
", expected: " 200 <<
"TPC ID iterator thinks it's all over at " << expTID;
203 else if (iTPCID->Cryostat !=
c) {
205 <<
"TPC ID iterator thinks it's at C=" << iTPCID->Cryostat
206 <<
" instead of " <<
c;
209 else if (iTPCID->TPC !=
t) {
211 <<
"TPC ID iterator thinks it's at T=" << iTPCID->TPC
212 <<
" instead of " <<
t;
215 else if (iTPCID.
get() != &
TPC) {
217 <<
"TPC ID iterator retrieves TPCGeo[" << ((
void*) iTPCID.
get())
218 <<
"] instead of [" << ((
void*) &
TPC) <<
"]";
222 if (&*iTPC != &
TPC) {
224 <<
"TPC iterator retrieves TPCGeo[" << ((
void*) iTPC.
get())
225 <<
"] (" << iTPC.
ID() <<
") instead of [" << ((
void*) &
TPC)
226 <<
"] (" << expTID <<
")";
230 if (*iTPCIDinCryo != expTID) {
232 <<
"TPC ID local iterator in " << expCID
233 <<
" points to " << *iTPCIDinCryo <<
" instead of " << expTID;
236 if (iTPCinCryo->
ID() != expTID) {
238 <<
"TPC local iterator in " << expCID
239 <<
" points to " << iTPCinCryo->
ID() <<
" instead of " << expTID;
248 unsigned int nPlanesInTPC = 0;
249 unsigned int nWiresInTPC = 0;
251 for(
unsigned int p = 0;
p < NPlanes; ++
p) {
254 const unsigned int NWires =
Plane.Nwires();
256 MF_LOG_TRACE(
"GeometryIteratorLoopTest") <<
" " << expTID
257 <<
" (" << NWires <<
" wires)";
259 if (runningPID != expPID) {
261 <<
"Plane ID incremented to " << runningPID <<
", expected: " 267 <<
"plane ID iterator thinks it's all over at " << expPID;
270 else if (iPlaneID->Cryostat !=
c) {
272 <<
"plane ID iterator thinks it's at C=" << iPlaneID->Cryostat
273 <<
" instead of " <<
c;
276 else if (iPlaneID->TPC !=
t) {
278 <<
"plane ID iterator thinks it's at T=" << iPlaneID->TPC
279 <<
" instead of " <<
t;
282 else if (iPlaneID->Plane !=
p) {
284 <<
"plane ID iterator thinks it's at P=" << iPlaneID->Plane
285 <<
" instead of " <<
p;
288 else if (iPlaneID.
get() != &
Plane) {
290 <<
"plane ID iterator retrieves PlaneGeo[" 291 << ((
void*) iPlaneID.
get()) <<
"] instead of [" 292 << ((
void*) &
Plane) <<
"]";
296 if (&*iPlane != &
Plane) {
298 <<
"plane iterator retrieves PlaneGeo[" << ((
void*) iPlane.
get())
299 <<
"] instead of [" << ((
void*) &
Plane) <<
"] (" << expPID <<
")";
303 if (*iPlaneIDinCryo != expPID) {
305 <<
"Plane ID local iterator in " << expCID <<
" points to " 306 << *iPlaneIDinCryo <<
" instead of " << expPID;
309 if (iPlaneInCryo->
ID() != expPID) {
311 <<
"Plane local iterator in " << expCID <<
" points to " 312 << iPlaneInCryo.
ID() <<
" instead of " << expPID;
316 if (*iPlaneIDinTPC != expPID) {
318 <<
"Plane ID local iterator in " << expTID <<
" points to " 319 << *iPlaneIDinTPC <<
" instead of " << expPID;
322 if (iPlaneInTPC->
ID() != expPID) {
324 <<
"Plane local iterator in " << expTID <<
" points to " 325 << iPlaneInTPC.
ID() <<
" instead of " << expPID;
332 unsigned int nWiresInPlane = 0;
334 for(
unsigned int w = 0;
w < NWires; ++
w) {
338 if (runningWID != expWID) {
340 <<
"Wire ID incremented to " << runningWID <<
", expected: " 345 MF_LOG_TRACE(
"GeometryIteratorLoopTest") <<
" " << expWID;
348 <<
"wire ID iterator thinks it's all over at " << expWID;
351 else if (iWireID->Cryostat !=
c) {
353 <<
"wire ID iterator thinks it's at C=" << iWireID->Cryostat
354 <<
" instead of " <<
c;
357 else if (iWireID->TPC !=
t) {
359 <<
"wire ID iterator thinks it's at T=" << iWireID->TPC
360 <<
" instead of " <<
t;
363 else if (iWireID->Plane !=
p) {
365 <<
"wire ID iterator thinks it's at P=" << iWireID->Plane
366 <<
" instead of " <<
p;
369 else if (iWireID->Wire !=
w) {
371 <<
"wire ID iterator thinks it's at W=" << iWireID->Wire
372 <<
" instead of " <<
w;
375 else if (iWireID.
get() != &
Wire) {
377 <<
"wire ID iterator retrieves WireGeo[" 378 << ((
void*) iWireID.
get())
379 <<
"] instead of [" << ((
void*) &
Wire) <<
"]";
383 if (&*iWire != &
Wire) {
385 <<
"wire iterator retrieves WireGeo[" << ((
void*) iWire.
get())
386 <<
"] instead of [" << ((
void*) &
Wire) <<
"] (" << expWID
391 if (*iWireIDinCryo != expWID) {
393 <<
"Wire ID local iterator in " << expCID <<
" points to " 394 << *iWireIDinCryo <<
" instead of " << expWID;
397 if (iWireInCryo.
ID() != expWID) {
399 <<
"Wire local iterator in " << expCID <<
" points to " 400 << iWireInCryo.
ID() <<
" instead of " << expWID;
403 if (*iWireIDinTPC != expWID) {
405 <<
"Wire ID local iterator in " << expTID <<
" points to " 406 << *iWireIDinTPC <<
" instead of " << expWID;
409 if (iWireInTPC.
ID() != expWID) {
411 <<
"Wire local iterator in " << expTID <<
" points to " 412 << iWireInTPC.
ID() <<
" instead of " << expWID;
415 if (*iWireIDinPlane != expWID) {
417 <<
"Wire ID local iterator in " << expPID <<
" points to " 418 << *iWireIDinPlane <<
" instead of " << expWID;
421 if (iWireInPlane.
ID() != expWID) {
423 <<
"Wire local iterator in " << expPID <<
" points to " 424 << iWireInPlane.
ID() <<
" instead of " << expWID;
445 <<
"Wire ID local iterator in " << expPID
446 <<
" should be at end and instead points to " << *iWireIDinPlane;
451 <<
"Wire local iterator in " << expPID
452 <<
" should be at end, and instead points to " 453 << iWireInPlane.
ID();
461 <<
"Looping though " << nWiresInPlane <<
" wires in " << expPID;
462 unsigned int nLoopedWireIDs = 0;
465 if (nLoopedWireIDs >= nWiresInPlane) {
467 <<
"After all " << nLoopedWireIDs <<
" wire IDs in " << expPID
468 <<
", iterator has not reached the end (" 476 if (nLoopedWireIDs < nWiresInPlane) {
478 <<
"Looped only " << nLoopedWireIDs
479 <<
" wire IDs in " << expPID <<
", while we expected " 480 << nWiresInPlane <<
" iterations!";
483 unsigned int nLoopedWires = 0;
485 if (nLoopedWires >= nWiresInPlane) {
487 <<
"After all " << nLoopedWires <<
" wires in " 488 << expPID <<
", iterator has not reached the end";
494 if (nLoopedWires < nWiresInPlane) {
496 <<
"Looped only " << nLoopedWires <<
" wires in " << expPID
497 <<
", while we expected " << nWiresInPlane <<
" iterations!";
516 <<
"Plane ID local iterator in " << expTID
517 <<
" should be at end and instead points to " << *iPlaneIDinTPC;
522 <<
"Plane local iterator in " << expTID
523 <<
" should be at end, and instead points to " << iPlaneInTPC.
ID();
529 <<
"Wire ID local iterator in " << expTID
530 <<
" should be at end and instead points to " << *iWireIDinTPC;
535 <<
"Wire local iterator in " << expTID
536 <<
" should be at end, and instead points to " << iWireInTPC.
ID();
544 <<
"Looping though " << nPlanesInTPC <<
" planes in " << expTID;
545 unsigned int nLoopedPlaneIDs = 0;
548 if (nLoopedPlaneIDs >= nPlanesInTPC) {
550 <<
"After all " << nLoopedPlaneIDs <<
" plane IDs in " << expTID
551 <<
", iterator has not reached the end (" 558 if (nLoopedPlaneIDs < nPlanesInTPC) {
560 <<
"Looped only " << nLoopedPlaneIDs
561 <<
" plane IDs in " << expTID <<
", while we expected " 562 << nPlanesInTPC <<
" iterations!";
565 unsigned int nLoopedPlanes = 0;
567 if (nLoopedPlanes >= nPlanesInTPC) {
569 <<
"After all " << nLoopedPlanes <<
" planes in " 570 << expTID <<
", iterator has not reached the end";
576 if (nLoopedPlanes < nPlanesInTPC) {
578 <<
"Looped only " << nLoopedPlanes <<
" planes in " << expTID
579 <<
", while we expected " << nPlanesInTPC <<
" iterations!";
587 <<
"Looping though " << nWiresInTPC <<
" wires in " << expTID;
588 unsigned int nLoopedWireIDs = 0;
591 if (nLoopedWireIDs >= nWiresInTPC) {
593 <<
"After all " << nLoopedWireIDs <<
" wire IDs in " << expTID
594 <<
", iterator has not reached the end (" 601 if (nLoopedWireIDs < nWiresInTPC) {
603 <<
"Looped only " << nLoopedWireIDs
604 <<
" wire IDs in " << expTID <<
", while we expected " 605 << nWiresInTPC <<
" iterations!";
608 unsigned int nLoopedWires = 0;
610 if (nLoopedWires >= nWiresInTPC) {
612 <<
"After all " << nLoopedWires <<
" wires in " 613 << expTID <<
", iterator has not reached the end";
619 if (nLoopedWires < nWiresInTPC) {
621 <<
"Looped only " << nLoopedWires <<
" wires in " << expTID
622 <<
", while we expected " << nWiresInTPC <<
" iterations!";
637 <<
"TPC ID local iterator in " << expCID
638 <<
" should be at end, and instead points to " << *iTPCIDinCryo;
643 <<
"TPC local iterator in " << expCID
644 <<
" should be at end, and instead points to " << iTPCinCryo->
ID();
650 <<
"Plane ID local iterator in " << expCID
651 <<
" should be at end, and instead points to " << *iPlaneIDinCryo;
656 <<
"Plane local iterator in " << expCID
657 <<
" should be at end, and instead points to " << iPlaneInCryo->
ID();
663 <<
"Wire ID local iterator in " << expCID
664 <<
" should be at end, and instead points to " << *iWireIDinCryo;
669 <<
"Wire local iterator in " << expCID
670 <<
" should be at end, and instead points to " << iWireInCryo.
ID();
677 unsigned int nTPCsInCryo = cryo.NTPC();
679 <<
"Looping though " << nTPCsInCryo <<
" TPCs in " << expCID;
680 unsigned int nLoopedTPCIDs = 0;
683 if (nLoopedTPCIDs >= nTPCsInCryo) {
685 <<
"After all " << nLoopedTPCIDs <<
" TPC IDs in " << expCID
686 <<
", iterator has not reached the end (" 693 if (nLoopedTPCIDs < nTPCsInCryo) {
695 <<
"Looped only " << nLoopedTPCIDs
696 <<
" TPC IDs in " << expCID <<
", while we expected " 697 << nTPCsInCryo <<
" iterations!";
700 unsigned int nLoopedTPCs = 0;
702 if (nLoopedTPCs >= nTPCsInCryo) {
704 <<
"After all " << nLoopedTPCs
705 <<
" TPCs in " << expCID <<
", iterator has not reached the end";
711 if (nLoopedTPCs < nTPCsInCryo) {
713 <<
"Looped only " << nLoopedTPCs <<
" TPCs in " << expCID
714 <<
", while we expected " << nTPCsInCryo <<
" iterations!";
722 <<
"Looping though " << nPlanesInCryo <<
" planes in " << expCID;
723 unsigned int nLoopedPlaneIDs = 0;
726 if (nLoopedPlaneIDs >= nPlanesInCryo) {
728 <<
"After all " << nLoopedPlaneIDs <<
" plane IDs in " << expCID
729 <<
", iterator has not reached the end (" 736 if (nLoopedPlaneIDs < nPlanesInCryo) {
738 <<
"Looped only " << nLoopedPlaneIDs
739 <<
" plane IDs in " << expCID <<
", while we expected " 740 << nPlanesInCryo <<
" iterations!";
743 unsigned int nLoopedPlanes = 0;
745 if (nLoopedPlanes >= nPlanesInCryo) {
747 <<
"After all " << nLoopedPlanes
748 <<
" planes in " << expCID <<
", iterator has not reached the end";
754 if (nLoopedPlanes < nPlanesInCryo) {
756 <<
"Looped only " << nLoopedPlanes <<
" planes in " << expCID
757 <<
", while we expected " << nPlanesInCryo <<
" iterations!";
765 <<
"Looping though " << nWiresInCryo <<
" wires in " << expCID;
766 unsigned int nLoopedWireIDs = 0;
769 if (nLoopedWireIDs >= nWiresInCryo) {
771 <<
"After all " << nLoopedWireIDs <<
" wire IDs in " << expCID
772 <<
", iterator has not reached the end (" 779 if (nLoopedWireIDs < nWiresInCryo) {
781 <<
"Looped only " << nLoopedWireIDs
782 <<
" wire IDs in " << expCID <<
", while we expected " 783 << nWiresInCryo <<
" iterations!";
786 unsigned int nLoopedWires = 0;
788 if (nLoopedWires >= nWiresInCryo) {
790 <<
"After all " << nLoopedWires
791 <<
" wires in " << expCID <<
", iterator has not reached the end";
797 if (nLoopedWires < nWiresInCryo) {
799 <<
"Looped only " << nLoopedWires <<
" wires in " << expCID
800 <<
", while we expected " << nWiresInCryo <<
" iterations!";
811 unsigned int nTPCsetsInCryo = 0;
812 unsigned int nROPInCryo = 0;
814 for(
unsigned int s = 0;
s < nTPCsets; ++
s) {
816 const unsigned int NROPs =
geom->
NROPs(expSID);
819 <<
" " << expSID <<
" (" << NROPs <<
" planes)";
821 if (runningSID != expSID) {
823 <<
"TPC set ID incremented to " << runningSID <<
", expected: " 830 <<
"TPCset ID iterator thinks it's all over at " << expSID;
833 else if (iTPCsetID->Cryostat !=
c) {
835 <<
"TPC set ID iterator thinks it's at C=" << iTPCsetID->Cryostat
836 <<
" instead of " <<
c;
839 else if (iTPCsetID->TPCset !=
s) {
841 <<
"TPC set ID iterator thinks it's at S=" << iTPCsetID->TPCset
842 <<
" instead of " <<
s;
846 if (*iTPCsetIDinCryo != expSID) {
848 <<
"TPC set ID local iterator in " << expCID
849 <<
" points to " << *iTPCsetIDinCryo <<
" instead of " << expSID;
855 unsigned int nROPInTPCset = 0;
857 for(
unsigned int r = 0;
r < NROPs; ++
r) {
862 <<
" " << expRID <<
" (" << NChannels <<
" channels)";
864 if (runningRID != expRID) {
866 <<
"Readout plane ID incremented to " << runningRID
867 <<
", expected: " << expRID;
873 <<
"readout plane ID iterator thinks it's all over at " << expRID;
876 else if (iROPID->Cryostat !=
c) {
878 <<
"readout plane ID iterator thinks it's at C=" 879 << iROPID->Cryostat <<
" instead of " <<
c;
882 else if (iROPID->TPCset !=
s) {
884 <<
"readout plane ID iterator thinks it's at S=" << iROPID->TPCset
885 <<
" instead of " <<
s;
888 else if (iROPID->ROP !=
r) {
890 <<
"readout plane ID iterator thinks it's at R=" << iROPID->ROP
891 <<
" instead of " <<
r;
895 if (*iROPIDinCryo != expRID) {
897 <<
"Readout plane ID local iterator in " << expCID
898 <<
" points to " << *iROPIDinCryo <<
" instead of " << expRID;
902 if (*iROPIDinTPCset != expRID) {
904 <<
"Readout plane ID local iterator in " << expSID
905 <<
" points to " << *iROPIDinTPCset <<
" instead of " << expRID;
931 <<
"Readout plane ID local iterator in " << expSID
932 <<
" should be at end and instead points to " << *iROPIDinTPCset;
940 <<
"Looping though " << nROPInTPCset <<
" readout planes in " 942 unsigned int nLoopedROPIDs = 0;
945 if (nLoopedROPIDs >= nROPInTPCset) {
947 <<
"After all " << nLoopedROPIDs <<
" readout plane IDs in " 948 << expSID <<
", iterator has not reached the end (" 955 if (nLoopedROPIDs < nROPInTPCset) {
957 <<
"Looped only " << nLoopedROPIDs
958 <<
" readout plane IDs in " << expSID <<
", while we expected " 959 << nROPInTPCset <<
" iterations!";
972 <<
"TPC set ID local iterator in " << expCID
973 <<
" should be at end, and instead points to " << *iTPCsetIDinCryo;
979 <<
"Readout plane ID local iterator in " << expCID
980 <<
" should be at end, and instead points to " << *iROPIDinCryo;
988 <<
"Looping though " << nTPCsetsInCryo <<
" TPC sets in " << expCID;
989 unsigned int nLoopedTPCsetIDs = 0;
992 if (nLoopedTPCsetIDs >= nTPCsetsInCryo) {
994 <<
"After all " << nLoopedTPCsetIDs <<
" TPC set IDs in " << expCID
995 <<
", iterator has not reached the end (" 1002 if (nLoopedTPCsetIDs < nTPCsetsInCryo) {
1004 <<
"Looped only " << nLoopedTPCsetIDs
1005 <<
" TPC set IDs in " << expCID <<
", while we expected " 1006 << nTPCsetsInCryo <<
" iterations!";
1015 <<
"Looping though " << nROPInCryo <<
" readout planes in " << expCID;
1016 unsigned int nLoopedROPIDs = 0;
1019 if (nLoopedROPIDs >= nROPInCryo) {
1021 <<
"After all " << nLoopedROPIDs <<
" readout plane IDs in " 1022 << expCID <<
", iterator has not reached the end (" 1029 if (nLoopedROPIDs < nROPInCryo) {
1031 <<
"Looped only " << nLoopedROPIDs
1032 <<
" readout plane IDs in " << expCID <<
", while we expected " 1033 << nROPInCryo <<
" iterations!";
1045 <<
"Cryostat ID still valid (" << runningCID
1046 <<
") after incrementing from the last one.";
1052 <<
"Cryostat ID iterator thinks it's still at " << *iCryostatID
1053 <<
", but we are already finished";
1059 <<
"Cryostat iterator thinks it's still at " << iCryostat.
ID()
1060 <<
", but we are already finished";
1064 MF_LOG_DEBUG(
"GeometryIteratorLoopTest") <<
"exception caught" 1065 " while dereferencing an iterator to a past-the-end cryostat.\n";
1070 <<
"Looping though " << nCryostats <<
" cryostats";
1071 unsigned int nLoopedCryostatIDs = 0;
1074 if (nLoopedCryostatIDs >= nCryostats) {
1076 <<
"After all " << nLoopedCryostatIDs
1077 <<
" cryostat IDs, iterator has not reached the end (" 1082 ++nLoopedCryostatIDs;
1084 if (nLoopedCryostatIDs < nCryostats) {
1086 <<
"Looped only " << nLoopedCryostatIDs
1087 <<
" cryostat IDs, while we expected " << nCryostats <<
" iterations!";
1090 unsigned int nLoopedCryostats = 0;
1092 if (nLoopedCryostats >= nCryostats) {
1094 <<
"After all " << nLoopedCryostats
1095 <<
" cryostats, iterator has not reached the end";
1101 if (nLoopedCryostats < nCryostats) {
1103 <<
"Looped only " << nLoopedCryostats
1104 <<
" cryostats, while we expected " << nCryostats <<
" iterations!";
1110 <<
"TPC ID still valid (" << runningTID
1111 <<
") after incrementing from the last one.";
1117 <<
"TPC iterator thinks it's still at " << *iTPCID
1118 <<
", but we are already finished";
1124 <<
"TPC iterator thinks it's still at " << iTPC.
ID()
1125 <<
", but we are already finished";
1129 MF_LOG_DEBUG(
"GeometryIteratorLoopTest") <<
"exception caught" 1130 " while dereferencing an iterator to a past-the-end TPC.\n";
1135 <<
"Looping though " << nTPCs <<
" TPCs";
1136 unsigned int nLoopedTPCIDs = 0;
1139 if (nLoopedTPCIDs >= nTPCs) {
1141 <<
"After all " << nLoopedTPCIDs
1142 <<
" TPC IDs, iterator has not reached the end (" 1149 if (nLoopedTPCIDs < nTPCs) {
1151 <<
"Looped only " << nLoopedTPCIDs
1152 <<
" TPC IDs, while we expected " << nTPCs <<
" iterations!";
1155 unsigned int nLoopedTPCs = 0;
1157 if (nLoopedTPCs >= nTPCs) {
1159 <<
"After all " << nLoopedTPCs
1160 <<
" TPCs, iterator has not reached the end";
1166 if (nLoopedTPCs < nTPCs) {
1168 <<
"Looped only " << nLoopedTPCs
1169 <<
" TPCs, while we expected " << nTPCs <<
" iterations!";
1176 <<
"Plane ID still valid (" << runningPID
1177 <<
") after incrementing from the last one.";
1183 <<
"Plane iterator thinks it's still at " << *iPlaneID
1184 <<
", but we are already finished";
1190 <<
"Plane iterator thinks it's still at " << iPlane.
ID()
1191 <<
", but we are already finished";
1195 MF_LOG_DEBUG(
"GeometryIteratorLoopTest") <<
"exception caught" 1196 " while dereferencing an iterator to a past-the-end plane.\n";
1201 <<
"Looping though " << nPlanes <<
" planes";
1202 unsigned int nLoopedPlaneIDs = 0;
1205 if (nLoopedPlaneIDs >= nPlanes) {
1207 <<
"After all " << nLoopedPlaneIDs
1208 <<
" planes, ID iterator has not reached the end (" 1215 if (nLoopedPlaneIDs < nPlanes) {
1217 <<
"Looped only " << nLoopedPlaneIDs
1218 <<
" plane IDs, while we expected " << nPlanes <<
" iterations!";
1221 unsigned int nLoopedPlanes = 0;
1223 if (nLoopedPlanes >= nPlanes) {
1225 <<
"After all " << nLoopedPlanes
1226 <<
" planes, iterator has not reached the end";
1232 if (nLoopedPlanes < nPlanes) {
1234 <<
"Looped only " << nLoopedPlanes
1235 <<
" planes, while we expected " << nPlanes <<
" iterations!";
1241 <<
"Wire ID still valid (" << runningWID
1242 <<
") after incrementing from the last one.";
1248 <<
"Wire iterator thinks it's still at " << *iWireID
1249 <<
", but we are already finished";
1255 <<
"Wire iterator thinks it's still at " << iWire.
ID()
1256 <<
", but we are already finished";
1260 MF_LOG_DEBUG(
"GeometryIteratorLoopTest") <<
"exception caught" 1261 " while dereferencing an iterator to a past-the-end wire.\n";
1266 <<
"Looping though " << nWires <<
" wires";
1267 unsigned int nLoopedWireIDs = 0;
1270 if (nLoopedWireIDs >= nWires) {
1272 <<
"After all " << nLoopedWireIDs
1273 <<
" wire IDs, iterator has not reached the end (" 1280 if (nLoopedWireIDs < nWires) {
1282 <<
"Looped only " << nLoopedWireIDs
1283 <<
" wire IDs, while we expected " << nWires <<
" iterations!";
1286 unsigned int nLoopedWires = 0;
1288 if (nLoopedWires >= nWires) {
1290 <<
"After all " << nLoopedWires
1291 <<
" wires, iterator has not reached the end";
1297 if (nLoopedWires < nWires) {
1299 <<
"Looped only " << nLoopedWires
1300 <<
" wires, while we expected " << nWires <<
" iterations!";
1307 <<
"TPC set ID still valid (" << runningSID
1308 <<
") after incrementing from the last one.";
1314 <<
"TPC set iterator thinks it's still at " << *iTPCsetID
1315 <<
", but we are already finished";
1321 <<
"Looping though " << cumTPCsets <<
" TPC sets";
1322 unsigned int nLoopedTPCsetIDs = 0;
1325 if (nLoopedTPCsetIDs >= cumTPCsets) {
1327 <<
"After all " << nLoopedTPCsetIDs
1328 <<
" TPC set IDs, iterator has not reached the end (" 1335 if (nLoopedTPCsetIDs < cumTPCsets) {
1337 <<
"Looped only " << nLoopedTPCsetIDs
1338 <<
" TPC set IDs, while we expected " << cumTPCsets <<
" iterations!";
1345 <<
"readout plane ID still valid (" << runningRID
1346 <<
") after incrementing from the last one.";
1352 <<
"readout plane iterator thinks it's still at " << *iROPID
1353 <<
", but we are already finished";
1359 <<
"Looping though " << cumROPs <<
" readout planes";
1360 unsigned int nLoopedROPIDs = 0;
1363 if (nLoopedROPIDs >= cumROPs) {
1365 <<
"After all " << nLoopedROPIDs
1366 <<
" readout planes, ID iterator has not reached the end (" 1373 if (nLoopedROPIDs < cumROPs) {
1375 <<
"Looped only " << nLoopedROPIDs
1376 <<
" readout plane IDs, while we expected " << cumROPs
1386 #pragma GCC diagnostic pop wire_iterator begin_wire() const
Returns an iterator pointing to the first wire in the detector.
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
ROP_id_iterator begin_ROP_id() const
Returns an iterator pointing to the first ROP ID in the detector.
virtual unsigned int Run()
Executes the test.
wire_iterator end_wire() const
Returns an iterator pointing after the last wire in the detector.
TPC_id_iterator begin_TPC_id() const
Returns an iterator pointing to the first TPC ID in the detector.
IteratorBox< wire_iterator,&GeometryCore::begin_wire,&GeometryCore::end_wire > IterateWires() const
Enables ranged-for loops on all wires of the detector.
Encapsulate the construction of a single cyostat.
IteratorBox< plane_iterator,&GeometryCore::begin_plane,&GeometryCore::end_plane > IteratePlanes() const
Enables ranged-for loops on all planes of the detector.
Base forward iterator browsing all wire IDs in the detector.
Base forward iterator browsing all TPC IDs in the detector.
Base forward iterator browsing all readout plane IDs in the detector.
plane_iterator end_plane() const
Returns an iterator pointing after the last plane in the detector.
The data type to uniquely identify a Plane.
Geometry information for a single TPC.
Class identifying a set of TPC sharing readout channels.
unsigned int NTPCsets(readout::CryostatID const &cryoid) const
Returns the total number of TPC sets in the specified cryostat.
#define MF_LOG_ERROR(category)
GeometryCore const * geom
pointer to the geometry description
ROP_id_iterator end_ROP_id() const
Returns an iterator pointing after the last ROP ID in the detector.
TPCset_id_iterator end_TPCset_id() const
Returns an iterator pointing after the last TPC set ID in the detector.
Geometry information for a single cryostat.
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
ElementPtr_t get() const
Returns a pointer to the geometry element, or nullptr if invalid.
IteratorBox< TPC_id_iterator,&GeometryCore::begin_TPC_id,&GeometryCore::end_TPC_id > IterateTPCIDs() const
Enables ranged-for loops on all TPC IDs of the detector.
bool IncrementID(geo::CryostatID &id) const
unsigned int Nchannels() const
Returns the number of TPC readout channels in the detector.
TPC_iterator begin_TPC() const
Returns an iterator pointing to the first TPC in the detector.
IteratorBox< plane_id_iterator,&GeometryCore::begin_plane_id,&GeometryCore::end_plane_id > IteratePlaneIDs() const
Enables ranged-for loops on all plane IDs of the detector.
IteratorBox< wire_id_iterator,&GeometryCore::begin_wire_id,&GeometryCore::end_wire_id > IterateWireIDs() const
Enables ranged-for loops on all wire IDs of the detector.
ElementPtr_t get() const
Returns a pointer to plane, or nullptr if invalid.
IteratorBox< TPC_iterator,&GeometryCore::begin_TPC,&GeometryCore::end_TPC > IterateTPCs() const
Enables ranged-for loops on all TPCs of the detector.
Base forward iterator browsing all cryostat IDs in the detector.
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
TPCset_id_iterator begin_TPCset_id() const
Returns an iterator pointing to the first TPC set ID in the detector.
unsigned int NTPC() const
Number of TPCs in this cryostat.
CryostatGeo const & Cryostat(geo::CryostatID const &cryoid) const
Returns the specified cryostat.
wire_id_iterator end_wire_id() const
Returns an iterator pointing after the last wire ID in the detector.
The data type to uniquely identify a TPC.
Definition of data types for geometry description.
TPC_id_iterator end_TPC_id() const
Returns an iterator pointing after the last TPC ID in the detector.
Class identifying a set of planes sharing readout channels.
ElementPtr_t get() const
Returns a pointer to TPC, or nullptr if invalid.
Encapsulate the geometry of a wire.
IteratorBox< cryostat_iterator,&GeometryCore::begin_cryostat,&GeometryCore::end_cryostat > IterateCryostats() const
Enables ranged-for loops on all cryostats of the detector.
cryostat_iterator begin_cryostat() const
Returns an iterator pointing to the first cryostat.
Base forward iterator browsing all plane IDs in the detector.
Encapsulate the construction of a single detector plane.
IteratorBox< ROP_id_iterator,&GeometryCore::begin_ROP_id,&GeometryCore::end_ROP_id > IterateROPIDs() const
Enables ranged-for loops on all readout plane IDs of the detector.
ElementPtr_t get() const
Returns a pointer to cryostat, or nullptr if invalid.
LocalID_t const & ID() const
Returns the ID of the pointed geometry element.
plane_id_iterator end_plane_id() const
Returns an iterator pointing after the last plane ID in the detector.
ElementPtr_t get() const
Returns a pointer to wire, or nullptr if invalid.
#define MF_LOG_VERBATIM(category)
IteratorBox< TPCset_id_iterator,&GeometryCore::begin_TPCset_id,&GeometryCore::end_TPCset_id > IterateTPCsetIDs() const
Enables ranged-for loops on all TPC set IDs of the detector.
cryostat_id_iterator begin_cryostat_id() const
Returns an iterator pointing to the first cryostat ID.
IteratorBox< cryostat_id_iterator,&GeometryCore::begin_cryostat_id,&GeometryCore::end_cryostat_id > IterateCryostatIDs() const
Enables ranged-for loops on all cryostat IDs of the detector.
Access the description of detector geometry.
plane_id_iterator begin_plane_id() const
Returns an iterator pointing to the first plane ID in the detector.
wire_id_iterator begin_wire_id() const
Returns an iterator pointing to the first wire ID in the detector.
unsigned int NROPs(readout::TPCsetID const &tpcsetid) const
Returns the total number of ROP in the specified TPC set.
Tests the correct iteration of the geo::Geometry iterators.
Forward iterator browsing all geometry elements in the detector.
recob::tracking::Plane Plane
LArSoft geometry interface.
Base forward iterator browsing all TPC set IDs in the detector.
plane_iterator begin_plane() const
Returns an iterator pointing to the first plane in the detector.
cet::coded_exception< error, detail::translate > exception
TPC_iterator end_TPC() const
Returns an iterator pointing after the last TPC in the detector.
Encapsulate the construction of a single detector plane.
The data type to uniquely identify a cryostat.
cryostat_id_iterator end_cryostat_id() const
Returns an iterator pointing after the last cryostat ID.