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>
(
21
dbe::dbholder::database
);
22
//------------------------------------------------------------------------------------------
23
cptr<Configuration>
dbe::dbaccessor::dbptr
()
24
{
25
t_lock
l (
dbholder::database_lock
);
26
return
dbholder::database_concurrent_ptr
;
27
}
28
//------------------------------------------------------------------------------------------
29
30
//------------------------------------------------------------------------------------------
31
bool
dbe::dbaccessor::is_loaded
()
32
{
33
return
dbaccessor::dbptr
().
get
() !=
nullptr
;
34
}
35
//------------------------------------------------------------------------------------------
cptr
Definition
cptr.hpp:55
cptr::get
T * get()
Definition
cptr.hpp:88
dbe::dbaccessor::t_lock
dbholder::t_lock t_lock
Definition
dbaccessor.hpp:62
dbe::dbaccessor::dbptr
static cptr< dunedaq::conffwk::Configuration > dbptr()
Definition
dbaccessor.cpp:23
dbe::dbaccessor::is_loaded
static bool is_loaded()
Definition
dbaccessor.cpp:31
dbe::dbholder::database_concurrent_ptr
static cptr< dunedaq::conffwk::Configuration > database_concurrent_ptr
Definition
dbaccessor.hpp:52
dbe::dbholder::t_mutex
dbe::types::common::type_mutex t_mutex
Definition
dbaccessor.hpp:48
dbe::dbholder::database
static dunedaq::conffwk::Configuration * database
Definition
dbaccessor.hpp:51
dbe::dbholder::database_lock
static dbe::types::common::type_mutex database_lock
Definition
dbaccessor.hpp:53
dunedaq::conffwk::Configuration
Defines base class for cache of template objects.
Definition
Configuration.hpp:228
dbaccessor.hpp
dunedaq::conffwk
Definition
Change.hpp:23
Generated on
for DUNE-DAQ by
1.17.0