LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 &tag="")
 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 IOVTimeStamp & Begin () const
 Get Timestamp information. More...
 
const IOVTimeStamp & End () const
 

Protected Attributes

std::unique_ptr< DBFolderfFolder
 

Detailed Description

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

Definition at line 30 of file DatabaseRetrievalAlg.h.

Constructor & Destructor Documentation

lariov::DatabaseRetrievalAlg::DatabaseRetrievalAlg ( const std::string &  foldername,
const std::string &  url,
const std::string &  tag = "" 
)
inline

Constructors.

Definition at line 35 of file DatabaseRetrievalAlg.h.

35  :
36  fFolder(new DBFolder(foldername, url, tag)) {}
std::unique_ptr< DBFolder > fFolder
lariov::DatabaseRetrievalAlg::DatabaseRetrievalAlg ( fhicl::ParameterSet const &  p)
inline

Definition at line 38 of file DatabaseRetrievalAlg.h.

References Reconfigure().

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

Default destructor.

Definition at line 43 of file DatabaseRetrievalAlg.h.

References Reconfigure().

43 {}

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 55 of file DatabaseRetrievalAlg.h.

References fFolder.

55 {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 9 of file DatabaseRetrievalAlg.cxx.

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

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

9  {
10 
11  std::string foldername = p.get<std::string>("DBFolderName");
12  std::string url = p.get<std::string>("DBUrl");
13  std::string tag = p.get<std::string>("DBTag", "");
14  fFolder.reset(new DBFolder(foldername, url, tag));
15  }
std::unique_ptr< DBFolder > fFolder
const std::string& lariov::DatabaseRetrievalAlg::Tag ( ) const
inline

Definition at line 56 of file DatabaseRetrievalAlg.h.

References fFolder.

56 {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 49 of file DatabaseRetrievalAlg.h.

References fFolder.

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

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

Get connection information.

Definition at line 54 of file DatabaseRetrievalAlg.h.

References fFolder.

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

Member Data Documentation


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