Executes the test.
101 MF_LOG_VERBATIM(
"GeometryIteratorLoopTest")
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();
135 MF_LOG_TRACE(
"GeometryIteratorLoopTest") <<
" C=" << c
136 <<
" (" << nTPC <<
" TPCs, " << nTPCsets <<
" TPC sets)";
138 if (runningCID != expCID) {
139 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
140 <<
"Cryostat ID incremented to " << runningCID <<
", expected: "
146 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
147 <<
"Cryostat ID iterator thinks it's all over at C=" << c;
150 else if (iCryostatID->Cryostat != c) {
151 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
152 <<
"Cryostat ID iterator thinks it's at C=" << (*iCryostatID)
153 <<
" instead of " << c;
156 else if (iCryostatID.
get() != &cryo) {
157 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
158 <<
"Cryostat ID iterator retrieves CryostatGeo["
159 << ((
void*) iCryostatID.
get())
160 <<
"] instead of [" << ((
void*) &cryo) <<
"]";
164 if (&*iCryostat != &cryo) {
165 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
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){
184 const TPCGeo&
TPC(cryo.TPC(t));
186 const unsigned int NPlanes =
TPC.Nplanes();
188 MF_LOG_TRACE(
"GeometryIteratorLoopTest") <<
" " << expTID
189 <<
" (" << NPlanes <<
" planes)";
191 if (runningTID != expTID) {
192 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
193 <<
"TPC ID incremented to " << runningTID <<
", expected: "
199 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
200 <<
"TPC ID iterator thinks it's all over at " << expTID;
203 else if (iTPCID->Cryostat != c) {
204 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
205 <<
"TPC ID iterator thinks it's at C=" << iTPCID->Cryostat
206 <<
" instead of " << c;
209 else if (iTPCID->TPC != t) {
210 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
211 <<
"TPC ID iterator thinks it's at T=" << iTPCID->TPC
212 <<
" instead of " << t;
215 else if (iTPCID.
get() != &
TPC) {
216 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
217 <<
"TPC ID iterator retrieves TPCGeo[" << ((
void*) iTPCID.
get())
218 <<
"] instead of [" << ((
void*) &
TPC) <<
"]";
222 if (&*iTPC != &
TPC) {
223 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
224 <<
"TPC iterator retrieves TPCGeo[" << ((
void*) iTPC.
get())
225 <<
"] (" << iTPC.
ID() <<
") instead of [" << ((
void*) &
TPC)
226 <<
"] (" << expTID <<
")";
230 if (*iTPCIDinCryo != expTID) {
231 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
232 <<
"TPC ID local iterator in " << expCID
233 <<
" points to " << *iTPCIDinCryo <<
" instead of " << expTID;
236 if (iTPCinCryo->
ID() != expTID) {
237 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
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) {
260 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
261 <<
"Plane ID incremented to " << runningPID <<
", expected: "
266 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
267 <<
"plane ID iterator thinks it's all over at " << expPID;
270 else if (iPlaneID->Cryostat != c) {
271 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
272 <<
"plane ID iterator thinks it's at C=" << iPlaneID->Cryostat
273 <<
" instead of " << c;
276 else if (iPlaneID->TPC != t) {
277 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
278 <<
"plane ID iterator thinks it's at T=" << iPlaneID->TPC
279 <<
" instead of " << t;
282 else if (iPlaneID->Plane !=
p) {
283 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
284 <<
"plane ID iterator thinks it's at P=" << iPlaneID->Plane
285 <<
" instead of " <<
p;
288 else if (iPlaneID.
get() != &
Plane) {
289 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
290 <<
"plane ID iterator retrieves PlaneGeo["
291 << ((
void*) iPlaneID.
get()) <<
"] instead of ["
292 << ((
void*) &
Plane) <<
"]";
296 if (&*iPlane != &
Plane) {
297 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
298 <<
"plane iterator retrieves PlaneGeo[" << ((
void*) iPlane.
get())
299 <<
"] instead of [" << ((
void*) &
Plane) <<
"] (" << expPID <<
")";
303 if (*iPlaneIDinCryo != expPID) {
304 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
305 <<
"Plane ID local iterator in " << expCID <<
" points to "
306 << *iPlaneIDinCryo <<
" instead of " << expPID;
309 if (iPlaneInCryo->
ID() != expPID) {
310 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
311 <<
"Plane local iterator in " << expCID <<
" points to "
312 << iPlaneInCryo.
ID() <<
" instead of " << expPID;
316 if (*iPlaneIDinTPC != expPID) {
317 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
318 <<
"Plane ID local iterator in " << expTID <<
" points to "
319 << *iPlaneIDinTPC <<
" instead of " << expPID;
322 if (iPlaneInTPC->
ID() != expPID) {
323 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
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) {
335 const WireGeo& Wire(
Plane.Wire(
w));
338 if (runningWID != expWID) {
339 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
340 <<
"Wire ID incremented to " << runningWID <<
", expected: "
345 MF_LOG_TRACE(
"GeometryIteratorLoopTest") <<
" " << expWID;
347 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
348 <<
"wire ID iterator thinks it's all over at " << expWID;
351 else if (iWireID->Cryostat != c) {
352 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
353 <<
"wire ID iterator thinks it's at C=" << iWireID->Cryostat
354 <<
" instead of " << c;
357 else if (iWireID->TPC != t) {
358 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
359 <<
"wire ID iterator thinks it's at T=" << iWireID->TPC
360 <<
" instead of " << t;
363 else if (iWireID->Plane !=
p) {
364 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
365 <<
"wire ID iterator thinks it's at P=" << iWireID->Plane
366 <<
" instead of " <<
p;
369 else if (iWireID->Wire !=
w) {
370 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
371 <<
"wire ID iterator thinks it's at W=" << iWireID->Wire
372 <<
" instead of " <<
w;
375 else if (iWireID.
get() != &Wire) {
376 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
377 <<
"wire ID iterator retrieves WireGeo["
378 << ((
void*) iWireID.
get())
379 <<
"] instead of [" << ((
void*) &Wire) <<
"]";
383 if (&*iWire != &Wire) {
384 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
385 <<
"wire iterator retrieves WireGeo[" << ((
void*) iWire.
get())
386 <<
"] instead of [" << ((
void*) &Wire) <<
"] (" << expWID
391 if (*iWireIDinCryo != expWID) {
392 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
393 <<
"Wire ID local iterator in " << expCID <<
" points to "
394 << *iWireIDinCryo <<
" instead of " << expWID;
397 if (iWireInCryo.
ID() != expWID) {
398 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
399 <<
"Wire local iterator in " << expCID <<
" points to "
400 << iWireInCryo.
ID() <<
" instead of " << expWID;
403 if (*iWireIDinTPC != expWID) {
404 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
405 <<
"Wire ID local iterator in " << expTID <<
" points to "
406 << *iWireIDinTPC <<
" instead of " << expWID;
409 if (iWireInTPC.
ID() != expWID) {
410 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
411 <<
"Wire local iterator in " << expTID <<
" points to "
412 << iWireInTPC.
ID() <<
" instead of " << expWID;
415 if (*iWireIDinPlane != expWID) {
416 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
417 <<
"Wire ID local iterator in " << expPID <<
" points to "
418 << *iWireIDinPlane <<
" instead of " << expWID;
421 if (iWireInPlane.
ID() != expWID) {
422 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
423 <<
"Wire local iterator in " << expPID <<
" points to "
424 << iWireInPlane.
ID() <<
" instead of " << expWID;
444 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
445 <<
"Wire ID local iterator in " << expPID
446 <<
" should be at end and instead points to " << *iWireIDinPlane;
450 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
451 <<
"Wire local iterator in " << expPID
452 <<
" should be at end, and instead points to "
453 << iWireInPlane.
ID();
460 MF_LOG_DEBUG(
"GeometryIteratorsDump")
461 <<
"Looping though " << nWiresInPlane <<
" wires in " << expPID;
462 unsigned int nLoopedWireIDs = 0;
464 MF_LOG_TRACE(
"GeometryIteratorsDump") << wID;
465 if (nLoopedWireIDs >= nWiresInPlane) {
466 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
467 <<
"After all " << nLoopedWireIDs <<
" wire IDs in " << expPID
468 <<
", iterator has not reached the end ("
476 if (nLoopedWireIDs < nWiresInPlane) {
477 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
478 <<
"Looped only " << nLoopedWireIDs
479 <<
" wire IDs in " << expPID <<
", while we expected "
480 << nWiresInPlane <<
" iterations!";
483 unsigned int nLoopedWires = 0;
485 if (nLoopedWires >= nWiresInPlane) {
486 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
487 <<
"After all " << nLoopedWires <<
" wires in "
488 << expPID <<
", iterator has not reached the end";
494 if (nLoopedWires < nWiresInPlane) {
495 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
496 <<
"Looped only " << nLoopedWires <<
" wires in " << expPID
497 <<
", while we expected " << nWiresInPlane <<
" iterations!";
515 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
516 <<
"Plane ID local iterator in " << expTID
517 <<
" should be at end and instead points to " << *iPlaneIDinTPC;
521 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
522 <<
"Plane local iterator in " << expTID
523 <<
" should be at end, and instead points to " << iPlaneInTPC.
ID();
528 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
529 <<
"Wire ID local iterator in " << expTID
530 <<
" should be at end and instead points to " << *iWireIDinTPC;
534 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
535 <<
"Wire local iterator in " << expTID
536 <<
" should be at end, and instead points to " << iWireInTPC.
ID();
543 MF_LOG_DEBUG(
"GeometryIteratorsDump")
544 <<
"Looping though " << nPlanesInTPC <<
" planes in " << expTID;
545 unsigned int nLoopedPlaneIDs = 0;
547 MF_LOG_TRACE(
"GeometryIteratorsDump") << pID;
548 if (nLoopedPlaneIDs >= nPlanesInTPC) {
549 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
550 <<
"After all " << nLoopedPlaneIDs <<
" plane IDs in " << expTID
551 <<
", iterator has not reached the end ("
558 if (nLoopedPlaneIDs < nPlanesInTPC) {
559 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
560 <<
"Looped only " << nLoopedPlaneIDs
561 <<
" plane IDs in " << expTID <<
", while we expected "
562 << nPlanesInTPC <<
" iterations!";
565 unsigned int nLoopedPlanes = 0;
567 if (nLoopedPlanes >= nPlanesInTPC) {
568 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
569 <<
"After all " << nLoopedPlanes <<
" planes in "
570 << expTID <<
", iterator has not reached the end";
576 if (nLoopedPlanes < nPlanesInTPC) {
577 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
578 <<
"Looped only " << nLoopedPlanes <<
" planes in " << expTID
579 <<
", while we expected " << nPlanesInTPC <<
" iterations!";
586 MF_LOG_DEBUG(
"GeometryIteratorsDump")
587 <<
"Looping though " << nWiresInTPC <<
" wires in " << expTID;
588 unsigned int nLoopedWireIDs = 0;
590 MF_LOG_TRACE(
"GeometryIteratorsDump") << wID;
591 if (nLoopedWireIDs >= nWiresInTPC) {
592 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
593 <<
"After all " << nLoopedWireIDs <<
" wire IDs in " << expTID
594 <<
", iterator has not reached the end ("
601 if (nLoopedWireIDs < nWiresInTPC) {
602 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
603 <<
"Looped only " << nLoopedWireIDs
604 <<
" wire IDs in " << expTID <<
", while we expected "
605 << nWiresInTPC <<
" iterations!";
608 unsigned int nLoopedWires = 0;
610 if (nLoopedWires >= nWiresInTPC) {
611 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
612 <<
"After all " << nLoopedWires <<
" wires in "
613 << expTID <<
", iterator has not reached the end";
619 if (nLoopedWires < nWiresInTPC) {
620 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
621 <<
"Looped only " << nLoopedWires <<
" wires in " << expTID
622 <<
", while we expected " << nWiresInTPC <<
" iterations!";
636 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
637 <<
"TPC ID local iterator in " << expCID
638 <<
" should be at end, and instead points to " << *iTPCIDinCryo;
642 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
643 <<
"TPC local iterator in " << expCID
644 <<
" should be at end, and instead points to " << iTPCinCryo->
ID();
649 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
650 <<
"Plane ID local iterator in " << expCID
651 <<
" should be at end, and instead points to " << *iPlaneIDinCryo;
655 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
656 <<
"Plane local iterator in " << expCID
657 <<
" should be at end, and instead points to " << iPlaneInCryo->
ID();
662 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
663 <<
"Wire ID local iterator in " << expCID
664 <<
" should be at end, and instead points to " << *iWireIDinCryo;
668 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
669 <<
"Wire local iterator in " << expCID
670 <<
" should be at end, and instead points to " << iWireInCryo.
ID();
677 unsigned int nTPCsInCryo = cryo.NTPC();
678 MF_LOG_DEBUG(
"GeometryIteratorsDump")
679 <<
"Looping though " << nTPCsInCryo <<
" TPCs in " << expCID;
680 unsigned int nLoopedTPCIDs = 0;
682 MF_LOG_TRACE(
"GeometryIteratorsDump") << tID;
683 if (nLoopedTPCIDs >= nTPCsInCryo) {
684 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
685 <<
"After all " << nLoopedTPCIDs <<
" TPC IDs in " << expCID
686 <<
", iterator has not reached the end ("
693 if (nLoopedTPCIDs < nTPCsInCryo) {
694 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
695 <<
"Looped only " << nLoopedTPCIDs
696 <<
" TPC IDs in " << expCID <<
", while we expected "
697 << nTPCsInCryo <<
" iterations!";
700 unsigned int nLoopedTPCs = 0;
702 if (nLoopedTPCs >= nTPCsInCryo) {
703 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
704 <<
"After all " << nLoopedTPCs
705 <<
" TPCs in " << expCID <<
", iterator has not reached the end";
711 if (nLoopedTPCs < nTPCsInCryo) {
712 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
713 <<
"Looped only " << nLoopedTPCs <<
" TPCs in " << expCID
714 <<
", while we expected " << nTPCsInCryo <<
" iterations!";
721 MF_LOG_DEBUG(
"GeometryIteratorsDump")
722 <<
"Looping though " << nPlanesInCryo <<
" planes in " << expCID;
723 unsigned int nLoopedPlaneIDs = 0;
725 MF_LOG_TRACE(
"GeometryIteratorsDump") << pID;
726 if (nLoopedPlaneIDs >= nPlanesInCryo) {
727 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
728 <<
"After all " << nLoopedPlaneIDs <<
" plane IDs in " << expCID
729 <<
", iterator has not reached the end ("
736 if (nLoopedPlaneIDs < nPlanesInCryo) {
737 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
738 <<
"Looped only " << nLoopedPlaneIDs
739 <<
" plane IDs in " << expCID <<
", while we expected "
740 << nPlanesInCryo <<
" iterations!";
743 unsigned int nLoopedPlanes = 0;
745 if (nLoopedPlanes >= nPlanesInCryo) {
746 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
747 <<
"After all " << nLoopedPlanes
748 <<
" planes in " << expCID <<
", iterator has not reached the end";
754 if (nLoopedPlanes < nPlanesInCryo) {
755 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
756 <<
"Looped only " << nLoopedPlanes <<
" planes in " << expCID
757 <<
", while we expected " << nPlanesInCryo <<
" iterations!";
764 MF_LOG_DEBUG(
"GeometryIteratorsDump")
765 <<
"Looping though " << nWiresInCryo <<
" wires in " << expCID;
766 unsigned int nLoopedWireIDs = 0;
768 MF_LOG_TRACE(
"GeometryIteratorsDump") << wID;
769 if (nLoopedWireIDs >= nWiresInCryo) {
770 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
771 <<
"After all " << nLoopedWireIDs <<
" wire IDs in " << expCID
772 <<
", iterator has not reached the end ("
779 if (nLoopedWireIDs < nWiresInCryo) {
780 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
781 <<
"Looped only " << nLoopedWireIDs
782 <<
" wire IDs in " << expCID <<
", while we expected "
783 << nWiresInCryo <<
" iterations!";
786 unsigned int nLoopedWires = 0;
788 if (nLoopedWires >= nWiresInCryo) {
789 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
790 <<
"After all " << nLoopedWires
791 <<
" wires in " << expCID <<
", iterator has not reached the end";
797 if (nLoopedWires < nWiresInCryo) {
798 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
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);
818 MF_LOG_TRACE(
"GeometryIteratorLoopTest")
819 <<
" " << expSID <<
" (" << NROPs <<
" planes)";
821 if (runningSID != expSID) {
822 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
823 <<
"TPC set ID incremented to " << runningSID <<
", expected: "
829 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
830 <<
"TPCset ID iterator thinks it's all over at " << expSID;
833 else if (iTPCsetID->Cryostat != c) {
834 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
835 <<
"TPC set ID iterator thinks it's at C=" << iTPCsetID->Cryostat
836 <<
" instead of " << c;
839 else if (iTPCsetID->TPCset !=
s) {
840 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
841 <<
"TPC set ID iterator thinks it's at S=" << iTPCsetID->TPCset
842 <<
" instead of " <<
s;
846 if (*iTPCsetIDinCryo != expSID) {
847 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
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) {
861 MF_LOG_TRACE(
"GeometryIteratorLoopTest")
862 <<
" " << expRID <<
" (" << NChannels <<
" channels)";
864 if (runningRID != expRID) {
865 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
866 <<
"Readout plane ID incremented to " << runningRID
867 <<
", expected: " << expRID;
872 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
873 <<
"readout plane ID iterator thinks it's all over at " << expRID;
876 else if (iROPID->Cryostat != c) {
877 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
878 <<
"readout plane ID iterator thinks it's at C="
879 << iROPID->Cryostat <<
" instead of " << c;
882 else if (iROPID->TPCset !=
s) {
883 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
884 <<
"readout plane ID iterator thinks it's at S=" << iROPID->TPCset
885 <<
" instead of " <<
s;
888 else if (iROPID->ROP !=
r) {
889 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
890 <<
"readout plane ID iterator thinks it's at R=" << iROPID->ROP
891 <<
" instead of " <<
r;
895 if (*iROPIDinCryo != expRID) {
896 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
897 <<
"Readout plane ID local iterator in " << expCID
898 <<
" points to " << *iROPIDinCryo <<
" instead of " << expRID;
902 if (*iROPIDinTPCset != expRID) {
903 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
904 <<
"Readout plane ID local iterator in " << expSID
905 <<
" points to " << *iROPIDinTPCset <<
" instead of " << expRID;
930 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
931 <<
"Readout plane ID local iterator in " << expSID
932 <<
" should be at end and instead points to " << *iROPIDinTPCset;
939 MF_LOG_DEBUG(
"GeometryIteratorsDump")
940 <<
"Looping though " << nROPInTPCset <<
" readout planes in "
942 unsigned int nLoopedROPIDs = 0;
944 MF_LOG_TRACE(
"GeometryIteratorsDump") << rID;
945 if (nLoopedROPIDs >= nROPInTPCset) {
946 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
947 <<
"After all " << nLoopedROPIDs <<
" readout plane IDs in "
948 << expSID <<
", iterator has not reached the end ("
955 if (nLoopedROPIDs < nROPInTPCset) {
956 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
957 <<
"Looped only " << nLoopedROPIDs
958 <<
" readout plane IDs in " << expSID <<
", while we expected "
959 << nROPInTPCset <<
" iterations!";
971 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
972 <<
"TPC set ID local iterator in " << expCID
973 <<
" should be at end, and instead points to " << *iTPCsetIDinCryo;
978 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
979 <<
"Readout plane ID local iterator in " << expCID
980 <<
" should be at end, and instead points to " << *iROPIDinCryo;
987 MF_LOG_DEBUG(
"GeometryIteratorsDump")
988 <<
"Looping though " << nTPCsetsInCryo <<
" TPC sets in " << expCID;
989 unsigned int nLoopedTPCsetIDs = 0;
991 MF_LOG_TRACE(
"GeometryIteratorsDump") << sID;
992 if (nLoopedTPCsetIDs >= nTPCsetsInCryo) {
993 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
994 <<
"After all " << nLoopedTPCsetIDs <<
" TPC set IDs in " << expCID
995 <<
", iterator has not reached the end ("
1002 if (nLoopedTPCsetIDs < nTPCsetsInCryo) {
1003 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1004 <<
"Looped only " << nLoopedTPCsetIDs
1005 <<
" TPC set IDs in " << expCID <<
", while we expected "
1006 << nTPCsetsInCryo <<
" iterations!";
1014 MF_LOG_DEBUG(
"GeometryIteratorsDump")
1015 <<
"Looping though " << nROPInCryo <<
" readout planes in " << expCID;
1016 unsigned int nLoopedROPIDs = 0;
1018 MF_LOG_TRACE(
"GeometryIteratorsDump") << rID;
1019 if (nLoopedROPIDs >= nROPInCryo) {
1020 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1021 <<
"After all " << nLoopedROPIDs <<
" readout plane IDs in "
1022 << expCID <<
", iterator has not reached the end ("
1029 if (nLoopedROPIDs < nROPInCryo) {
1030 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1031 <<
"Looped only " << nLoopedROPIDs
1032 <<
" readout plane IDs in " << expCID <<
", while we expected "
1033 << nROPInCryo <<
" iterations!";
1044 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1045 <<
"Cryostat ID still valid (" << runningCID
1046 <<
") after incrementing from the last one.";
1051 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1052 <<
"Cryostat ID iterator thinks it's still at " << *iCryostatID
1053 <<
", but we are already finished";
1058 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1059 <<
"Cryostat iterator thinks it's still at " << iCryostat.
ID()
1060 <<
", but we are already finished";
1063 catch (cet::exception
const&) {
1064 MF_LOG_DEBUG(
"GeometryIteratorLoopTest") <<
"exception caught"
1065 " while dereferencing an iterator to a past-the-end cryostat.\n";
1069 MF_LOG_DEBUG(
"GeometryIteratorsDump")
1070 <<
"Looping though " << nCryostats <<
" cryostats";
1071 unsigned int nLoopedCryostatIDs = 0;
1073 MF_LOG_TRACE(
"GeometryIteratorsDump") << cID;
1074 if (nLoopedCryostatIDs >= nCryostats) {
1075 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1076 <<
"After all " << nLoopedCryostatIDs
1077 <<
" cryostat IDs, iterator has not reached the end ("
1082 ++nLoopedCryostatIDs;
1084 if (nLoopedCryostatIDs < nCryostats) {
1085 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1086 <<
"Looped only " << nLoopedCryostatIDs
1087 <<
" cryostat IDs, while we expected " << nCryostats <<
" iterations!";
1090 unsigned int nLoopedCryostats = 0;
1092 if (nLoopedCryostats >= nCryostats) {
1093 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1094 <<
"After all " << nLoopedCryostats
1095 <<
" cryostats, iterator has not reached the end";
1101 if (nLoopedCryostats < nCryostats) {
1102 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1103 <<
"Looped only " << nLoopedCryostats
1104 <<
" cryostats, while we expected " << nCryostats <<
" iterations!";
1109 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1110 <<
"TPC ID still valid (" << runningTID
1111 <<
") after incrementing from the last one.";
1116 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1117 <<
"TPC iterator thinks it's still at " << *iTPCID
1118 <<
", but we are already finished";
1123 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1124 <<
"TPC iterator thinks it's still at " << iTPC.
ID()
1125 <<
", but we are already finished";
1128 catch (cet::exception
const&) {
1129 MF_LOG_DEBUG(
"GeometryIteratorLoopTest") <<
"exception caught"
1130 " while dereferencing an iterator to a past-the-end TPC.\n";
1134 MF_LOG_DEBUG(
"GeometryIteratorsDump")
1135 <<
"Looping though " << nTPCs <<
" TPCs";
1136 unsigned int nLoopedTPCIDs = 0;
1138 MF_LOG_TRACE(
"GeometryIteratorsDump") << tID;
1139 if (nLoopedTPCIDs >= nTPCs) {
1140 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1141 <<
"After all " << nLoopedTPCIDs
1142 <<
" TPC IDs, iterator has not reached the end ("
1149 if (nLoopedTPCIDs < nTPCs) {
1150 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1151 <<
"Looped only " << nLoopedTPCIDs
1152 <<
" TPC IDs, while we expected " << nTPCs <<
" iterations!";
1155 unsigned int nLoopedTPCs = 0;
1157 if (nLoopedTPCs >= nTPCs) {
1158 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1159 <<
"After all " << nLoopedTPCs
1160 <<
" TPCs, iterator has not reached the end";
1166 if (nLoopedTPCs < nTPCs) {
1167 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1168 <<
"Looped only " << nLoopedTPCs
1169 <<
" TPCs, while we expected " << nTPCs <<
" iterations!";
1175 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1176 <<
"Plane ID still valid (" << runningPID
1177 <<
") after incrementing from the last one.";
1182 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1183 <<
"Plane iterator thinks it's still at " << *iPlaneID
1184 <<
", but we are already finished";
1189 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1190 <<
"Plane iterator thinks it's still at " << iPlane.
ID()
1191 <<
", but we are already finished";
1194 catch (cet::exception
const&) {
1195 MF_LOG_DEBUG(
"GeometryIteratorLoopTest") <<
"exception caught"
1196 " while dereferencing an iterator to a past-the-end plane.\n";
1200 MF_LOG_DEBUG(
"GeometryIteratorsDump")
1201 <<
"Looping though " << nPlanes <<
" planes";
1202 unsigned int nLoopedPlaneIDs = 0;
1204 MF_LOG_TRACE(
"GeometryIteratorsDump") << pID;
1205 if (nLoopedPlaneIDs >= nPlanes) {
1206 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1207 <<
"After all " << nLoopedPlaneIDs
1208 <<
" planes, ID iterator has not reached the end ("
1215 if (nLoopedPlaneIDs < nPlanes) {
1216 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1217 <<
"Looped only " << nLoopedPlaneIDs
1218 <<
" plane IDs, while we expected " << nPlanes <<
" iterations!";
1221 unsigned int nLoopedPlanes = 0;
1223 if (nLoopedPlanes >= nPlanes) {
1224 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1225 <<
"After all " << nLoopedPlanes
1226 <<
" planes, iterator has not reached the end";
1232 if (nLoopedPlanes < nPlanes) {
1233 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1234 <<
"Looped only " << nLoopedPlanes
1235 <<
" planes, while we expected " << nPlanes <<
" iterations!";
1240 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1241 <<
"Wire ID still valid (" << runningWID
1242 <<
") after incrementing from the last one.";
1247 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1248 <<
"Wire iterator thinks it's still at " << *iWireID
1249 <<
", but we are already finished";
1254 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1255 <<
"Wire iterator thinks it's still at " << iWire.
ID()
1256 <<
", but we are already finished";
1259 catch (cet::exception
const&) {
1260 MF_LOG_DEBUG(
"GeometryIteratorLoopTest") <<
"exception caught"
1261 " while dereferencing an iterator to a past-the-end wire.\n";
1265 MF_LOG_DEBUG(
"GeometryIteratorsDump")
1266 <<
"Looping though " << nWires <<
" wires";
1267 unsigned int nLoopedWireIDs = 0;
1269 MF_LOG_TRACE(
"GeometryIteratorsDump") << wID;
1270 if (nLoopedWireIDs >= nWires) {
1271 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1272 <<
"After all " << nLoopedWireIDs
1273 <<
" wire IDs, iterator has not reached the end ("
1280 if (nLoopedWireIDs < nWires) {
1281 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1282 <<
"Looped only " << nLoopedWireIDs
1283 <<
" wire IDs, while we expected " << nWires <<
" iterations!";
1286 unsigned int nLoopedWires = 0;
1288 if (nLoopedWires >= nWires) {
1289 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1290 <<
"After all " << nLoopedWires
1291 <<
" wires, iterator has not reached the end";
1297 if (nLoopedWires < nWires) {
1298 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1299 <<
"Looped only " << nLoopedWires
1300 <<
" wires, while we expected " << nWires <<
" iterations!";
1306 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1307 <<
"TPC set ID still valid (" << runningSID
1308 <<
") after incrementing from the last one.";
1313 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1314 <<
"TPC set iterator thinks it's still at " << *iTPCsetID
1315 <<
", but we are already finished";
1320 MF_LOG_DEBUG(
"GeometryIteratorsDump")
1321 <<
"Looping though " << cumTPCsets <<
" TPC sets";
1322 unsigned int nLoopedTPCsetIDs = 0;
1324 MF_LOG_TRACE(
"GeometryIteratorsDump") << sID;
1325 if (nLoopedTPCsetIDs >= cumTPCsets) {
1326 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1327 <<
"After all " << nLoopedTPCsetIDs
1328 <<
" TPC set IDs, iterator has not reached the end ("
1335 if (nLoopedTPCsetIDs < cumTPCsets) {
1336 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1337 <<
"Looped only " << nLoopedTPCsetIDs
1338 <<
" TPC set IDs, while we expected " << cumTPCsets <<
" iterations!";
1344 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1345 <<
"readout plane ID still valid (" << runningRID
1346 <<
") after incrementing from the last one.";
1351 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1352 <<
"readout plane iterator thinks it's still at " << *iROPID
1353 <<
", but we are already finished";
1358 MF_LOG_DEBUG(
"GeometryIteratorsDump")
1359 <<
"Looping though " << cumROPs <<
" readout planes";
1360 unsigned int nLoopedROPIDs = 0;
1362 MF_LOG_TRACE(
"GeometryIteratorsDump") << rID;
1363 if (nLoopedROPIDs >= cumROPs) {
1364 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1365 <<
"After all " << nLoopedROPIDs
1366 <<
" readout planes, ID iterator has not reached the end ("
1373 if (nLoopedROPIDs < cumROPs) {
1374 MF_LOG_ERROR(
"GeometryIteratorLoopTest")
1375 <<
"Looped only " << nLoopedROPIDs
1376 <<
" readout plane IDs, while we expected " << cumROPs
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.
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.
BEGIN_PROLOG true icarus_rawdigitfilter FilterTools FilterPlane1 Plane
IteratorBox< wire_iterator,&GeometryCore::begin_wire,&GeometryCore::end_wire > IterateWires() const
Enables ranged-for loops on all wires of the detector.
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.
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.
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.
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.
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.
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.
then echo File list $list not found else cat $list while read file do echo $file sed s
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.
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.
Forward iterator browsing all geometry elements in the detector.
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.
TPC_iterator end_TPC() const
Returns an iterator pointing after the last TPC in the detector.
The data type to uniquely identify a cryostat.
cryostat_id_iterator end_cryostat_id() const
Returns an iterator pointing after the last cryostat ID.