LCOV - code coverage report
Current view: top level - src/module - RestrictToRegion.cpp (source / functions) Coverage Total Hit
Test: coverage.info.cleaned Lines: 50.0 % 12 6
Test Date: 2026-06-18 09:49:19 Functions: 66.7 % 3 2

            Line data    Source code
       1              : #include "crpropa/module/RestrictToRegion.h" 
       2              : 
       3              : #include <sstream>
       4              : 
       5              : namespace crpropa {
       6              : 
       7            1 : RestrictToRegion::RestrictToRegion(Module* _module, Surface* _surface) : module(_module), surface(_surface) { 
       8            1 : };
       9              : 
      10            2 : void RestrictToRegion::process(Candidate *candidate) const {
      11            2 :         if (surface->distance(candidate->current.getPosition()) <= 0) {
      12            1 :                 module->process(candidate);
      13              :         }
      14            2 : };
      15              : 
      16            0 : std::string RestrictToRegion::getDescription() const {
      17            0 :         std::stringstream s;
      18              :         s << "RestrictToArea:\n"
      19            0 :                 << "  Module: " << module->getDescription() << std::endl
      20            0 :                 << "  Region: " << surface->getDescription() << std::endl;
      21            0 :         return s.str();
      22            0 : };
      23              : 
      24              : 
      25              : } // namespace crpropa
        

Generated by: LCOV version 2.0-1