LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lariov::DatabaseRetrievalAlg Class Reference

#include "DatabaseRetrievalAlg.h"

Inheritance diagram for lariov::DatabaseRetrievalAlg:
lariov::DetPedestalRetrievalAlg lariov::SIOVChannelStatusProvider lariov::SIOVElectronicsCalibProvider lariov::SIOVPmtGainProvider

Public Member Functions

 DatabaseRetrievalAlg (const std::string &foldername, const std::string &url, const std::string &url2="", const std::string &tag="", bool usesqlite=false, bool testmode=false)
 Constructors. More...
 
 DatabaseRetrievalAlg (fhicl::ParameterSet const &p)
 
virtual ~DatabaseRetrievalAlg ()
 Default destructor. More...
 
virtual void Reconfigure (fhicl::ParameterSet const &p)
 Configure using fhicl::ParameterSet. More...
 
bool UpdateFolder (DBTimeStamp_t ts)
 Return true if fFolder is successfully updated. More...
 
const std::string & URL () const
 Get connection information. More...
 
const std::string & FolderName () const
 
const std::string & Tag () const
 
const IOVTimeStampBegin () const
 Get Timestamp information. More...
 
const IOVTimeStampEnd () const
 

Protected Attributes

std::unique_ptr< DBFolderfFolder
 

Detailed Description

User defined class DatabaseRetrievalAlg ... these comments are used to generate doxygen documentation!

Definition at line 33 of file DatabaseRetrievalAlg.h.

Constructor & Destructor Documentation

lariov::DatabaseRetrievalAlg::DatabaseRetrievalAlg ( const std::string &  foldername,
const std::string &  url,
const std::string &  url2 = "",
const std::string &  tag = "",
bool  usesqlite = false,
bool  testmode = false 
)
inline

Constructors.

Definition at line 37 of file DatabaseRetrievalAlg.h.

43  : fFolder(new DBFolder(foldername, url, url2, tag, usesqlite, testmode))
44  {}
std::unique_ptr< DBFolder > fFolder
lariov::DatabaseRetrievalAlg::DatabaseRetrievalAlg ( fhicl::ParameterSet const &  p)
inline

Definition at line 46 of file DatabaseRetrievalAlg.h.

46 { this->Reconfigure(p); }
virtual void Reconfigure(fhicl::ParameterSet const &p)
Configure using fhicl::ParameterSet.
virtual lariov::DatabaseRetrievalAlg::~DatabaseRetrievalAlg ( )
inlinevirtual

Default destructor.

Definition at line 49 of file DatabaseRetrievalAlg.h.

49 {}

Member Function Documentation

const IOVTimeStamp& lariov::DatabaseRetrievalAlg::Begin ( ) const
inline
const IOVTimeStamp& lariov::DatabaseRetrievalAlg::End ( ) const
inline
const std::string& lariov::DatabaseRetrievalAlg::FolderName ( ) const
inline

Definition at line 59 of file DatabaseRetrievalAlg.h.

59 { return fFolder->FolderName(); }
std::unique_ptr< DBFolder > fFolder
void lariov::DatabaseRetrievalAlg::Reconfigure ( fhicl::ParameterSet const &  p)
virtual

Configure using fhicl::ParameterSet.

Reimplemented in lariov::DetPedestalRetrievalAlg, lariov::SIOVElectronicsCalibProvider, and lariov::SIOVPmtGainProvider.

Definition at line 11 of file DatabaseRetrievalAlg.cxx.

References fFolder, and fhicl::ParameterSet::get().

Referenced by lariov::SIOVPmtGainProvider::Reconfigure(), lariov::SIOVElectronicsCalibProvider::Reconfigure(), and lariov::DetPedestalRetrievalAlg::Reconfigure().

12  {
13 
14  std::string foldername = p.get<std::string>("DBFolderName");
15  std::string url = p.get<std::string>("DBUrl");
16  std::string url2 = p.get<std::string>("DBUrl2", "");
17  std::string tag = p.get<std::string>("DBTag", "");
18  bool usesqlite = p.get<bool>("UseSQLite", false);
19  bool testmode = p.get<bool>("TestMode", false);
20  fFolder.reset(new DBFolder(foldername, url, url2, tag, usesqlite, testmode));
21  }
std::unique_ptr< DBFolder > fFolder
const std::string& lariov::DatabaseRetrievalAlg::Tag ( ) const
inline

Definition at line 60 of file DatabaseRetrievalAlg.h.

60 { return fFolder->Tag(); }
std::unique_ptr< DBFolder > fFolder
bool lariov::DatabaseRetrievalAlg::UpdateFolder ( DBTimeStamp_t  ts)
inline

Return true if fFolder is successfully updated.

Definition at line 55 of file DatabaseRetrievalAlg.h.

Referenced by lariov::SIOVPmtGainProvider::DBUpdate(), lariov::SIOVElectronicsCalibProvider::DBUpdate(), lariov::DetPedestalRetrievalAlg::DBUpdate(), and lariov::SIOVChannelStatusProvider::DBUpdate().

55 { return fFolder->UpdateData(ts); }
std::unique_ptr< DBFolder > fFolder
const std::string& lariov::DatabaseRetrievalAlg::URL ( ) const
inline

Get connection information.

Definition at line 58 of file DatabaseRetrievalAlg.h.

58 { return fFolder->URL(); }
std::unique_ptr< DBFolder > fFolder

Member Data Documentation


The documentation for this class was generated from the following files: