Public Member Functions | Protected Attributes | List of all members
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::stringURL () const
 Get connection information. More...
 
const std::stringFolderName () const
 
const std::stringTag () 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 31 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 36 of file DatabaseRetrievalAlg.h.

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

Definition at line 41 of file DatabaseRetrievalAlg.h.

41  {
42  this->Reconfigure(p);
43  }
virtual void Reconfigure(fhicl::ParameterSet const &p)
Configure using fhicl::ParameterSet.
p
Definition: test.py:223
virtual lariov::DatabaseRetrievalAlg::~DatabaseRetrievalAlg ( )
inlinevirtual

Default destructor.

Definition at line 46 of file DatabaseRetrievalAlg.h.

46 {}

Member Function Documentation

const IOVTimeStamp& lariov::DatabaseRetrievalAlg::Begin ( ) const
inline

Get Timestamp information.

Definition at line 62 of file DatabaseRetrievalAlg.h.

62 {return fFolder->CachedStart();}
std::unique_ptr< DBFolder > fFolder
const IOVTimeStamp& lariov::DatabaseRetrievalAlg::End ( void  ) const
inline

Definition at line 63 of file DatabaseRetrievalAlg.h.

63 {return fFolder->CachedEnd();}
std::unique_ptr< DBFolder > fFolder
const std::string& lariov::DatabaseRetrievalAlg::FolderName ( ) const
inline

Definition at line 58 of file DatabaseRetrievalAlg.h.

58 {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.

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

Definition at line 59 of file DatabaseRetrievalAlg.h.

59 {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 52 of file DatabaseRetrievalAlg.h.

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

Get connection information.

Definition at line 57 of file DatabaseRetrievalAlg.h.

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

Member Data Documentation

std::unique_ptr<DBFolder> lariov::DatabaseRetrievalAlg::fFolder
protected

Definition at line 68 of file DatabaseRetrievalAlg.h.


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