LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
DBI.cc
Go to the documentation of this file.
1
6
// nutools includes
7
#include "
nuevdb/IFDatabase/DBIService.h
"
8
9
// Framework includes
10
#include "
messagefacility/MessageLogger/MessageLogger.h
"
11
12
namespace
nutools
13
{
14
namespace
dbi
15
{
16
17
//------------------------------------------------------------
18
DBIService::DBIService
(
const
fhicl::ParameterSet
& pset) :
evdb
::Reconfigurable{pset}
19
{
20
reconfigure
(pset);
21
}
22
23
//-----------------------------------------------------------
24
void
DBIService::reconfigure
(
const
fhicl::ParameterSet
& pset)
25
{
26
fVerbosity
= pset.
get
<
int
>(
"Verbosity"
,0);
27
fTimeQueries
= pset.
get
<
bool
>(
"TimeQueries"
,
false
);
28
fTimeParsing
= pset.
get
<
bool
>(
"TimeParsing"
,
false
);
29
30
fWebServiceURL
= pset.
get
< std::string >(
"WebServiceURL"
);
31
fQueryEngineURL
= pset.
get
< std::string >(
"QueryEngineURL"
);
32
fDBUser
= pset.
get
< std::string >(
"DBUser"
);
33
}
34
35
//-----------------------------------------------------------
36
Table
*
DBIService::CreateTable
(std::string
tableName
,
37
std::string schemaName,
38
int
tableType,
int
dataSource)
39
{
40
if
(tableName.empty())
return
0;
41
42
Table
* t =
new
nutools::dbi::Table
();
43
t->
SetTableName
(tableName);
44
t->
SetDetector
(schemaName);
45
if
(tableType < 0 || tableType >=
nutools::dbi::kNTableType
)
46
t->
SetTableType
(
nutools::dbi::kConditionsTable
);
47
if
(dataSource < 0 || dataSource >=
nutools::dbi::kNDataSources
)
48
t->
SetDataSource
(
nutools::dbi::kOffline
);
49
50
t->
SetVerbosity
(
fVerbosity
);
51
t->
SetTimeQueries
(
fTimeQueries
);
52
t->
SetTimeParsing
(
fTimeParsing
);
53
if
(!
fWebServiceURL
.empty())
54
t->
SetWSURL
(
fWebServiceURL
);
55
if
(!
fQueryEngineURL
.empty())
56
t->
SetQEURL
(
fQueryEngineURL
);
57
58
if
(!
fDBUser
.empty())
59
t->
SetUser
(
fDBUser
);
60
61
return
t;
62
}
63
64
}
65
}
nutools::dbi::Table::SetTimeQueries
void SetTimeQueries(bool f)
Definition:
Table.h:305
nutools::dbi::Table::SetDataSource
void SetDataSource(std::string ds)
Definition:
Table.cpp:537
nutools::dbi::Table::SetWSURL
void SetWSURL(std::string url)
Definition:
Table.h:302
nutools::dbi::kNDataSources
Definition:
Table.h:38
nutools::dbi::kNTableType
Definition:
Table.h:30
nutools::dbi::DBIService::DBIService
DBIService(const fhicl::ParameterSet &pset)
Definition:
DBI.cc:18
nutools
Simple service to provide a RunHistory configured to the right run.
Definition:
Column.cpp:14
evdb
Manage all things related to colors for the event display.
Definition:
Edge3DDrawer_tool.cc:14
MessageLogger.h
nutools::dbi::Table::SetTimeParsing
void SetTimeParsing(bool f)
Definition:
Table.h:306
nutools::dbi::Table::SetQEURL
void SetQEURL(std::string url)
Definition:
Table.h:303
nutools::dbi::DBIService::fTimeQueries
bool fTimeQueries
Definition:
DBIService.h:40
nutools::dbi::DBIService::fDBUser
std::string fDBUser
Definition:
DBIService.h:45
nutools::dbi::DBIService::CreateTable
Table * CreateTable(std::string tableName="", std::string schemaName="", int tableType=nutools::dbi::kConditionsTable, int dataSource=nutools::dbi::kOffline)
Definition:
DBI.cc:36
fhicl::ParameterSet::get
T get(std::string const &key) const
Definition:
ParameterSet.h:314
nutools::dbi::Table::SetDetector
bool SetDetector(std::string det)
Definition:
Table.cpp:500
nutools::dbi::Table::SetTableName
void SetTableName(std::string tname)
Definition:
Table.cpp:524
nutools::dbi::DBIService::fTimeParsing
bool fTimeParsing
Definition:
DBIService.h:41
nutools::dbi::Table
Definition:
Table.h:47
nutools::dbi::DBIService::fQueryEngineURL
std::string fQueryEngineURL
Definition:
DBIService.h:44
DBIService.h
nutools::dbi::DBIService::fWebServiceURL
std::string fWebServiceURL
Definition:
DBIService.h:43
nutools::dbi::Table::SetVerbosity
void SetVerbosity(int i)
Definition:
Table.h:100
nutools::dbi::DBIService::fVerbosity
int fVerbosity
Definition:
DBIService.h:39
nutools::dbi::Table::SetTableType
bool SetTableType(int t)
Definition:
Table.cpp:458
nutools::dbi::DBIService::reconfigure
void reconfigure(const fhicl::ParameterSet &pset)
Definition:
DBI.cc:24
nutools::dbi::Table::SetUser
void SetUser(std::string uname)
Definition:
Table.h:79
nutools::dbi::kConditionsTable
Definition:
Table.h:27
tableName
std::string tableName
Definition:
tagConditionsTableInDB.cc:14
fhicl::ParameterSet
Definition:
ParameterSet.h:36
Table
map< int, array< map< int, double >, 2 >> Table
Definition:
plot.C:18
nutools::dbi::kOffline
Definition:
Table.h:36
nuevdb
v1_09_08
source
nuevdb
IFDatabase
DBI.cc
Generated on Thu May 2 2024 20:59:53 for LArSoft by
1.8.11