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-07-12 15:23:06 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> (
      21              :                                                                dbe::dbholder::database );
      22              : //------------------------------------------------------------------------------------------
      23           38 : cptr<Configuration> 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            7 : bool dbe::dbaccessor::is_loaded()
      32              : {
      33            7 : return dbaccessor::dbptr().get() != nullptr;
      34              : }
      35              : //------------------------------------------------------------------------------------------
        

Generated by: LCOV version 2.0-1