EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairParTSQLIo Class Reference

#include <EicRoot/blob/master/parbase/dbIO/FairParTSQLIo.h>

+ Inheritance diagram for FairParTSQLIo:
+ Collaboration diagram for FairParTSQLIo:

Public Member Functions

 FairParTSQLIo ()
 
 FairParTSQLIo (FairDbMultConnector const &cons, int const dbNum=-1)
 
virtual ~FairParTSQLIo ()
 
void disconnect ()
 
void setDetParIo (Text_t *io)
 
bool check ()
 
bool open ()
 
void print ()
 
void SetDefaultDBNum (int const dbNum)
 
int GetDefaultDBNum () const
 
FairDbMultConnector const & GetConnections () const
 
- Public Member Functions inherited from FairParIo
 FairParIo ()
 
virtual ~FairParIo ()
 
virtual FairDetParIogetDetParIo (const Text_t *)
 
virtual void setDetParIo (FairDetParIo *)
 
virtual void removeDetParIo (Text_t *)
 
void setInputNumber (Int_t)
 
virtual void close ()
 
const char * getFilename ()
 
virtual void readVersions (FairRtdbRun *)
 
virtual void cd ()
 
void setAutoWritable (Bool_t f=kTRUE)
 
Bool_t isAutoWritable ()
 

Protected Member Functions

bool activateDetIo ()
 

Private Member Functions

 FairParTSQLIo (FairParTSQLIo const &ot)
 
FairParTSQLIooperator= (FairParTSQLIo const &ot)
 

Private Attributes

int fDefaultDb
 
FairDbMultConnectorfConnections
 

Additional Inherited Members

- Protected Attributes inherited from FairParIo
TList * detParIoList
 
Bool_t autoWritable
 
TString filename
 

Detailed Description

Definition at line 22 of file FairParTSQLIo.h.

View newest version in sPHENIX GitHub at line 22 of file FairParTSQLIo.h

Constructor & Destructor Documentation

FairParTSQLIo::FairParTSQLIo ( )

Default constructor.

FairParTSQLIo::FairParTSQLIo ( FairDbMultConnector const &  cons,
int const  dbNum = -1 
)
Parameters
consFairDbMultConnector which holds a number of initialized db connections.
dbNumThe db which is selected to act as the master for the current operations. Note: A new FairDbConnection object is created (to keep the ownership).
consFairDbMultConnector which holds a number of initialized db connections.
dbNumThe number of the db which is selected to act as the master for the current operations.

Definition at line 31 of file FairParTSQLIo.cxx.

View newest version in sPHENIX GitHub at line 31 of file FairParTSQLIo.cxx

FairParTSQLIo::~FairParTSQLIo ( )
virtual

Destructor

Definition at line 42 of file FairParTSQLIo.cxx.

View newest version in sPHENIX GitHub at line 42 of file FairParTSQLIo.cxx

References disconnect().

+ Here is the call graph for this function:

FairParTSQLIo::FairParTSQLIo ( FairParTSQLIo const &  ot)
private

Member Function Documentation

bool FairParTSQLIo::activateDetIo ( )
protected

Definition at line 104 of file FairParTSQLIo.cxx.

View newest version in sPHENIX GitHub at line 104 of file FairParTSQLIo.cxx

References FairParIo::detParIoList, and fConnections.

Referenced by open().

+ Here is the caller graph for this function:

bool FairParTSQLIo::check ( )
virtual

Check if at least one connection is alive.

Returns
True if the connection is alive.
True if the connection is alive.

Reimplemented from FairParIo.

Definition at line 50 of file FairParTSQLIo.cxx.

View newest version in sPHENIX GitHub at line 50 of file FairParTSQLIo.cxx

References Acts::Test::db, fConnections, fDefaultDb, FairDbMultConnector::GetNumDb(), FairDbMultConnector::GetStatus(), FairDbMultConnector::kClosed, and FairDbMultConnector::kFailed.

+ Here is the call graph for this function:

void FairParTSQLIo::disconnect ( )

Destroy the connection.

Definition at line 93 of file FairParTSQLIo.cxx.

View newest version in sPHENIX GitHub at line 93 of file FairParTSQLIo.cxx

References fConnections, and FairDbMultConnector::GetStatusAsString().

Referenced by ~FairParTSQLIo().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FairDbMultConnector const & FairParTSQLIo::GetConnections ( ) const
inline

Get the connection object.

Returns
The actual FairDBConnection object.

Definition at line 109 of file FairParTSQLIo.h.

View newest version in sPHENIX GitHub at line 109 of file FairParTSQLIo.h

References fConnections.

int FairParTSQLIo::GetDefaultDBNum ( ) const
inline
Returns
The default database identification number.

Definition at line 119 of file FairParTSQLIo.h.

View newest version in sPHENIX GitHub at line 119 of file FairParTSQLIo.h

References fDefaultDb.

bool FairParTSQLIo::open ( )

If connection exist to at least on of the specified databases, then activate IO and return true.

Returns
True if at least one connection is available.

Definition at line 121 of file FairParTSQLIo.cxx.

View newest version in sPHENIX GitHub at line 121 of file FairParTSQLIo.cxx

References activateDetIo().

+ Here is the call graph for this function:

FairParTSQLIo& FairParTSQLIo::operator= ( FairParTSQLIo const &  ot)
private
void FairParTSQLIo::print ( )
virtual

Print some info. This function maybe removed in future.

Reimplemented from FairParIo.

Definition at line 130 of file FairParTSQLIo.cxx.

View newest version in sPHENIX GitHub at line 130 of file FairParTSQLIo.cxx

References FairParIo::detParIoList, fConnections, and FairDbMultConnector::GetNumDb().

+ Here is the call graph for this function:

void FairParTSQLIo::SetDefaultDBNum ( int const  dbNum)
inline

Set which database connection is going to be the default.

Parameters
dbNumThe default database identification number.

Definition at line 114 of file FairParTSQLIo.h.

View newest version in sPHENIX GitHub at line 114 of file FairParTSQLIo.h

References fDefaultDb.

void FairParTSQLIo::setDetParIo ( Text_t *  ioName)
virtual

creates the specified I/O.

Parameters
ioThe name of IO to be created/added in the IO list.

creates the specified I/O.

Parameters
ioNameThe name of IO to be created/added in the IO list.

Reimplemented from FairParIo.

Definition at line 74 of file FairParTSQLIo.cxx.

View newest version in sPHENIX GitHub at line 74 of file FairParTSQLIo.cxx

References FairParIo::detParIoList, and fConnections.

Member Data Documentation

FairDbMultConnector* FairParTSQLIo::fConnections
private

Actual connection set

Definition at line 102 of file FairParTSQLIo.h.

View newest version in sPHENIX GitHub at line 102 of file FairParTSQLIo.h

Referenced by activateDetIo(), check(), disconnect(), GetConnections(), print(), and setDetParIo().

int FairParTSQLIo::fDefaultDb
private

The default Database connection.

Definition at line 101 of file FairParTSQLIo.h.

View newest version in sPHENIX GitHub at line 101 of file FairParTSQLIo.h

Referenced by check(), GetDefaultDBNum(), and SetDefaultDBNum().


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