cdiCOOLDataHandle Class Reference

Inheritance diagram for cdiCOOLDataHandle:

Inheritance graph
[legend]
Collaboration diagram for cdiCOOLDataHandle:

Collaboration graph
[legend]

Public Member Functions

 cdiCOOLDataHandle (int verbosity, const IPCPartition &partition, const std::string confName="RunParams.Conditions")
 this allows the user to specify a different object to store the information
void getConfig (std::vector< std::string > &names)
 This method is responsible for the subscription of the information that is to be stored in the IS server It is suposed to fill the names variable and check which objects have already been configured.
void process_data (const std::string &name, ISCallbackInfo *isc)
 This method is the responsable for processing the data that is fetched from the IS The procedure is somewhat more simple thatn with the old API.
void storeObject (const std::string &name, ISInfoAny &isa)

Data Fields

const std::string configuration_name

Private Member Functions

void loadSEALModules ()
std::string dumpFailure (ISInfo::Status status)
 This method simply checks which kind of failure happened.
void get_folder_specs (std::string folder, pool::AttributeListSpecification &payloadSpec)
 This method connects to the database and returns the payloadSpec of that folder.
bool existDB (std::string dbProfile)
 This method is responsible for the verification of existence of the COOL database in the server.
std::string getProfile ()
 This method is responsible for getting the new profile from the environment variable The profile must be in the for,: <tech>://<server>;schema=<sch>;username=<user>;password=<passwd>;dbname=<db>.
void init (const std::string &profile)
 This method is the one that initializes everythig in COOL To improve the stability and become more error protected The return type changed from void to ISInfo::Status And exceptions are handled.
void create_folder (const std::string &name, ISInfoAny &isa)
 This method verifies if a folder exist and in case doesn't exist create it.
void add_table (pool::AttributeListSpecification &table, const std::string &name)
 Just adds a table to the container.
bool is_table_exist (const std::string &name)
 No need for great explanations about this method.Just checks if the Attributelist exists in the map.
void convertTime (ISInfoAny &isAny, seal::IntBits< 64 >::ULeast &time)
 This method converts time to an unsigned long long We must remake the method.
template<class T>
void convert (ISInfoAny &isa, std::vector< std::string > &to)
void fillTypes ()
 This method fills the map that correlates between ISType and AttributeList types If a data type is an array it will ignore it and will issue a warning.

Private Attributes

cdiAux mout
IPCPartition partition
std::string m_fName
std::string m_ConnStr
cool::IDatabaseSvc * m_dbSvc
cool::DatabaseId m_dbId
cool::IDatabasePtr m_db
cool::IFolderPtr m_fld
std::map< ISType::Basic, std::string > m_dTypes
std::map< std::string, pool::AttributeListSpecification > m_Tables
std::vector< std::string > m_objs

Detailed Description

Definition at line 41 of file cdiCOOLDataHandle.h.


Constructor & Destructor Documentation

cdiCOOLDataHandle::cdiCOOLDataHandle int  verbosity,
const IPCPartition &  p,
const std::string  confName = "RunParams.Conditions"
 

this allows the user to specify a different object to store the information

Receives a verbosity level and a partition. Initializes the map that correlates ISType to AttributeList type

IMPORTANT: Arrays are not supported for now. If a data type is an array, it'll be ignored and a warning will be issued.

Definition at line 470 of file cdiCOOLDataHandle.cxx.

References fillTypes(), getProfile(), cdiAux::info(), init(), loadSEALModules(), and mout.

Here is the call graph for this function:


Member Function Documentation

void cdiCOOLDataHandle::add_table pool::AttributeListSpecification &  table,
const std::string &  name
[private]
 

Just adds a table to the container.

Definition at line 574 of file cdiCOOLDataHandle.cxx.

References cdiAux::debug(), m_Tables, mout, and cdiAux::verbose().

Referenced by create_folder().

Here is the call graph for this function:

void cdiCOOLDataHandle::convertTime ISInfoAny &  isAny,
seal::IntBits< 64 >::ULeast &  time
[private]
 

This method converts time to an unsigned long long We must remake the method.

Definition at line 101 of file cdiCOOLDataHandle.cxx.

References mout, and cdiAux::verbose().

Here is the call graph for this function:

void cdiCOOLDataHandle::create_folder const std::string &  name,
ISInfoAny &  isa
[private, virtual]
 

This method verifies if a folder exist and in case doesn't exist create it.

The name of the folder is determined by the object that is being stored and the release number which is found from a compilation flag

Implements cdiHandle.

Definition at line 632 of file cdiCOOLDataHandle.cxx.

