Skip to content
Snippets Groups Projects
Select Git revision
  • 90bd8f080f6ca9bc9d04230da4335138a5bf11f0
  • master default protected
  • jul25_patches
  • nightly_master
  • online_mvd_readconf_cleanup protected
  • online_much_readconf_cleanup protected
  • cleanup_rich_v25a
  • jul24_patches
  • nov23_patches
  • DC_2404
  • nighly_master
  • DC_Jan24
  • DC_Nov23
  • DC_Oct23
  • feb23_patches
  • L1Algo-dev9
  • dec21_patches protected
  • apr21_patches protected
  • RC2_jul25
  • dev_2025_46
  • dev_2025_45
  • dev_2025_44
  • dev_2025_43
  • dev_2025_42
  • dev_2025_41
  • dev_2025_40
  • dev_2025_39
  • dev_2025_38
  • dev_2025_37
  • dev_2025_36
  • dev_2025_35
  • dev_2025_34
  • dev_2025_33
  • dev_2025_32
  • dev_2025_31
  • dev_2025_30
  • RC_jul25
  • dev_2025_29
38 results

SubChain.h

Blame
  • SubChain.h 990 B
    /* Copyright (C) 2023 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
       SPDX-License-Identifier: GPL-3.0-only
       Authors: Felix Weiglhofer [committer] */
    #ifndef CBM_ALGO_BASE_SUBCHAIN_H
    #define CBM_ALGO_BASE_SUBCHAIN_H
    
    #include <gsl/pointers>
    
    #include "ChainContext.h"
    
    namespace cbm::algo
    {
      class SubChain {
    
      public:
        void SetContext(ChainContext* ctx) { fContext = ctx; }
    
        const Options& Opts() const { return gsl::make_not_null(fContext)->opts; }
        const RecoParams& Params() const { return gsl::make_not_null(fContext)->recoParams; }
    
        bool HasMonitor() const { return gsl::make_not_null(fContext)->monitor != nullptr; }
    
        Monitor& GetMonitor() const
        {
          // Need Get-prefix to avoid conflict with Monitor-class name
          if (!HasMonitor()) throw std::runtime_error("No monitor available");
          return *gsl::make_not_null(fContext)->monitor;
        }
    
      private:
        ChainContext* fContext = nullptr;
      };
    }  // namespace cbm::algo
    
    #endif