LCOV - code coverage report
Current view: top level - dbe/src/internal - dbaccessor.cpp (source / functions) Coverage Total Hit
Test: code.result Lines: 100.0 % 6 6
Test Date: 2026-10-11 15:05:20 Functions: 100.0 % 2 2

            Line data    Source code
       1              : // DUNE DAQ modification notice:
       2              : // This file has been modified from the original ATLAS dbe source for the DUNE DAQ project.
       3              : // Fork baseline commit: dbe-02-12-17 (2022-05-12).
       4              : // Renamed since fork: no.
       5              : 
       6              : /*
       7              :  * dbaccessor.cpp
       8              :  *
       9              :  *  Created on: Mar 10, 2016
      10              :  *      Author: Leonidas Georgopoulos
      11              :  */
      12              : 
      13              : #include "dbe/dbaccessor.hpp"
      14              : 
      15              : using namespace dunedaq::conffwk;
      16              : 
      17              : //------------------------------------------------------------------------------------------
      18              : dbe::dbholder::t_mutex dbe::dbholder::database_lock;
      19              : Configuration* dbe::dbholder::database = nullptr;
      20              : cptr<Configuration> dbe::dbholder::database_concurrent_ptr = cptr<Configuration>(dbe::dbholder::database);
      21              : //------------------------------------------------------------------------------------------
      22              : cptr<Configuration>
      23           38 : dbe::dbaccessor::dbptr()
      24              : {
      25           38 :   t_lock l(dbholder::database_lock);
      26           38 :   return dbholder::database_concurrent_ptr;
      27           38 : }
      28              : //------------------------------------------------------------------------------------------
      29              : 
      30              : //------------------------------------------------------------------------------------------
      31              : bool
      32            7 : dbe::dbaccessor::is_loaded()
      33              : {
      34            7 :   return dbaccessor::dbptr().get() != nullptr;
      35              : }
      36              : //------------------------------------------------------------------------------------------
        

Generated by: LCOV version 2.0-1