DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
src
internal
dbaccessor.cpp
Go to the documentation of this file.
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
dbe::dbaccessor::dbptr
()
24
{
25
t_lock
l(
dbholder::database_lock
);
26
return
dbholder::database_concurrent_ptr
;
27
}
28
//------------------------------------------------------------------------------------------
29
30
//------------------------------------------------------------------------------------------
31
bool
32
dbe::dbaccessor::is_loaded
()
33
{
34
return
dbaccessor::dbptr
().
get
() !=
nullptr
;
35
}
36
//------------------------------------------------------------------------------------------
cptr
Definition
cptr.hpp:56
cptr::cptr
cptr(T *p)
Definition
cptr.hpp:63
cptr::get
T * get()
Definition
cptr.hpp:87
dbe::dbaccessor::t_lock
dbholder::t_lock t_lock
Definition
dbaccessor.hpp:57
dbe::dbaccessor::dbptr
static cptr< dunedaq::conffwk::Configuration > dbptr()
Definition
dbaccessor.cpp:23
dbe::dbaccessor::is_loaded
static bool is_loaded()
Definition
dbaccessor.cpp:32
dbe::dbholder::database_concurrent_ptr
static cptr< dunedaq::conffwk::Configuration > database_concurrent_ptr
Definition
dbaccessor.hpp:47
dbe::dbholder::t_mutex
dbe::types::common::type_mutex t_mutex
Definition
dbaccessor.hpp:43
dbe::dbholder::database
static dunedaq::conffwk::Configuration * database
Definition
dbaccessor.hpp:46
dbe::dbholder::database_lock
static dbe::types::common::type_mutex database_lock
Definition
dbaccessor.hpp:48
dunedaq::conffwk::Configuration
Defines base class for cache of template objects.
Definition
Configuration.hpp:234
dbaccessor.hpp
dunedaq::conffwk
Definition
test_circular_dependency.hpp:5
Generated on
for DUNE-DAQ by
1.18.0