References add_table(), cdiAux::debug(), cdiAux::info(), is_table_exist(), m_db, m_fld, mout, partition, and cdiAux::verbose().

Referenced by storeObject().

Here is the call graph for this function:

std::string cdiCOOLDataHandle::dumpFailure ISInfo::Status  status  )  [private]
 

This method simply checks which kind of failure happened.

Definition at line 596 of file cdiCOOLDataHandle.cxx.

References cdiAux::error(), and mout.

Referenced by getProfile().

Here is the call graph for this function:

bool cdiCOOLDataHandle::existDB std::string  dbProfile  )  [private]
 

This method is responsible for the verification of existence of the COOL database in the server.

Definition at line 122 of file cdiCOOLDataHandle.cxx.

References m_db, and m_dbSvc.

Referenced by init().

void cdiCOOLDataHandle::fillTypes  )  [private]
 

This method fills the map that correlates between ISType and AttributeList types If a data type is an array it will ignore it and will issue a warning.

Definition at line 417 of file cdiCOOLDataHandle.cxx.

References m_dTypes.

Referenced by cdiCOOLDataHandle().

void cdiCOOLDataHandle::get_folder_specs std::string  fname,
pool::AttributeListSpecification &  payloadSpec
[private]
 

This method connects to the database and returns the payloadSpec of that folder.

debugging information mout.verbose(std::string("Debugging information about the existing folders"),3); std::vector<std::string> fList; std::vector<std::string>::iterator folderIt;

Corrected for usage in COOL_1_2_0 fList = m_db->listFolders();

REALLY USELESS DEBUG INFORMATION LETS GET RID OF IT FROM CDI-00-02-10 ONWARDS fList = m_db->listAllNodes();

mout.verbose(std::string("-> List of folders in the database:")); for( folderIt = fList.begin(); folderIt != fList.end(); folderIt++ ) { mout.info(*folderIt,3); }

Definition at line 352 of file cdiCOOLDataHandle.cxx.

References cdiAux::debug(), cdiAux::error(), m_db, m_fld, mout, and cdiAux::verbose().

Here is the call graph for this function:

void cdiCOOLDataHandle::getConfig std::vector< std::string > &  names  )  [virtual]
 

This method is responsible for the subscription of the information that is to be stored in the IS server It is suposed to fill the names variable and check which objects have already been configured.

Implements cdiHandle.

Definition at line 144 of file cdiCOOLDataHandle.cxx.

References configuration_name, cdiAux::debug(), mout, partition, and cdiAux::verbose().

Here is the call graph for this function:

std::string cdiCOOLDataHandle::getProfile  )  [private, virtual]
 

This method is responsible for getting the new profile from the environment variable The profile must be in the for,: <tech>://<server>;schema=<sch>;username=<user>;password=<passwd>;dbname=<db>.

Implements cdiHandle.

Definition at line 277 of file cdiCOOLDataHandle.cxx.

References dumpFailure(), cdiAux::error(), cdiAux::info(), mout, and cdiAux::verbose().

Referenced by cdiCOOLDataHandle().

Here is the call graph for this function:

void cdiCOOLDataHandle::init const std::string &  profile  )  [private, virtual]
 

This method is the one that initializes everythig in COOL To improve the stability and become more error protected The return type changed from void to ISInfo::Status And exceptions are handled.

Updated in order to move for COOL 1.2.0

ifdef USECOOL_1_2_0 Initialize the database service m_dbSvc = &(cool::RalDatabaseSvcFactory::databaseService()); else m_dbSvc = &(cool::DatabaseSvcFactory::databaseService()); endif

Implements cdiHandle.

Definition at line 495 of file cdiCOOLDataHandle.cxx.

References cdiAux::debug(), existDB(), m_db, m_dbId, m_dbSvc, mout, and cdiAux::verbose().

Referenced by cdiCOOLDataHandle().

Here is the call graph for this function:

bool cdiCOOLDataHandle::is_table_exist const std::string &  name  )  [private]
 

No need for great explanations about this method.Just checks if the Attributelist exists in the map.

Definition at line 559 of file cdiCOOLDataHandle.cxx.

References cdiAux::info(), m_Tables, and mout.

Referenced by create_folder().

Here is the call graph for this function:

void cdiCOOLDataHandle::process_data const std::string &  name,
ISCallbackInfo *  isc
[virtual]
 

This method is the responsable for processing the data that is fetched from the IS The procedure is somewhat more simple thatn with the old API.

Implements cdiHandle.

Definition at line 839 of file cdiCOOLDataHandle.cxx.

References cdiAux::debug(), mout, and storeObject().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Mon Feb 6 14:01:45 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6