00001 #ifndef CDIDATAHANDLE_H
00002 #define CDIDATAHANDLE_H
00010
00011 #include "ConditionsDB/ICondDBMgr.h"
00012 #include "ConditionsDB/CondDBMySQLMgrFactory.h"
00013 #include "ConditionsDB/ICondDBTable.h"
00014 #include "ConditionsDB/CondDBMySQLTableFactory.h"
00015
00016 #include "cdi/cdiAux.h"
00017
00018 #include <is/info.h>
00019 #include <vector>
00020 #include <map>
00021
00022 #include <is/infodocument.h>
00023 #include <is/infodictionary.h>
00024 #include <is/inforeceiver.h>
00025
00026 #include "cdi/cdiHandle.h"
00027
00028 class cdiDataHandle: public cdiHandle
00029 {
00030 public:
00031 static const std::string configuration_name;
00032
00033 cdiDataHandle ( int verbosity, const IPCPartition & partition );
00034
00035
00036 void getConfig ( std::vector<std::string> & names );
00037 void process_data ( const std::string & name, ISCallbackInfo * isc );
00038
00039 void storeObject ( const std::string& name, ISInfoAny &isa);
00040
00041 std::string getConfName() {
00042 if (configuration_name.size() != 0)
00043 return configuration_name;
00044 else
00045 return "";
00046 }
00047
00048 private:
00049 IPCPartition partition;
00050 cdiAux mout;
00051 ICondDBMgr * condDBmgr;
00052 ICondDBDataAccess * condDataAccess;
00053 ICondDBFolderMgr * condFolderMgr;
00054
00055 std::map <ISType::Basic, ICondDBTable::cdb_types> types;
00056 std::map <ISType::Basic, ICondDBTable::cdb_types> a_types;
00057 std::map <std::string, ICondDBTable*> tables;
00058
00059 std::string getProfile ( );
00060 void init ( const std::string & profile );
00061 void create_folder ( const std::string & name, ISInfoAny & isa );
00062 void add_table ( ICondDBTable * table, const std::string & name );
00063 bool is_table_exist ( const std::string & name );
00064 };
00065 #endif //CDIDATAHANDLE_H
00066