List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
rdet::RBeaconSQLManager Class Referenceabstract

Manager for RD description of Station-Channels in SQL DB. More...

#include <RBeaconSQLManager.h>

Inheritance diagram for rdet::RBeaconSQLManager:
Inheritance graph
[legend]

Classes

struct  beaconRefPhaseOfStation
 

Public Types

typedef std::map< std::string,
std::string > 
IndexMap
 
enum  Status { eFound, eNotFound }
 Specifies success or (eventually) various possible failure modes. More...
 

Public Member Functions

template<typename T >
VSQLManager::Status FetchColumn (std::vector< T > &data) const
 
template<typename T >
VSQLManager::Status FetchRow (T &data, const bool freeResult) const
 
template<typename T >
VSQLManager::Status FetchRow (std::vector< T > &data, const bool freeResult) const
 
template<typename TH , typename TT >
VSQLManager::Status FetchRowMany (boost::tuples::cons< TH, TT > &tuple, const bool freeResult) const
 
template<typename TH , typename TT >
VSQLManager::Status FetchRowTuple (boost::tuples::cons< TH, TT > &tuple, const int idx) const
 
virtual Status GetData (double &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
 
virtual Status GetData (int &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
 
virtual Status GetData (bool &, const std::string &componentProperty, const std::string &componentName, const VManager::IndexMap &) const
 
virtual Status GetData (std::string &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
 
virtual Status GetData (std::vector< double > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
 
virtual Status GetData (std::vector< int > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
 
virtual Status GetData (std::vector< std::string > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
 
virtual Status GetData (std::vector< bool > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
 
virtual Status GetData (std::list< double > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
 
virtual Status GetData (std::list< int > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
 
virtual Status GetData (std::list< std::string > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
 
virtual Status GetData (std::list< std::pair< int, int >> &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
 
virtual Status GetData (utl::TabulatedFunction &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
 
virtual Status GetData (std::map< int, utl::TabulatedFunction > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
 
virtual Status GetData (utl::TabulatedFunctionComplexLgAmpPhase &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
 
virtual Status GetData (std::map< std::string, double > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
 
virtual Status GetData (std::vector< std::vector< int >> &, const std::string &componentProperty, const std::string &componentName, const VManager::IndexMap &) const
 
virtual Status GetData (std::map< unsigned int, int > &, const std::string &componentProperty, const std::string &componentName, const VManager::IndexMap &) const
 
Status GetData (Handle &returnData, const std::string &component, const std::string &property, const IndexMap &index=IndexMap()) const
 new data accessor More...
 
const std::string & GetName () const
 
void Init (const std::string &configLink)
 Manager Initialization. configLink is the CentralConfig hook for the configuration file. More...
 
bool IsInitialized () const
 
void SetName (const std::string &name)
 
void SetReportingErrors (const bool flag=true)
 Generic data accessors. More...
 
virtual ~RBeaconSQLManager ()
 

Static Public Member Functions

template<typename T >
static T FindComponent (const std::string &componentName, const IndexMap &componentIndex)
 
template<typename T , typename U >
static T FindComponent (const std::string &componentName, const U &defaultValue, const IndexMap &componentIndex)
 
static std::string QueryInfoMessage (const Handle &returnData, const std::string &component)
 
static std::string QueryInfoMessage (const Handle &returnData, const std::string &component, const std::string &property, const IndexMap &index)
 
static std::string QueryInfoMessage (const std::string &componentProperty, const std::string &componentName)
 
static std::string QueryInfoMessage (const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex)
 
static void SetGlobalLogQueries (const int q)
 

Protected Member Functions

template<typename T >
void AddAvailability (const std::string &component)
 
void Close ()
 
void Close ()
 
void Connect () const
 
template<typename T >
Status FetchColumn (std::vector< T > &data) const
 Get the first item from many rows of an SQLite query result. More...
 
template<typename T >
Status FetchNextRow (T &result) const
 Fetch first item (may be a tuple) from current row. More...
 
template<typename T >
Status FetchNextRow (T &result) const
 Fetch first item (may be a tuple) from current row. More...
 
template<typename TH , typename TT >
Status FetchNextRowMany (boost::tuples::cons< TH, TT > &result) const
 workaround More...
 
template<typename TH , typename TT >
Status FetchNextRowMany (boost::tuples::cons< TH, TT > &result) const
 workaround More...
 
template<typename T >
Status FetchRow (T &data, const bool freeResult=true) const
 Get data from the first element of the first row of an SQLite result. More...
 
template<typename T >
Status FetchRow (std::vector< T > &data, const bool freeResult=true) const
 Get a data vector from the first (full) row of an SQLite query result. More...
 
MYSQL_ROW FetchRow () const
 
template<typename TH , typename TT >
Status FetchRowMany (boost::tuples::cons< TH, TT > &tuple, const bool freeResult=true) const
 Get a tuple of values from the first row of an SQLite query result. More...
 
void FindConfig (const std::string &configLink)
 Locate the configuration file in CentralConfig and make a Reader for it. More...
 
 FreeResult ()
 
 FreeResult ()
 
int FreeResult () const
 Erase the query result and release all resources. More...
 
 FreeResult ()
 
 FreeResult ()
 
template<typename T >
Status GetDBData (T &returnData, const std::string &tableName, const std::string &columnName, const IndexMap &componentIndex) const
 
template<typename T >
Status GetDBData (std::vector< T > &returnData, const std::string &tableName, const std::string &columnName, const IndexMap &componentIndex) const
 
template<typename T >
Status GetDBData (T &returnData, const std::string &tableName, const std::string &columnName, const IndexMap &componentIndex) const
 
template<typename T >
Status GetDBData (std::vector< T > &returnData, const std::string &tableName, const std::string &columnName, const IndexMap &componentIndex) const
 
virtual Status GetDBResFundamental (const std::string &, const std::string &, const IndexMap &) const
 overload this in all derived managers that need it More...
 
virtual Status GetDBResFundamental (const std::string &, const std::string &, const IndexMap &) const
 overload this in all derived managers that need it More...
 
virtual Status GetDBResVector (const std::string &, const std::string &, const IndexMap &) const
 overload this in all derived managers that need it More...
 
virtual Status GetDBResVector (const std::string &, const std::string &, const IndexMap &) const
 overload this in all derived managers that need it More...
 
 if (row &&row[0])
 
 if (row)
 
 if (row)
 
bool IsReportingErrors () const
 
std::string NotImplementedMessage (const std::string &type, const std::string &componentProperty, const std::string &componentName) const
 
unsigned int NumFields () const
 
unsigned int NumFields () const
 Number of fields (columns) in the current query result. More...
 
size_t NumRows () const
 Total number of rows in the current query result. More...
 
Status Query (const std::ostringstream &os, const std::string &what="") const
 query MySQL More...
 
Status Query (const std::string &query, const std::string &what="") const
 
Status Query (const std::ostringstream &os, const std::ostringstream &what) const
 
Status Query (const std::ostringstream &os, const std::string &what="") const
 query MySQL More...
 
Status Query (const std::string &query, const std::string &what="") const
 
Status Query (const std::ostringstream &os, const std::ostringstream &what) const
 
 while ((row=FetchRow())) if(row[0])
 

Static Protected Member Functions

static std::string MergeIndexMap (const IndexMap &componentIndex)
 

Protected Attributes

template<typename T >
Status const
 Fetch first item from first row and optionally free query result. More...
 
void const
 Fetch tuple from first row and optionally free query result. More...
 
return eFound
 
 else
 
return eNotFound
 
std::set< std::string > fAvailableComponents
 
utl::Branch fBranch
 
std::string fDatabaseSoftwareVersion
 
bool fIsInitialized = false
 
bool fReportingErrors = false
 

Private Member Functions

std::vector< double > GetBeaconFrequencies () const
 
double GetBeaconRefPhase (const int &stationId, const double &beaconFreq) const
 
Status InternalGetDataDouble (double &returnData, const std::string &, const std::string &componentName, const IndexMap &componentIndex) const
 
Status InternalGetDataVecDouble (std::vector< double > &returnData, const std::string &, const std::string &componentName, const IndexMap &) const
 

Private Attributes

VMANAGER_GETDATA_HANDLE_DENIED
std::vector< double > 
fBeaconFreqs
 
utl::TimeStamp fBeaconFreqsBufferedStartDate
 
utl::TimeStamp fBeaconFreqsBufferedStopDate
 
std::map< int, std::map
< double,
beaconRefPhaseOfStation > > 
fBufferBeaconRefPhases
 

Detailed Description

Manager for RD description of Station-Channels in SQL DB.

This Manager retrieves the detector-configuration for the beacon frequencies as given in the DB. General tamplete of InternalGetData is not used - here it is easier to only define the specific versions for double and vector<double>

Author
J. Rautenberg
Date
30 November 2012

Definition at line 41 of file RBeaconSQLManager.h.

Member Typedef Documentation

typedef std::map<std::string, std::string> det::VManager::IndexMap
inherited

Definition at line 133 of file VManager.h.

Member Enumeration Documentation

enum det::VManager::Status
inherited

Specifies success or (eventually) various possible failure modes.

Various failure modes to be specified (for example, failure to connect to db, faiure to find db record, failure to find table name, etc

Enumerator
eFound 
eNotFound 

Definition at line 127 of file VManager.h.

Constructor & Destructor Documentation

virtual rdet::RBeaconSQLManager::~RBeaconSQLManager ( )
inlinevirtual

Definition at line 50 of file RBeaconSQLManager.h.

Member Function Documentation

template<typename T >
void det::VManager::AddAvailability ( const std::string &  component)
inlineprotectedinherited

Definition at line 347 of file VManager.h.

void det::VSQLManager::Close ( )
protectedinherited
void VSQLManager::Close ( )
protectedinherited

Definition at line 17 of file VSQLManager_MySQL.cc.

References INFO, and galactic::second.

Referenced by det::VSQLManager::~VSQLManager().

void det::VSQLManager::Connect ( ) const
protectedinherited
template<typename T >
Status det::VSQLManager::FetchColumn ( std::vector< T > &  data) const
protectedinherited

Get the first item from many rows of an SQLite query result.

Referenced by det::VSQLManager::GetDBData().

template<typename T >
VSQLManager::Status det::VSQLManager::FetchColumn ( std::vector< T > &  data) const
inherited

Definition at line 110 of file VSQLManager_impl_SQLite.h.

References ERROR.

template<typename T >
Status det::VSQLManager::FetchNextRow ( T &  result) const
inlineprotectedinherited

Fetch first item (may be a tuple) from current row.

Definition at line 82 of file VSQLManager_SQLite.h.

References det::VSQLManager::FetchRow().

template<typename T >
Status det::VSQLManager::FetchNextRow ( T &  result) const
inlineprotectedinherited

Fetch first item (may be a tuple) from current row.

Definition at line 160 of file VSQLManager_MySQL.h.

References det::VSQLManager::FetchRow().

template<typename TH , typename TT >
Status det::VSQLManager::FetchNextRowMany ( boost::tuples::cons< TH, TT > &  result) const
inlineprotectedinherited

workaround

Definition at line 87 of file VSQLManager_SQLite.h.

References det::VSQLManager::FetchRowMany().

template<typename TH , typename TT >
Status det::VSQLManager::FetchNextRowMany ( boost::tuples::cons< TH, TT > &  result) const
inlineprotectedinherited

workaround

Definition at line 165 of file VSQLManager_MySQL.h.

References det::VSQLManager::FetchRowMany().

template<typename T >
VSQLManager::Status det::VSQLManager::FetchRow ( T &  data,
const bool  freeResult 
) const
inherited

Definition at line 10 of file VSQLManager_impl_SQLite.h.

References ERROR.

template<typename T >
VSQLManager::Status det::VSQLManager::FetchRow ( std::vector< T > &  data,
const bool  freeResult 
) const
inherited

Definition at line 40 of file VSQLManager_impl_SQLite.h.

References ERROR.

template<typename T >
Status det::VSQLManager::FetchRow ( T &  data,
const bool  freeResult = true 
) const
protectedinherited

Get data from the first element of the first row of an SQLite result.

template<typename T >
Status det::VSQLManager::FetchRow ( std::vector< T > &  data,
const bool  freeResult = true 
) const
protectedinherited

Get a data vector from the first (full) row of an SQLite query result.

int VSQLManager::FetchRow ( ) const
inlineprotectedinherited
template<typename TH , typename TT >
Status det::VSQLManager::FetchRowMany ( boost::tuples::cons< TH, TT > &  tuple,
const bool  freeResult = true 
) const
protectedinherited

Get a tuple of values from the first row of an SQLite query result.

Referenced by det::VSQLManager::FetchNextRowMany().

template<typename TH , typename TT >
VSQLManager::Status det::VSQLManager::FetchRowMany ( boost::tuples::cons< TH, TT > &  tuple,
const bool  freeResult 
) const
inherited

Definition at line 94 of file VSQLManager_impl_SQLite.h.

template<typename TH , typename TT >
VSQLManager::Status det::VSQLManager::FetchRowTuple ( boost::tuples::cons< TH, TT > &  tuple,
const int  idx 
) const
inherited

Definition at line 74 of file VSQLManager_impl_SQLite.h.

References ERROR.

template<typename T >
static T det::VManager::FindComponent ( const std::string &  componentName,
const IndexMap componentIndex 
)
inlinestaticinherited

Definition at line 307 of file VManager.h.

References ERROR.

template<typename T , typename U >
static T det::VManager::FindComponent ( const std::string &  componentName,
const U defaultValue,
const IndexMap componentIndex 
)
inlinestaticinherited

Definition at line 322 of file VManager.h.

void det::VManager::FindConfig ( const std::string &  configLink)
protectedinherited

Locate the configuration file in CentralConfig and make a Reader for it.

Definition at line 25 of file VManager.cc.

References ERROR, and WARNING.

det::VSQLManager::FreeResult ( )
protectedinherited

Referenced by det::VSQLManager::if().

det::VSQLManager::FreeResult ( )
protectedinherited
int VSQLManager::FreeResult ( ) const
protectedinherited

Erase the query result and release all resources.

Definition at line 38 of file VSQLManager_SQLite.cc.

det::VSQLManager::FreeResult ( )
protectedinherited
det::VSQLManager::FreeResult ( )
protectedinherited
std::vector< double > rdet::RBeaconSQLManager::GetBeaconFrequencies ( ) const
private
double rdet::RBeaconSQLManager::GetBeaconRefPhase ( const int &  stationId,
const double &  beaconFreq 
) const
private
virtual Status det::VManager::GetData ( double &  returnData,
const std::string &  componentProperty,
const std::string &  componentName,
const IndexMap componentIndex 
) const
pure virtualinherited

Implemented in det::ManagerRegister, fdet::FdUpTimeFileManager, fdet::FdUpTimeSQLManager, and fwk::TestSQLManager.

Referenced by atm::AerosolDB::AerosolDB(), atm::MolecularZone::CacheLayers(), fdet::Telescope::CachePixelCloudData(), atm::VZone::CacheSlices(), atm::AerosolDB::CacheZones(), atm::LidarDB::CacheZones(), atm::MolecularDB::CacheZones(), cdet::CDetector::FetchStationGroups(), atm::GOESDB::GetAllCloudProbabilities(), rdet::AntennaType::GetAntennaData(), fdet::Camera::GetCameraChannelData(), fdet::Camera::GetCameraData(), fdet::Camera::GetCameraDataDiaphragm(), fdet::Camera::GetCameraPixelData(), fdet::Channel::GetChannelData(), rdet::Channel::GetChannelData(), atm::LidarZone::GetCloudData(), fdet::Corrector::GetCorrectorData(), rdet::RDetector::GetDetectorData(), fdet::Diaphragm::GetDiaphragmData(), fdet::Eye::GetEyeData(), fdet::FDetector::GetFDetectorData(), fdet::Filter::GetFilterData(), fdet::FDetector::GetFullEyeList(), rdet::RDetector::GetFullStationList(), cdet::CDetector::GetFullStationList(), atm::VZoneSlice::GetLambdaSliceData(), atm::MolecularLayer::GetLayerData(), fdet::Mirror::GetMirrorData(), fdet::MirrorSegment::GetMirrorSegmentData(), fdet::Pixel::GetPixelData(), fdet::Pixel::GetPixelDataDiaphragm(), cdet::Station::GetRPCData(), sdet::Scintillator::GetScintillatorData(), atm::VZoneSlice::GetSliceData(), rdet::RSimulationStationListManager::GetSourceType(), cdet::CDetector::GetStation(), rdet::Station::GetStationData(), cdet::Station::GetStationData(), fdet::Telescope::GetTelescopeData(), atm::GOESDB::HasData(), atm::LidarDB::LidarDB(), atm::LidarZone::LidarZone(), atm::MolecularDB::MolecularDB(), atm::MolecularZone::MolecularZone(), rdet::Station::SetListOfChannelIds(), and det::ComponentGroup< P, C, Creator, ManagerProvider >::Update().

virtual Status det::VManager::GetData ( int &  returnData,
const std::string &  componentProperty,
const std::string &  componentName,
const IndexMap componentIndex 
) const
pure virtualinherited
virtual Status det::VManager::GetData ( bool &  ,
const std::string &  componentProperty,
const std::string &  componentName,
const VManager::IndexMap  
) const
inlinevirtualinherited

Definition at line 241 of file VManager.h.

virtual Status det::VManager::GetData ( std::string &  returnData,
const std::string &  componentProperty,
const std::string &  componentName,
const IndexMap componentIndex 
) const
pure virtualinherited
virtual Status det::VManager::GetData ( std::vector< double > &  returnData,
const std::string &  componentProperty,
const std::string &  componentName,
const IndexMap componentIndex 
) const
pure virtualinherited
virtual Status det::VManager::GetData ( std::vector< int > &  returnData,
const std::string &  componentProperty,
const std::string &  componentName,
const IndexMap componentIndex 
) const
pure virtualinherited
virtual Status det::VManager::GetData ( std::vector< std::string > &  returnData,
const std::string &  componentProperty,
const std::string &  componentName,
const IndexMap componentIndex 
) const
pure virtualinherited
virtual Status det::VManager::GetData ( std::vector< bool > &  returnData,
const std::string &  componentProperty,
const std::string &  componentName,
const IndexMap componentIndex 
) const
pure virtualinherited
virtual Status det::VManager::GetData ( std::list< double > &  returnData,
const std::string &  componentProperty,
const std::string &  componentName,
const IndexMap componentIndex 
) const
pure virtualinherited
virtual Status det::VManager::GetData ( std::list< int > &  returnData,
const std::string &  componentProperty,
const std::string &  componentName,
const IndexMap componentIndex 
) const
pure virtualinherited
virtual Status det::VManager::GetData ( std::list< std::string > &  returnData,
const std::string &  componentProperty,
const std::string &  componentName,
const IndexMap componentIndex 
) const
pure virtualinherited
virtual Status det::VManager::GetData ( std::list< std::pair< int, int >> &  returnData,
const std::string &  componentProperty,
const std::string &  componentName,
const IndexMap componentIndex 
) const
pure virtualinherited
virtual Status det::VManager::GetData ( utl::TabulatedFunction returnData,
const std::string &  componentProperty,
const std::string &  componentName,
const IndexMap componentIndex 
) const
pure virtualinherited
virtual Status det::VManager::GetData ( std::map< int, utl::TabulatedFunction > &  returnData,
const std::string &  componentProperty,
const std::string &  componentName,
const IndexMap componentIndex 
) const
pure virtualinherited
virtual Status det::VManager::GetData ( utl::TabulatedFunctionComplexLgAmpPhase returnData,
const std::string &  componentProperty,
const std::string &  componentName,
const IndexMap componentIndex 
) const
pure virtualinherited
virtual Status det::VManager::GetData ( std::map< std::string, double > &  returnData,
const std::string &  componentProperty,
const std::string &  componentName,
const IndexMap componentIndex 
) const
pure virtualinherited
virtual Status det::VManager::GetData ( std::vector< std::vector< int >> &  ,
const std::string &  componentProperty,
const std::string &  componentName,
const VManager::IndexMap  
) const
inlinevirtualinherited

Definition at line 255 of file VManager.h.

virtual Status det::VManager::GetData ( std::map< unsigned int, int > &  ,
const std::string &  componentProperty,
const std::string &  componentName,
const VManager::IndexMap  
) const
inlinevirtualinherited

Definition at line 256 of file VManager.h.

Status det::VManager::GetData ( Handle returnData,
const std::string &  component,
const std::string &  property,
const IndexMap index = IndexMap() 
) const
inlineinherited

new data accessor

Any property of the detector is supposed to be accessible through this interface. Interface specifies the name of the property and the component to which it belongs, together with a map of (index name, index value) identifying the specific instance of the component. For example, to request the quantum efficiency of PMT 3 in station 57, one would have

  • component = "PMT"
  • property = "quantumEfficiency"
  • index["stationId"] = "57"
  • index["PMT"] = "3"

Definition at line 275 of file VManager.h.

References det::VManager::CheckedGetData().

template<typename T >
Status det::VSQLManager::GetDBData ( T &  returnData,
const std::string &  tableName,
const std::string &  columnName,
const IndexMap componentIndex 
) const
inlineprotectedinherited
template<typename T >
Status det::VSQLManager::GetDBData ( std::vector< T > &  returnData,
const std::string &  tableName,
const std::string &  columnName,
const IndexMap componentIndex 
) const
inlineprotectedinherited
template<typename T >
Status det::VSQLManager::GetDBData ( T &  returnData,
const std::string &  tableName,
const std::string &  columnName,
const IndexMap componentIndex 
) const
inlineprotectedinherited
template<typename T >
Status det::VSQLManager::GetDBData ( std::vector< T > &  returnData,
const std::string &  tableName,
const std::string &  columnName,
const IndexMap componentIndex 
) const
inlineprotectedinherited
virtual Status det::VSQLManager::GetDBResFundamental ( const std::string &  ,
const std::string &  ,
const IndexMap  
) const
inlineprotectedvirtualinherited

overload this in all derived managers that need it

Reimplemented in atm::AMolecularSQLManager, atm::AOverallQualitySQLManager, atm::ACloudSQLManager, atm::ALidarSQLManager, and atm::AGOESSQLManager.

Definition at line 94 of file VSQLManager_SQLite.h.

References det::VSQLManager::eNotFound, and det::VSQLManager::ERROR().

virtual Status det::VSQLManager::GetDBResFundamental ( const std::string &  ,
const std::string &  ,
const IndexMap  
) const
inlineprotectedvirtualinherited

overload this in all derived managers that need it

Reimplemented in atm::AMolecularSQLManager, atm::AOverallQualitySQLManager, atm::ACloudSQLManager, atm::ALidarSQLManager, and atm::AGOESSQLManager.

Definition at line 177 of file VSQLManager_MySQL.h.

References det::VSQLManager::eNotFound, and det::VSQLManager::ERROR().

Referenced by det::VSQLManager::GetDBData().

virtual Status det::VSQLManager::GetDBResVector ( const std::string &  ,
const std::string &  ,
const IndexMap  
) const
inlineprotectedvirtualinherited

overload this in all derived managers that need it

Reimplemented in atm::AMolecularSQLManager, and atm::ALidarSQLManager.

Definition at line 113 of file VSQLManager_SQLite.h.

References det::VSQLManager::eNotFound, and det::VSQLManager::ERROR().

virtual Status det::VSQLManager::GetDBResVector ( const std::string &  ,
const std::string &  ,
const IndexMap  
) const
inlineprotectedvirtualinherited

overload this in all derived managers that need it

Reimplemented in atm::AMolecularSQLManager, and atm::ALidarSQLManager.

Definition at line 195 of file VSQLManager_MySQL.h.

References det::VSQLManager::eNotFound, and det::VSQLManager::ERROR().

Referenced by det::VSQLManager::GetDBData().

const std::string& det::VManager::GetName ( ) const
inlineinherited
det::VSQLManager::if ( row &&  row[0])
inlineprotectedinherited

Definition at line 76 of file VSQLManager_MySQL.h.

References det::VSQLManager::eFound, and det::VSQLManager::FreeResult().

det::VSQLManager::if ( row  )
inlineprotectedinherited
det::VSQLManager::if ( row  )
inlineprotectedinherited
void rdet::RBeaconSQLManager::Init ( const std::string &  configLink)
virtual

Manager Initialization. configLink is the CentralConfig hook for the configuration file.

This method instructs the manager to initialize itself. In the case of a manager which fetches data from an XML file, configuration involves getting the link to the appropriate configuration file from the CentralConfig and parsing the file to create a DOM or some other representation of the data in memory. For a manager which uses a MySQL database, configuration involves getting the link to the appropriate configuration file from the CentralConfig, then using the instructions in that file to establish a connection to the relevant database.

Note that one might initially think it makes more sense to just initialize managers automatically in their constructors so that developers don't need to remember to explicitly invoke the Init() method. (In fact it worked like this in an earlier version.) The rationale for not having automatic configuration via the constructors is that the configuration can now be delayed until the time that the user specifically requests a particular manager, rather than doing it at the time that the Detector object constructs the Managers. For example, when the user declares his set of desired managers in the ManagerRegister configuration, only those particular Managers will get initialized (though all available Managers will be constructed!). Consider someone who wants to test only the Fluorescence portion of the detector. By requiring explicit invocation of Init() one avoids providing hooks to all the SD related configuration files and databases which aren't even going to be used. Though the SD Managers will be constructed, no attempt will be made to Initialize them until the user specifically requests them by, for example, specifying them in the configuration file for the appropriate ManagerRegister.

Reimplemented from det::VSQLManager.

Definition at line 25 of file RBeaconSQLManager.cc.

References fwk::CoordinateSystemRegistry::Init().

VManager::Status rdet::RBeaconSQLManager::InternalGetDataDouble ( double &  returnData,
const std::string &  ,
const std::string &  componentName,
const IndexMap componentIndex 
) const
private

Definition at line 61 of file RBeaconSQLManager.cc.

VManager::Status rdet::RBeaconSQLManager::InternalGetDataVecDouble ( std::vector< double > &  returnData,
const std::string &  ,
const std::string &  componentName,
const IndexMap  
) const
private

Definition at line 31 of file RBeaconSQLManager.cc.

bool det::VManager::IsInitialized ( ) const
inlineinherited

Definition at line 214 of file VManager.h.

References det::VManager::fIsInitialized.

Referenced by det::ManagerRegister::InterpretXML().

bool det::VManager::IsReportingErrors ( ) const
inlineprotectedinherited
string VSQLManager::MergeIndexMap ( const IndexMap componentIndex)
staticprotectedinherited
string det::VManager::NotImplementedMessage ( const std::string &  type,
const std::string &  componentProperty,
const std::string &  componentName 
) const
protectedinherited

Definition at line 47 of file VManager.cc.

unsigned int det::VSQLManager::NumFields ( ) const
inlineprotectedinherited

Definition at line 90 of file VSQLManager_SQLite.h.

References det::VSQLManager::fResult.

unsigned int det::VSQLManager::NumFields ( ) const
inlineprotectedinherited

Number of fields (columns) in the current query result.

Definition at line 169 of file VSQLManager_MySQL.h.

Referenced by det::VSQLManager::if().

size_t det::VSQLManager::NumRows ( ) const
inlineprotectedinherited

Total number of rows in the current query result.

Definition at line 173 of file VSQLManager_MySQL.h.

Status det::VSQLManager::Query ( const std::ostringstream &  os,
const std::string &  what = "" 
) const
inlineprotectedinherited

query MySQL

Definition at line 56 of file VSQLManager_SQLite.h.

References det::VSQLManager::Query().

Status det::VSQLManager::Query ( const std::string &  query,
const std::string &  what = "" 
) const
protectedinherited
Status det::VSQLManager::Query ( const std::ostringstream &  os,
const std::ostringstream &  what 
) const
inlineprotectedinherited

Definition at line 61 of file VSQLManager_SQLite.h.

References det::VSQLManager::Query().

Status det::VSQLManager::Query ( const std::ostringstream &  os,
const std::string &  what = "" 
) const
inlineprotectedinherited
VManager::Status VSQLManager::Query ( const std::string &  query,
const std::string &  what = "" 
) const
protectedinherited

Definition at line 159 of file VSQLManager_MySQL.cc.

References ERROR, galactic::second, and WARNING.

Status det::VSQLManager::Query ( const std::ostringstream &  os,
const std::ostringstream &  what 
) const
inlineprotectedinherited

Definition at line 66 of file VSQLManager_MySQL.h.

References det::VSQLManager::Query().

string det::VManager::QueryInfoMessage ( const Handle returnData,
const std::string &  component 
)
staticinherited
string det::VManager::QueryInfoMessage ( const Handle returnData,
const std::string &  component,
const std::string &  property,
const IndexMap index 
)
staticinherited

Definition at line 119 of file VManager.cc.

static std::string det::VManager::QueryInfoMessage ( const std::string &  componentProperty,
const std::string &  componentName 
)
inlinestaticinherited

Definition at line 294 of file VManager.h.

string det::VManager::QueryInfoMessage ( const std::string &  componentProperty,
const std::string &  componentName,
const IndexMap componentIndex 
)
staticinherited

Definition at line 58 of file VManager.cc.

static void det::VSQLManager::SetGlobalLogQueries ( const int  q)
inlinestaticinherited

Definition at line 51 of file VSQLManager_MySQL.h.

References det::VSQLManager::fgGlobalLogQueries.

Referenced by main().

void det::VManager::SetName ( const std::string &  name)
inlineinherited

Definition at line 332 of file VManager.h.

References det::VManager::fName.

Referenced by det::ManagerRegister::InterpretXML().

void det::VManager::SetReportingErrors ( const bool  flag = true)
inlineinherited

Generic data accessors.

Any property of the detector is supposed to be accessible through this interface. Interface specifies the name of the property and the component to which it belongs, together with a map of (index name, index value) identifying the specific instance of the component. For example, to request the quantum efficiency of PMT 3 in station 57, one would have

  • componentProperty = "quantumEfficiency"
  • componentName = "PMT"
  • componentIndex["stationId"] = "57"
  • componentIndex["PMT"] = "3"

Definition at line 231 of file VManager.h.

References det::VManager::fReportingErrors.

det::VSQLManager::while ( (row=FetchRow())  )
inlineprotectedinherited

Definition at line 144 of file VSQLManager_MySQL.h.

Member Data Documentation

template<typename T >
Status det::VSQLManager::const
protectedinherited
Initial value:
{
const MYSQL_ROW row = FetchRow()

Fetch first item from first row and optionally free query result.

Fetch first item from many rows and free query result.

Fetch tuple from first row and optionally free query result.

Fetch whole row and optionally free query result.

Definition at line 74 of file VSQLManager_MySQL.h.

Status det::VSQLManager::const
protectedinherited
Initial value:
{
if (fMySQLResult) {
mysql_free_result(fMySQLResult);
fMySQLResult = nullptr;
}
}
static std::string MergeIndexMap(const IndexMap& componentIndex)

Fetch tuple from first row and optionally free query result.

Definition at line 219 of file VSQLManager_MySQL.h.

return det::VSQLManager::eFound
protectedinherited
det::VSQLManager::else
protectedinherited
Initial value:

Definition at line 151 of file VSQLManager_MySQL.h.

return det::VSQLManager::eNotFound
protectedinherited
std::set<std::string> det::VManager::fAvailableComponents
protectedinherited
VMANAGER_GETDATA_HANDLE_DENIED std::vector<double> rdet::RBeaconSQLManager::fBeaconFreqs
mutableprivate

Definition at line 92 of file RBeaconSQLManager.h.

utl::TimeStamp rdet::RBeaconSQLManager::fBeaconFreqsBufferedStartDate
mutableprivate

Definition at line 93 of file RBeaconSQLManager.h.

utl::TimeStamp rdet::RBeaconSQLManager::fBeaconFreqsBufferedStopDate
mutableprivate

Definition at line 94 of file RBeaconSQLManager.h.

utl::Branch det::VManager::fBranch
protectedinherited
std::map<int, std::map <double, beaconRefPhaseOfStation> > rdet::RBeaconSQLManager::fBufferBeaconRefPhases
mutableprivate

Definition at line 95 of file RBeaconSQLManager.h.

std::string det::VSQLManager::fDatabaseSoftwareVersion
mutableprotectedinherited
bool det::VManager::fIsInitialized = false
mutableprotectedinherited

Definition at line 354 of file VManager.h.

Referenced by det::VManager::IsInitialized().

bool det::VManager::fReportingErrors = false
protectedinherited

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

, generated on Tue Sep 26 2023.