| # Gaudi Framework, version v20r3
Generated: 24 Nov 2008

# MultiStoreSvc Class Reference

Inheritance diagram for MultiStoreSvc:

[legend]
Collaboration diagram for MultiStoreSvc:

[legend]

List of all members.

## Detailed Description

Data service base class.

A data service manages the transient data stores and implements the IDataProviderSvc, the IDataManagerSvc and the IPartitionControl interfaces.

Author:
  Markus Frank

  Sebastien Ponce

Version:
  1.0

Definition at line 86 of file MultiStoreSvc.cpp.

## Public Member Functions
virtual CLID | rootCLID () const
| IDataManagerSvc: Accessor for root event CLID.
std::string | rootName () const
| Name for root Event.
virtual STATUS | registerAddress (CSTR &path, ADDRESS *pAddr)
| IDataManagerSvc: Register object address with the data store.
virtual STATUS | registerAddress (OBJECT *parent, CSTR &path, ADDRESS *pAddr)
| IDataManagerSvc: Register object address with the data store.
virtual STATUS | registerAddress (IRegistry *parent, CSTR &path, ADDRESS *pAdd)
| IDataManagerSvc: Register object address with the data store.
virtual STATUS | unregisterAddress (CSTR &path)
| IDataManagerSvc: Unregister object address from the data store.
virtual STATUS | unregisterAddress (OBJECT *pParent, CSTR &path)
| IDataManagerSvc: Unregister object address from the data store.
virtual STATUS | unregisterAddress (IRegistry *pParent, CSTR &path)
| IDataManagerSvc: Unregister object address from the data store.
virtual STATUS | objectLeaves (const OBJECT *pObject, std::vector< IRegistry * > &leaves)
| Explore the object store: retrieve all leaves attached to the object.
virtual STATUS | objectLeaves (const IRegistry *pObject, std::vector< IRegistry * > &leaves)
| Explore the object store: retrieve all leaves attached to the object.
virtual STATUS | objectParent (const OBJECT *pObject, IRegistry *&refpParent)
| IDataManagerSvc: Explore the object store: retrieve the object's parent.
virtual STATUS | objectParent (const IRegistry *pObject, IRegistry *&refpParent)
| IDataManagerSvc: Explore the object store: retrieve the object's parent.
virtual STATUS | clearSubTree (CSTR &path)
| Remove all data objects below the sub tree identified.
virtual STATUS | clearSubTree (OBJECT *pObject)
| Remove all data objects below the sub tree identified.
virtual STATUS | clearStore ()
| IDataManagerSvc: Remove all data objects in the data store.
virtual STATUS | traverseSubTree (CSTR &path, AGENT *pAgent)
| Analyse by traversing all data objects below the sub tree.
virtual STATUS | traverseSubTree (OBJECT *pObject, AGENT *pAgent)
| IDataManagerSvc: Analyse by traversing all data objects below the sub tree.
virtual STATUS | traverseTree (AGENT *pAgent)
| IDataManagerSvc: Analyse by traversing all data objects in the data store.
virtual STATUS | setRoot (CSTR &path, OBJECT *pObj)
| Initialize data store for new event by giving new event path and root object.
virtual STATUS | setRoot (CSTR &path, ADDRESS *pAddr)
| Initialize data store for new event by giving new event path and address of root object.
virtual STATUS | setDataLoader (IConversionSvc *pDataLoader)
| IDataManagerSvc: Pass a default data loader to the service.
virtual STATUS | addPreLoadItem (const DataStoreItem &item)
| Add an item to the preload list.
virtual STATUS | addPreLoadItem (CSTR &item)
| Add an item to the preload list.
virtual STATUS | removePreLoadItem (const DataStoreItem &item)
| Remove an item from the preload list.
virtual STATUS | removePreLoadItem (CSTR &item)
| Add an item to the preload list.
virtual STATUS | resetPreLoad ()
| Clear the preload list.
virtual STATUS | preLoad ()
| load all preload items of the list
virtual STATUS | registerObject (CSTR &path, OBJECT *pObj)
| Register object with the data store.
virtual STATUS | registerObject (CSTR &parent, CSTR &obj, OBJECT *pObj)
| Register object with the data store.
virtual STATUS | registerObject (CSTR &parent, int item, OBJECT *pObj)
| Register object with the data store.
virtual STATUS | registerObject (OBJECT *parent, CSTR &obj, OBJECT *pObj)
| Register object with the data store.
virtual STATUS | registerObject (OBJECT *parent, int obj, OBJECT *pObj)
| Register object with the data store.
virtual STATUS | unregisterObject (CSTR &path)
| Unregister object from the data store.
virtual STATUS | unregisterObject (CSTR &parent, CSTR &obj)
| Unregister object from the data store.
virtual STATUS | unregisterObject (CSTR &parent, int obj)
| Unregister object from the data store.
virtual STATUS | unregisterObject (OBJECT *pObj)
| Unregister object from the data store.
virtual STATUS | unregisterObject (OBJECT *pObj, CSTR &path)
| Unregister object from the data store.
virtual STATUS | unregisterObject (OBJECT *pObj, int item)
| Unregister object from the data store.
virtual STATUS | retrieveObject (IRegistry *parent, CSTR &path, OBJECT *&pObj)
| Retrieve object from data store.
virtual STATUS | retrieveObject (CSTR &path, OBJECT *&pObj)
| Retrieve object identified by its full path from the data store.
virtual STATUS | retrieveObject (CSTR &parent, CSTR &path, OBJECT *&pObj)
| Retrieve object from data store.
virtual STATUS | retrieveObject (CSTR &parent, int item, OBJECT *&pObj)
| Retrieve object from data store.
virtual STATUS | retrieveObject (OBJECT *parent, CSTR &path, OBJECT *&pObj)
| Retrieve object from data store.
virtual STATUS | retrieveObject (OBJECT *parent, int item, OBJECT *&pObj)
| Retrieve object from data store.
virtual STATUS | findObject (CSTR &path, OBJECT *&pObj)
| Find object identified by its full path in the data store.
virtual STATUS | findObject (IRegistry *parent, CSTR &path, OBJECT *&pObj)
| Find object identified by its full path in the data store.
virtual STATUS | findObject (CSTR &parent, CSTR &path, OBJECT *&pObj)
| Find object in the data store.
virtual STATUS | findObject (CSTR &parent, int item, OBJECT *&pObject)
| Find object in the data store.
virtual STATUS | findObject (OBJECT *parent, CSTR &path, OBJECT *&pObject)
| Find object in the data store.
virtual STATUS | findObject (OBJECT *parent, int item, OBJECT *&pObject)
| Find object in the data store.
virtual STATUS | linkObject (IRegistry *from, CSTR &objPath, OBJECT *to)
| Add a link to another object.
virtual STATUS | linkObject (CSTR &from, CSTR &objPath, OBJECT *to)
| Add a link to another object.
virtual STATUS | linkObject (OBJECT *from, CSTR &objPath, OBJECT *to)
| Add a link to another object.
virtual STATUS | linkObject (CSTR &fullPath, OBJECT *to)
| Add a link to another object.
virtual STATUS | unlinkObject (IRegistry *from, CSTR &objPath)
| Remove a link to another object.
virtual STATUS | unlinkObject (CSTR &from, CSTR &objPath)
| Remove a link to another object.
virtual STATUS | unlinkObject (OBJECT *from, CSTR &objPath)
| Remove a link to another object.
virtual STATUS | unlinkObject (CSTR &path)
| Remove a link to another object.
virtual STATUS | updateObject (IRegistry *pDirectory)
| Update object identified by its directory entry.
virtual STATUS | updateObject (CSTR &path)
| Update object.
virtual STATUS | updateObject (OBJECT *pObj)
| Update object.
virtual STATUS | updateObject (CSTR &parent, CSTR &updatePath)
| Update object.
virtual STATUS | updateObject (OBJECT *parent, CSTR &updatePath)
| Update object.
virtual STATUS | create (CSTR &nam, CSTR &typ)
| Create a partition object. The name identifies the partition uniquely.
virtual STATUS | create (CSTR &nam, CSTR &typ, IInterface *&pPartition)
| Create a partition object. The name identifies the partition uniquely.
virtual STATUS | drop (CSTR &nam)
| Drop a partition object. The name identifies the partition uniquely.
virtual STATUS | drop (IInterface *pPartition)
| Drop a partition object. The name identifies the partition uniquely.
virtual STATUS | activate (CSTR &nam)
| Activate a partition object. The name identifies the partition uniquely.
virtual STATUS | activate (IInterface *pPartition)
| Activate a partition object.
virtual STATUS | get (CSTR &nam, IInterface *&pPartition) const
| Access a partition object. The name identifies the partition uniquely.
virtual StatusCode | activePartition (std::string &nam, IInterface *&pPartition) const
| Access the active partition object.
virtual STATUS | queryInterface (const InterfaceID &riid, void **ppvUnknown)
| IInterface overload: Query implemented interface(s).
STATUS | attachServices ()
STATUS | detachServices ()
virtual STATUS | initialize ()
| Service initialisation.
virtual STATUS | reinitialize ()
| Service initialisation.
virtual STATUS | finalize ()
| Service initialisation.
| MultiStoreSvc (CSTR &name, ISvcLocator *svc)
| Standard Constructor.
virtual | ~MultiStoreSvc ()
| Standard Destructor.
STATUS | preparePartitions ()
| Prepare partition for usage.
STATUS | clearPartitions ()
| Clear all partitions.
STATUS | makePartitions ()
| Create all partitions according to job options.
## Protected Types
enum | { no_type = 0, address_type = 1, object_type = 2 }
| Root type (address or object). More...
typedef std::vector< std::string > | PartitionDefs
| The class creator is of course a friend!
typedef std::map< std::string, Partition > | Partitions
## Protected Attributes
CLID | m_rootCLID
| Integer Property corresponding to CLID of root entry.
std::string | m_rootName
| Name of root event.
std::string | m_loader
| Data loader name.
IConversionSvc * | m_dataLoader
| Pointer to data loader service.
IAddressCreator * | m_addrCreator
| Reference to address creator.
struct MultiStoreSvc::tagROOT | m_root
Partition | m_current
| Current partition.
Partitions | m_partitions
| Datastore partitions.
PartitionDefs | m_partitionDefs
| Datastore partition definitions.
std::string | m_defaultPartition
| Default partition.
## Classes
struct | tagROOT

## Member Typedef Documentation

typedef std::vector<std::string> MultiStoreSvc::PartitionDefs`[protected]`

The class creator is of course a friend!

Definition at line 93 of file MultiStoreSvc.cpp.

typedef std::map<std::string, Partition> MultiStoreSvc::Partitions`[protected]`

Definition at line 94 of file MultiStoreSvc.cpp.

## Member Enumeration Documentation

anonymous enum`[protected]`

Root type (address or object).

Enumerator:

  no_type |
  address_type |
  object_type |

Definition at line 106 of file MultiStoreSvc.cpp.

    00106 { no_type = 0, address_type = 1, object_type = 2};

## Constructor & Destructor Documentation

MultiStoreSvc::MultiStoreSvc | ( | CSTR & | name,
|  | ISvcLocator * | svc |
| ) |  |  | `[inline]`

Standard Constructor.

Definition at line 681 of file MultiStoreSvc.cpp.

    00682   : Service(name,svc), m_rootCLID(110), m_rootName("/Event"),
    00683     m_dataLoader(0), m_addrCreator(0)
    00684   {
    00685     m_dataLoader = 0;
    00686     declareProperty("RootCLID",         m_rootCLID);
    00687     declareProperty("RootName",         m_rootName);
    00688     declareProperty("Partitions",       m_partitionDefs);
    00689     declareProperty("DataLoader",       m_loader="EventPersistencySvc");
    00690     declareProperty("DefaultPartition", m_defaultPartition="Default");
    00691   }

virtual MultiStoreSvc::~MultiStoreSvc | ( |  | ) | `[inline, virtual]`

Standard Destructor.

Definition at line 694 of file MultiStoreSvc.cpp.

    00694                             {
    00695     setDataLoader(0).ignore();
    00696     resetPreLoad().ignore();
    00697     clearStore().ignore();
    00698     clearPartitions().ignore();
    00699   }

## Member Function Documentation

virtual CLID MultiStoreSvc::rootCLID | ( |  | ) | const`[inline, virtual]`

IDataManagerSvc: Accessor for root event CLID.

Implements IDataManagerSvc.

Definition at line 127 of file MultiStoreSvc.cpp.

    00127                                 {
    00128     return (CLID)m_rootCLID;
    00129   }

std::string MultiStoreSvc::rootName | ( |  | ) | const`[inline, virtual]`

Name for root Event.

Implements IDataManagerSvc.

Definition at line 131 of file MultiStoreSvc.cpp.

    00131                              {
    00132     return m_rootName;
    00133   }

virtual STATUS MultiStoreSvc::registerAddress | ( | CSTR & | path,
|  | ADDRESS * | pAddr |
| ) |  |  | `[inline, virtual]`

IDataManagerSvc: Register object address with the data store.

Implements IDataManagerSvc.

Definition at line 140 of file MultiStoreSvc.cpp.

    00140                                                                {
    00141     return _CALL(m_current.dataManager, registerAddress, (path, pAddr));
    00142   }

virtual STATUS MultiStoreSvc::registerAddress | ( | OBJECT * | parent,
|  | CSTR & | path,
|  | ADDRESS * | pAddr |
| ) |  |  | `[inline, virtual]`

IDataManagerSvc: Register object address with the data store.

Implements IDataManagerSvc.

Definition at line 144 of file MultiStoreSvc.cpp.

    00144                                                                               {
    00145     return _CALL(m_current.dataManager, registerAddress, (parent, path, pAddr));
    00146   }

virtual STATUS MultiStoreSvc::registerAddress | ( | IRegistry * | parent,
|  | CSTR & | path,
|  | ADDRESS * | pAdd |
| ) |  |  | `[inline, virtual]`

IDataManagerSvc: Register object address with the data store.

Implements IDataManagerSvc.

Definition at line 148 of file MultiStoreSvc.cpp.

    00148                                                                                 {
    00149     return _CALL(m_current.dataManager, registerAddress, (parent, path, pAdd));
    00150   }

virtual STATUS MultiStoreSvc::unregisterAddress | ( | CSTR & | path | ) | `[inline, virtual]`

IDataManagerSvc: Unregister object address from the data store.

Implements IDataManagerSvc.

Definition at line 152 of file MultiStoreSvc.cpp.

    00152                                                 {
    00153     return _CALL(m_current.dataManager, unregisterAddress, (path));
    00154   }

virtual STATUS MultiStoreSvc::unregisterAddress | ( | OBJECT * | pParent,
|  | CSTR & | path |
| ) |  |  | `[inline, virtual]`

IDataManagerSvc: Unregister object address from the data store.

Implements IDataManagerSvc.

Definition at line 156 of file MultiStoreSvc.cpp.

    00156                                                                  {
    00157     return _CALL(m_current.dataManager, unregisterAddress, (pParent, path));
    00158   }

virtual STATUS MultiStoreSvc::unregisterAddress | ( | IRegistry * | pParent,
|  | CSTR & | path |
| ) |  |  | `[inline, virtual]`

IDataManagerSvc: Unregister object address from the data store.

Implements IDataManagerSvc.

Definition at line 160 of file MultiStoreSvc.cpp.

    00160                                                                     {
    00161     return _CALL(m_current.dataManager, unregisterAddress, (pParent, path));
    00162   }

virtual STATUS MultiStoreSvc::objectLeaves | ( | const OBJECT * | pObject,
|  | std::vector< IRegistry * > & | leaves |
| ) |  |  | `[inline, virtual]`

Explore the object store: retrieve all leaves attached to the object.

Implements IDataManagerSvc.

Definition at line 164 of file MultiStoreSvc.cpp.

    00164                                                                                       {
    00165     return _CALL(m_current.dataManager, objectLeaves, (pObject, leaves));
    00166   }

virtual STATUS MultiStoreSvc::objectLeaves | ( | const IRegistry * | pObject,
|  | std::vector< IRegistry * > & | leaves |
| ) |  |  | `[inline, virtual]`

Explore the object store: retrieve all leaves attached to the object.

Implements IDataManagerSvc.

Definition at line 168 of file MultiStoreSvc.cpp.

    00168                                                                                         {
    00169     return _CALL(m_current.dataManager, objectLeaves, (pObject, leaves));
    00170   }

virtual STATUS MultiStoreSvc::objectParent | ( | const OBJECT * | pObject,
|  | IRegistry *& | refpParent |
| ) |  |  | `[inline, virtual]`

IDataManagerSvc: Explore the object store: retrieve the object's parent.

Implements IDataManagerSvc.

Definition at line 172 of file MultiStoreSvc.cpp.

    00172                                                                               {
    00173     return _CALL(m_current.dataManager, objectParent, (pObject, refpParent));
    00174   }

virtual STATUS MultiStoreSvc::objectParent | ( | const IRegistry * | pObject,
|  | IRegistry *& | refpParent |
| ) |  |  | `[inline, virtual]`

IDataManagerSvc: Explore the object store: retrieve the object's parent.

Implements IDataManagerSvc.

Definition at line 176 of file MultiStoreSvc.cpp.

    00176                                                                                  {
    00177     return _CALL(m_current.dataManager, objectParent, (pObject, refpParent));
    00178   }

virtual STATUS MultiStoreSvc::clearSubTree | ( | CSTR & | path | ) | `[inline, virtual]`

Remove all data objects below the sub tree identified.

Implements IDataManagerSvc.

Definition at line 180 of file MultiStoreSvc.cpp.

    00180                                            {
    00181     return _CALL(m_current.dataManager, clearSubTree, (path));
    00182   }

virtual STATUS MultiStoreSvc::clearSubTree | ( | OBJECT * | pObject | ) | `[inline, virtual]`

Remove all data objects below the sub tree identified.

Implements IDataManagerSvc.

Definition at line 184 of file MultiStoreSvc.cpp.

    00184                                                 {
    00185     return _CALL(m_current.dataManager, clearSubTree, (pObject));
    00186   }

virtual STATUS MultiStoreSvc::clearStore | ( |  | ) | `[inline, virtual]`

IDataManagerSvc: Remove all data objects in the data store.

Implements IDataManagerSvc.

Definition at line 188 of file MultiStoreSvc.cpp.

    00188                                {
    00189     Partitions::iterator i;
    00190     for(i=m_partitions.begin(); i != m_partitions.end(); ++i) {
    00191       (*i).second.dataManager->clearStore().ignore();
    00192     }
    00193     if ( m_root.root.object )  {
    00194       switch ( m_root.type )  {
    00195         case address_type:
    00196           m_root.root.address->release();
    00197           break;
    00198         case object_type:
    00199           m_root.root.object->release();
    00200           break;
    00201       }
    00202       m_root.root.object = 0;
    00203     }
    00204     m_root.path = "";
    00205     m_root.type = no_type;
    00206     return STATUS::SUCCESS;
    00207   }

virtual STATUS MultiStoreSvc::traverseSubTree | ( | CSTR & | path,
|  | AGENT * | pAgent |
| ) |  |  | `[inline, virtual]`

Analyse by traversing all data objects below the sub tree.

Implements IDataManagerSvc.

Definition at line 209 of file MultiStoreSvc.cpp.

    00209                                                              {
    00210     return _CALL(m_current.dataManager, traverseSubTree, (path, pAgent));
    00211   }

virtual STATUS MultiStoreSvc::traverseSubTree | ( | OBJECT * | pObject,
|  | AGENT * | pAgent |
| ) |  |  | `[inline, virtual]`

IDataManagerSvc: Analyse by traversing all data objects below the sub tree.

Implements IDataManagerSvc.

Definition at line 213 of file MultiStoreSvc.cpp.

    00213                                                                   {
    00214     return _CALL(m_current.dataManager, traverseSubTree, (pObject, pAgent));
    00215   }

virtual STATUS MultiStoreSvc::traverseTree | ( | AGENT * | pAgent | ) | `[inline, virtual]`

IDataManagerSvc: Analyse by traversing all data objects in the data store.

Implements IDataManagerSvc.

Definition at line 217 of file MultiStoreSvc.cpp.

    00217                                                 {
    00218     return _CALL(m_current.dataManager, traverseTree, (pAgent));
    00219   }

virtual STATUS MultiStoreSvc::setRoot | ( | CSTR & | path,
|  | OBJECT * | pObj |
| ) |  |  | `[inline, virtual]`

Initialize data store for new event by giving new event path and root object.

Takes care to clear the store before reinitializing it

Implements IDataManagerSvc.

Definition at line 222 of file MultiStoreSvc.cpp.

    00222                                                      {
    00223     if ( m_root.root.object )  {
    00224       switch ( m_root.type )  {
    00225         case address_type:
    00226           m_root.root.address->release();
    00227           break;
    00228         case object_type:
    00229           m_root.root.object->release();
    00230           break;
    00231       }
    00232     }
    00233     m_root.path    = path;
    00234     m_root.type    = object_type;
    00235     m_root.root.object  = pObj;
    00236     preparePartitions();
    00237     return activate(m_defaultPartition);
    00238   }

virtual STATUS MultiStoreSvc::setRoot | ( | CSTR & | path,
|  | ADDRESS * | pAddr |
| ) |  |  | `[inline, virtual]`

Initialize data store for new event by giving new event path and address of root object.

Takes care to clear the store before reinitializing it

Implements IDataManagerSvc.

Definition at line 242 of file MultiStoreSvc.cpp.

    00242                                                        {
    00243     if ( m_root.root.object )  {
    00244       switch ( m_root.type )  {
    00245         case address_type:
    00246           m_root.root.address->release();
    00247           break;
    00248         case object_type:
    00249           m_root.root.object->release();
    00250           break;
    00251       }
    00252     }
    00253     m_root.path    = path;
    00254     m_root.type    = address_type;
    00255     m_root.root.address = pAddr;
    00256     if ( m_root.root.address )  {
    00257       m_root.root.address->addRef();
    00258       preparePartitions();
    00259       return activate(m_defaultPartition);
    00260     }
    00261     return STATUS::FAILURE;
    00262   }

virtual STATUS MultiStoreSvc::setDataLoader | ( | IConversionSvc * | pDataLoader | ) | `[inline, virtual]`

IDataManagerSvc: Pass a default data loader to the service.

Implements IDataManagerSvc.

Definition at line 264 of file MultiStoreSvc.cpp.

    00264                                                              {
    00265     Partitions::iterator i;
    00266     if ( 0 != pDataLoader  ) pDataLoader->addRef();
    00267     if ( 0 != m_dataLoader ) m_dataLoader->release();
    00268     if ( 0 != pDataLoader  )    {
    00269       pDataLoader->setDataProvider(this);
    00270     }
    00271     m_dataLoader = pDataLoader;
    00272     for(i=m_partitions.begin(); i != m_partitions.end(); ++i) {
    00273       (*i).second.dataManager->setDataLoader(m_dataLoader).ignore();
    00274     }
    00275     return SUCCESS;
    00276   }

virtual STATUS MultiStoreSvc::addPreLoadItem | ( | const DataStoreItem & | item | ) | `[inline, virtual]`

Add an item to the preload list.

Implements IDataProviderSvc.

Definition at line 278 of file MultiStoreSvc.cpp.

    00278                                                               {
    00279     return _CALL(m_current.dataProvider, addPreLoadItem, (item));
    00280   }

virtual STATUS MultiStoreSvc::addPreLoadItem | ( | CSTR & | item | ) | `[inline, virtual]`

Add an item to the preload list.

Implements IDataProviderSvc.

Definition at line 282 of file MultiStoreSvc.cpp.

    00282                                               {
    00283     return _CALL(m_current.dataProvider, addPreLoadItem, (item));
    00284   }

virtual STATUS MultiStoreSvc::removePreLoadItem | ( | const DataStoreItem & | item | ) | `[inline, virtual]`

Remove an item from the preload list.

Implements IDataProviderSvc.

Definition at line 286 of file MultiStoreSvc.cpp.

    00286                                                                {
    00287     return _CALL(m_current.dataProvider, removePreLoadItem, (item));
    00288   }

virtual STATUS MultiStoreSvc::removePreLoadItem | ( | CSTR & | item | ) | `[inline, virtual]`

Add an item to the preload list.

Implements IDataProviderSvc.

Definition at line 290 of file MultiStoreSvc.cpp.

    00290                                                 {
    00291     return _CALL(m_current.dataProvider, removePreLoadItem, (item));
    00292   }

virtual STATUS MultiStoreSvc::resetPreLoad | ( |  | ) | `[inline, virtual]`

Clear the preload list.

Implements IDataProviderSvc.

Definition at line 294 of file MultiStoreSvc.cpp.

    00294                                 {
    00295     return _CALL(m_current.dataProvider, resetPreLoad, ());
    00296   }

virtual STATUS MultiStoreSvc::preLoad | ( |  | ) | `[inline, virtual]`

load all preload items of the list

Implements IDataProviderSvc.

Definition at line 298 of file MultiStoreSvc.cpp.

    00298                             {
    00299     return _CALL(m_current.dataProvider, preLoad, ());
    00300   }

virtual STATUS MultiStoreSvc::registerObject | ( | CSTR & | path,
|  | OBJECT * | pObj |
| ) |  |  | `[inline, virtual]`

Register object with the data store.

Implements IDataProviderSvc.

Definition at line 302 of file MultiStoreSvc.cpp.

    00302                                                            {
    00303     return registerObject(0, path, pObj);
    00304   }

virtual STATUS MultiStoreSvc::registerObject | ( | CSTR & | parent,
|  | CSTR & | obj,
|  | OBJECT * | pObj |
| ) |  |  | `[inline, virtual]`

Register object with the data store.

Implements IDataProviderSvc.

Definition at line 306 of file MultiStoreSvc.cpp.

    00306                                                                         {
    00307     return _CALL(m_current.dataProvider, registerObject, (parent, obj, pObj));
    00308   }

virtual STATUS MultiStoreSvc::registerObject | ( | CSTR & | parent,
|  | int | item,
|  | OBJECT * | pObj |
| ) |  |  | `[inline, virtual]`

Register object with the data store.

Implements IDataProviderSvc.

Definition at line 310 of file MultiStoreSvc.cpp.

    00310                                                                        {
    00311     return _CALL(m_current.dataProvider, registerObject, (parent, item, pObj));
    00312   }

virtual STATUS MultiStoreSvc::registerObject | ( | OBJECT * | parent,
|  | CSTR & | obj,
|  | OBJECT * | pObj |
| ) |  |  | `[inline, virtual]`

Register object with the data store.

Implements IDataProviderSvc.

Definition at line 314 of file MultiStoreSvc.cpp.

    00314                                                                           {
    00315     return _CALL(m_current.dataProvider, registerObject, (parent, obj, pObj));
    00316   }

virtual STATUS MultiStoreSvc::registerObject | ( | OBJECT * | parent,
|  | int | obj,
|  | OBJECT * | pObj |
| ) |  |  | `[inline, virtual]`

Register object with the data store.

Implements IDataProviderSvc.

Definition at line 318 of file MultiStoreSvc.cpp.

    00318                                                                         {
    00319     return _CALL(m_current.dataProvider, registerObject, (parent, obj, pObj));
    00320   }

virtual STATUS MultiStoreSvc::unregisterObject | ( | CSTR & | path | ) | `[inline, virtual]`

Unregister object from the data store.

Implements IDataProviderSvc.

Definition at line 322 of file MultiStoreSvc.cpp.

    00322                                                 {
    00323     return _CALL(m_current.dataProvider, unregisterObject, (path));
    00324   }

virtual STATUS MultiStoreSvc::unregisterObject | ( | CSTR & | parent,
|  | CSTR & | obj |
| ) |  |  | `[inline, virtual]`

Unregister object from the data store.

Implements IDataProviderSvc.

Definition at line 326 of file MultiStoreSvc.cpp.

    00326                                                             {
    00327     return _CALL(m_current.dataProvider, unregisterObject, (parent, obj));
    00328   }

virtual STATUS MultiStoreSvc::unregisterObject | ( | CSTR & | parent,
|  | int | obj |
| ) |  |  | `[inline, virtual]`

Unregister object from the data store.

Implements IDataProviderSvc.

Definition at line 330 of file MultiStoreSvc.cpp.

    00330                                                           {
    00331     return _CALL(m_current.dataProvider, unregisterObject, (parent, obj));
    00332   }

virtual STATUS MultiStoreSvc::unregisterObject | ( | OBJECT * | pObj | ) | `[inline, virtual]`

Unregister object from the data store.

Implements IDataProviderSvc.

Definition at line 334 of file MultiStoreSvc.cpp.

    00334                                                  {
    00335     return _CALL(m_current.dataProvider, unregisterObject, (pObj));
    00336   }

virtual STATUS MultiStoreSvc::unregisterObject | ( | OBJECT * | pObj,
|  | CSTR & | path |
| ) |  |  | `[inline, virtual]`

Unregister object from the data store.

Implements IDataProviderSvc.

Definition at line 338 of file MultiStoreSvc.cpp.

    00338                                                              {
    00339     return _CALL(m_current.dataProvider, unregisterObject, (pObj, path));
    00340   }

virtual STATUS MultiStoreSvc::unregisterObject | ( | OBJECT * | pObj,
|  | int | item |
| ) |  |  | `[inline, virtual]`

Unregister object from the data store.

Implements IDataProviderSvc.

Definition at line 342 of file MultiStoreSvc.cpp.

    00342                                                             {
    00343     return _CALL(m_current.dataProvider, unregisterObject, (pObj, item));
    00344   }

virtual STATUS MultiStoreSvc::retrieveObject | ( | IRegistry * | parent,
|  | CSTR & | path,
|  | OBJECT *& | pObj |
| ) |  |  | `[inline, virtual]`

Retrieve object from data store.

Implements IDataProviderSvc.

Definition at line 346 of file MultiStoreSvc.cpp.

    00346                                                                                 {
    00347     return _CALL(m_current.dataProvider, retrieveObject, (parent, path, pObj));
    00348   }

virtual STATUS MultiStoreSvc::retrieveObject | ( | CSTR & | path,
|  | OBJECT *& | pObj |
| ) |  |  | `[inline, virtual]`

Retrieve object identified by its full path from the data store.

Implements IDataProviderSvc.

Definition at line 350 of file MultiStoreSvc.cpp.

    00350                                                             {
    00351     return _CALL(m_current.dataProvider, retrieveObject, (path, pObj));
    00352   }

virtual STATUS MultiStoreSvc::retrieveObject | ( | CSTR & | parent,
|  | CSTR & | path,
|  | OBJECT *& | pObj |
| ) |  |  | `[inline, virtual]`

Retrieve object from data store.

Implements IDataProviderSvc.

Definition at line 354 of file MultiStoreSvc.cpp.

    00354                                                                            {
    00355     return _CALL(m_current.dataProvider, retrieveObject, (parent, path, pObj));
    00356   }

virtual STATUS MultiStoreSvc::retrieveObject | ( | CSTR & | parent,
|  | int | item,
|  | OBJECT *& | pObj |
| ) |  |  | `[inline, virtual]`

Retrieve object from data store.

Implements IDataProviderSvc.

Definition at line 358 of file MultiStoreSvc.cpp.

    00358                                                                         {
    00359     return _CALL(m_current.dataProvider, retrieveObject, (parent, item, pObj));
    00360   }

virtual STATUS MultiStoreSvc::retrieveObject | ( | OBJECT * | parent,
|  | CSTR & | path,
|  | OBJECT *& | pObj |
| ) |  |  | `[inline, virtual]`

Retrieve object from data store.

Implements IDataProviderSvc.

Definition at line 362 of file MultiStoreSvc.cpp.

    00362                                                                              {
    00363     return _CALL(m_current.dataProvider, retrieveObject, (parent, path, pObj));
    00364   }

virtual STATUS MultiStoreSvc::retrieveObject | ( | OBJECT * | parent,
|  | int | item,
|  | OBJECT *& | pObj |
| ) |  |  | `[inline, virtual]`

Retrieve object from data store.

Implements IDataProviderSvc.

Definition at line 366 of file MultiStoreSvc.cpp.

    00366                                                                            {
    00367     return _CALL(m_current.dataProvider, retrieveObject, (parent, item, pObj));
    00368   }

virtual STATUS MultiStoreSvc::findObject | ( | CSTR & | path,
|  | OBJECT *& | pObj |
| ) |  |  | `[inline, virtual]`

Find object identified by its full path in the data store.

Implements IDataProviderSvc.

Definition at line 370 of file MultiStoreSvc.cpp.

    00370                                                         {
    00371     return _CALL(m_current.dataProvider, retrieveObject, (path, pObj));
    00372   }

virtual STATUS MultiStoreSvc::findObject | ( | IRegistry * | parent,
|  | CSTR & | path,
|  | OBJECT *& | pObj |
| ) |  |  | `[inline, virtual]`

Find object identified by its full path in the data store.

Implements IDataProviderSvc.

Definition at line 374 of file MultiStoreSvc.cpp.

    00374                                                                            {
    00375     return _CALL(m_current.dataProvider, retrieveObject, (parent, path, pObj));
    00376   }

virtual STATUS MultiStoreSvc::findObject | ( | CSTR & | parent,
|  | CSTR & | path,
|  | OBJECT *& | pObj |
| ) |  |  | `[inline, virtual]`

Find object in the data store.

Implements IDataProviderSvc.

Definition at line 378 of file MultiStoreSvc.cpp.

    00378                                                                       {
    00379     return _CALL(m_current.dataProvider, retrieveObject, (parent, path, pObj));
    00380   }

virtual STATUS MultiStoreSvc::findObject | ( | CSTR & | parent,
|  | int | item,
|  | OBJECT *& | pObject |
| ) |  |  | `[inline, virtual]`

Find object in the data store.

Implements IDataProviderSvc.

Definition at line 382 of file MultiStoreSvc.cpp.

    00382                                                                        {
    00383     return _CALL(m_current.dataProvider, findObject, (parent, item, pObject));
    00384   }

virtual STATUS MultiStoreSvc::findObject | ( | OBJECT * | parent,
|  | CSTR & | path,
|  | OBJECT *& | pObject |
| ) |  |  | `[inline, virtual]`

Find object in the data store.

Implements IDataProviderSvc.

Definition at line 386 of file MultiStoreSvc.cpp.

    00386                                                                            {
    00387     return _CALL(m_current.dataProvider, findObject, (parent, path, pObject));
    00388   }

virtual STATUS MultiStoreSvc::findObject | ( | OBJECT * | parent,
|  | int | item,
|  | OBJECT *& | pObject |
| ) |  |  | `[inline, virtual]`

Find object in the data store.

Implements IDataProviderSvc.

Definition at line 390 of file MultiStoreSvc.cpp.

    00390                                                                          {
    00391     return _CALL(m_current.dataProvider, findObject, (parent, item, pObject));
    00392   }

virtual STATUS MultiStoreSvc::linkObject | ( | IRegistry * | from,
|  | CSTR & | objPath,
|  | OBJECT * | to |
| ) |  |  | `[inline, virtual]`

Add a link to another object.

Implements IDataProviderSvc.

Definition at line 394 of file MultiStoreSvc.cpp.

    00394                                                                          {
    00395     return _CALL(m_current.dataProvider, linkObject, (from, objPath, to));
    00396   }

virtual STATUS MultiStoreSvc::linkObject | ( | CSTR & | from,
|  | CSTR & | objPath,
|  | OBJECT * | to |
| ) |  |  | `[inline, virtual]`

Add a link to another object.

Implements IDataProviderSvc.

Definition at line 398 of file MultiStoreSvc.cpp.

    00398                                                                      {
    00399     return _CALL(m_current.dataProvider, linkObject, (from, objPath, to));
    00400   }

virtual STATUS MultiStoreSvc::linkObject | ( | OBJECT * | from,
|  | CSTR & | objPath,
|  | OBJECT * | to |
| ) |  |  | `[inline, virtual]`

Add a link to another object.

Implements IDataProviderSvc.

Definition at line 402 of file MultiStoreSvc.cpp.

    00402                                                                       {
    00403     return _CALL(m_current.dataProvider, linkObject, (from, objPath, to));
    00404   }

virtual STATUS MultiStoreSvc::linkObject | ( | CSTR & | fullPath,
|  | OBJECT * | to |
| ) |  |  | `[inline, virtual]`

Add a link to another object.

Implements IDataProviderSvc.

Definition at line 406 of file MultiStoreSvc.cpp.

    00406                                                          {
    00407     return _CALL(m_current.dataProvider, linkObject, (fullPath, to));
    00408   }

virtual STATUS MultiStoreSvc::unlinkObject | ( | IRegistry * | from,
|  | CSTR & | objPath |
| ) |  |  | `[inline, virtual]`

Remove a link to another object.

Implements IDataProviderSvc.

Definition at line 410 of file MultiStoreSvc.cpp.

    00410                                                                {
    00411     return _CALL(m_current.dataProvider, unlinkObject, (from, objPath));
    00412   }

virtual STATUS MultiStoreSvc::unlinkObject | ( | CSTR & | from,
|  | CSTR & | objPath |
| ) |  |  | `[inline, virtual]`

Remove a link to another object.

Implements IDataProviderSvc.

Definition at line 414 of file MultiStoreSvc.cpp.

    00414                                                           {
    00415     return _CALL(m_current.dataProvider, unlinkObject, (from, objPath));
    00416   }

virtual STATUS MultiStoreSvc::unlinkObject | ( | OBJECT * | from,
|  | CSTR & | objPath |
| ) |  |  | `[inline, virtual]`

Remove a link to another object.

Implements IDataProviderSvc.

Definition at line 418 of file MultiStoreSvc.cpp.

    00418                                                             {
    00419     return _CALL(m_current.dataProvider, unlinkObject, (from, objPath));
    00420   }

virtual STATUS MultiStoreSvc::unlinkObject | ( | CSTR & | path | ) | `[inline, virtual]`

Remove a link to another object.

Implements IDataProviderSvc.

Definition at line 422 of file MultiStoreSvc.cpp.

    00422                                           {
    00423     return _CALL(m_current.dataProvider, unlinkObject, (path));
    00424   }

virtual STATUS MultiStoreSvc::updateObject | ( | IRegistry * | pDirectory | ) | `[inline, virtual]`

Update object identified by its directory entry.

Implements IDataProviderSvc.

Definition at line 426 of file MultiStoreSvc.cpp.

    00426                                                        {
    00427     return _CALL(m_current.dataProvider, updateObject, (pDirectory));
    00428   }

virtual STATUS MultiStoreSvc::updateObject | ( | CSTR & | path | ) | `[inline, virtual]`

Update object.

Implements IDataProviderSvc.

Definition at line 430 of file MultiStoreSvc.cpp.

    00430                                            {
    00431     return _CALL(m_current.dataProvider, updateObject, (path));
    00432   }

virtual STATUS MultiStoreSvc::updateObject | ( | OBJECT * | pObj | ) | `[inline, virtual]`

Update object.

Implements IDataProviderSvc.

Definition at line 434 of file MultiStoreSvc.cpp.

    00434                                               {
    00435     return _CALL(m_current.dataProvider, updateObject, (pObj));
    00436   }

virtual STATUS MultiStoreSvc::updateObject | ( | CSTR & | parent,
|  | CSTR & | updatePath |
| ) |  |  | `[inline, virtual]`

Update object.

Implements IDataProviderSvc.

Definition at line 438 of file MultiStoreSvc.cpp.

    00438                                                                 {
    00439     return _CALL(m_current.dataProvider, updateObject, (parent, updatePath));
    00440   }

virtual STATUS MultiStoreSvc::updateObject | ( | OBJECT * | parent,
|  | CSTR & | updatePath |
| ) |  |  | `[inline, virtual]`

Update object.

Implements IDataProviderSvc.

Definition at line 442 of file MultiStoreSvc.cpp.

    00442                                                                  {
    00443     return _CALL(m_current.dataProvider, updateObject, (parent, updatePath));
    00444   }

virtual STATUS MultiStoreSvc::create | ( | CSTR & | nam,
|  | CSTR & | typ |
| ) |  |  | `[inline, virtual]`

Create a partition object. The name identifies the partition uniquely.

Implements IPartitionControl.

Definition at line 447 of file MultiStoreSvc.cpp.

    00447                                                {
    00448     IInterface* pPartition = 0;
    00449     return create(nam, typ, pPartition);
    00450   }

virtual STATUS MultiStoreSvc::create | ( | CSTR & | nam,
|  | CSTR & | typ,
|  | IInterface *& | pPartition |
| ) |  |  | `[inline, virtual]`

Create a partition object. The name identifies the partition uniquely.

Implements IPartitionControl.

Definition at line 453 of file MultiStoreSvc.cpp.

    00453                                                                         {
    00454     STATUS sc = get(nam, pPartition);
    00455     if ( !sc.isSuccess() )  {
    00456       ListItem item(typ);
    00457       IService* isvc = 0;
    00458       STATUS sc = serviceLocator()->getService(item.name(), isvc);
    00459       if ( !sc.isSuccess() )  {
    00460         SmartIF<ISvcManager> mgr(serviceLocator());
    00461         if ( mgr )  {
    00462           sc = mgr->createService(item.type(), item.name(), isvc);
    00463         }
    00464       }
    00465       if ( sc.isSuccess() )  {
    00466         SmartIF<IDataManagerSvc> dataMgr(isvc);
    00467         SmartIF<IDataProviderSvc> dataProv(isvc);
    00468         if ( dataMgr.isValid() && dataProv.isValid() )  {
    00469           Partition p;
    00470           p.name         = nam;
    00471           p.dataManager  = dataMgr;
    00472           p.dataProvider = dataProv;
    00473           p.dataManager->addRef();
    00474           p.dataProvider->addRef();
    00475           m_partitions.insert(std::make_pair(nam, p));
    00476           return STATUS::SUCCESS;
    00477         }
    00478         else  {
    00479           // Error
    00480           return NO_INTERFACE;
    00481         }
    00482       }
    00483       else {
    00484         // Error
    00485         return NO_INTERFACE;
    00486       }
    00487     }
    00488     return PARTITION_EXISTS;
    00489   }

virtual STATUS MultiStoreSvc::drop | ( | CSTR & | nam | ) | `[inline, virtual]`

Drop a partition object. The name identifies the partition uniquely.

Implements IPartitionControl.

Definition at line 492 of file MultiStoreSvc.cpp.

    00492                                    {
    00493     Partitions::iterator i = m_partitions.find(nam);
    00494     if ( i != m_partitions.end() )  {
    00495       if ( (*i).second.dataManager == m_current.dataManager )  {
    00496         m_current = Partition();
    00497       }
    00498       (*i).second.dataManager->clearStore().ignore();
    00499       (*i).second.dataProvider->release();
    00500       (*i).second.dataManager->release();
    00501       m_partitions.erase(i);
    00502       return STATUS::SUCCESS;
    00503     }
    00504     return PARTITION_NOT_PRESENT;
    00505   }

virtual STATUS MultiStoreSvc::drop | ( | IInterface * | pPartition | ) | `[inline, virtual]`

Drop a partition object. The name identifies the partition uniquely.

Implements IPartitionControl.

Definition at line 508 of file MultiStoreSvc.cpp.

    00508                                                {
    00509     SmartIF<IDataProviderSvc> provider(pPartition);
    00510     if ( provider.isValid() )  {
    00511       Partitions::iterator i;
    00512       for(i=m_partitions.begin(); i != m_partitions.end(); ++i) {
    00513         if ( (*i).second.dataProvider == provider )  {
    00514           (*i).second.dataManager->clearStore().ignore();
    00515           (*i).second.dataProvider->release();
    00516           (*i).second.dataManager->release();
    00517           m_partitions.erase(i);
    00518           return STATUS::SUCCESS;
    00519         }
    00520       }
    00521       return PARTITION_NOT_PRESENT;
    00522     }
    00523     return NO_INTERFACE;
    00524   }

virtual STATUS MultiStoreSvc::activate | ( | CSTR & | nam | ) | `[inline, virtual]`

Activate a partition object. The name identifies the partition uniquely.

Implements IPartitionControl.

Definition at line 527 of file MultiStoreSvc.cpp.

    00527                                      {
    00528     Partitions::const_iterator i = m_partitions.find(nam);
    00529     if ( i != m_partitions.end() )  {
    00530       m_current = (*i).second;
    00531       return STATUS::SUCCESS;
    00532     }
    00533     m_current = Partition();
    00534     return PARTITION_NOT_PRESENT;
    00535   }

virtual STATUS MultiStoreSvc::activate | ( | IInterface * | pPartition | ) | `[inline, virtual]`

Activate a partition object.

Implements IPartitionControl.

Definition at line 538 of file MultiStoreSvc.cpp.

    00538                                                   {
    00539     SmartIF<IDataProviderSvc> provider(pPartition);
    00540     m_current = Partition();
    00541     if ( provider )  {
    00542       Partitions::iterator i;
    00543       for(i=m_partitions.begin(); i != m_partitions.end(); ++i) {
    00544         if ( (*i).second.dataProvider == provider )  {
    00545           m_current = (*i).second;
    00546           return STATUS::SUCCESS;
    00547         }
    00548       }
    00549       return PARTITION_NOT_PRESENT;
    00550     }
    00551     return NO_INTERFACE;
    00552   }

virtual STATUS MultiStoreSvc::get | ( | CSTR & | nam,
|  | IInterface *& | pPartition |
| ) |  |  | const`[inline, virtual]`

Access a partition object. The name identifies the partition uniquely.

Implements IPartitionControl.

Definition at line 555 of file MultiStoreSvc.cpp.

    00555                                                                 {
    00556     Partitions::const_iterator i = m_partitions.find(nam);
    00557     if ( i != m_partitions.end() )  {
    00558       pPartition = (*i).second.dataProvider;
    00559       return STATUS::SUCCESS;
    00560     }
    00561     pPartition = 0;
    00562     return PARTITION_NOT_PRESENT;
    00563   }

virtual StatusCode MultiStoreSvc::activePartition | ( | std::string & | nam,
|  | IInterface *& | pPartition |
| ) |  |  | const`[inline, virtual]`

Access the active partition object.

Implements IPartitionControl.

Definition at line 566 of file MultiStoreSvc.cpp.

    00566                                                                                      {
    00567     if ( m_current.dataProvider )  {
    00568       nam = m_current.name;
    00569       pPartition = m_current.dataProvider;
    00570       return STATUS::SUCCESS;
    00571     }
    00572     nam = "";
    00573     pPartition = 0;
    00574     return NO_ACTIVE_PARTITION;
    00575   }

virtual STATUS MultiStoreSvc::queryInterface | ( | const InterfaceID & | riid,
|  | void ** | ppvUnknown |
| ) |  |  | `[inline, virtual]`

IInterface overload: Query implemented interface(s).

Reimplemented from Service.

Definition at line 578 of file MultiStoreSvc.cpp.

    00578                                                                                {
    00579     if ( IDataProviderSvc::interfaceID().versionMatch(riid) )
    00580       *ppvUnknown = (IDataProviderSvc*)this;
    00581     else if ( IDataManagerSvc::interfaceID().versionMatch(riid) )
    00582       *ppvUnknown = (IDataManagerSvc*)this;
    00583     else if ( IPartitionControl::interfaceID().versionMatch(riid) )
    00584       *ppvUnknown = (IPartitionControl*)this;
    00585     else
    00586       return Service::queryInterface(riid, ppvUnknown);
    00587     addRef();
    00588     return SUCCESS;
    00589   }

STATUS MultiStoreSvc::attachServices | ( |  | ) | `[inline]`

Definition at line 591 of file MultiStoreSvc.cpp.

    00591                            {
    00592     MsgStream log(msgSvc(), name());
    00593     // Attach address creator facility
    00594     STATUS sc = service(m_loader, m_addrCreator, true);
    00595     if (!sc.isSuccess()) {
    00596       log << MSG::ERROR
    00597           << "Failed to retrieve data loader "
    00598           << "\"" << m_loader << "\"" << endmsg;
    00599       return sc;
    00600     }
    00601     IConversionSvc* dataLoader = 0;
    00602     // Attach data loader facility
    00603     sc = service(m_loader, dataLoader, true);
    00604     if (!sc.isSuccess()) {
    00605       log << MSG::ERROR << "Failed to retrieve data loader "
    00606           << "\"" << m_loader << "\"" << endmsg;
    00607       return sc;
    00608     }
    00609     sc = setDataLoader(dataLoader);
    00610     dataLoader->release();
    00611     if (!sc.isSuccess()) {
    00612       log << MSG::ERROR << "Failed to set data loader "
    00613           << "\"" << m_loader << "\"" << endmsg;
    00614       return sc;
    00615     }
    00616     return sc;
    00617   }

STATUS MultiStoreSvc::detachServices | ( |  | ) | `[inline]`

Definition at line 619 of file MultiStoreSvc.cpp.

    00619                            {
    00620     if ( m_addrCreator )  m_addrCreator->release();
    00621     if ( m_dataLoader )  m_dataLoader->release();
    00622     m_addrCreator = 0;
    00623     m_dataLoader = 0;
    00624     return STATUS::SUCCESS;
    00625   }

virtual STATUS MultiStoreSvc::initialize | ( |  | ) | `[inline, virtual]`

Service initialisation.

Reimplemented from Service.

Definition at line 628 of file MultiStoreSvc.cpp.

    00628                                  {
    00629     // Nothing to do: just call base class initialisation
    00630     STATUS sc = Service::initialize();
    00631     if ( !sc.isSuccess() )  {
    00632       return sc;
    00633     }
    00634     sc = makePartitions();
    00635     if (!sc.isSuccess()) {
    00636       MsgStream log(msgSvc(), name());
    00637       log << MSG::ERROR << "Failed to connect to all store partitions." << endmsg;
    00638       return sc;
    00639     }
    00640     return attachServices();
    00641   }

virtual STATUS MultiStoreSvc::reinitialize | ( |  | ) | `[inline, virtual]`

Service initialisation.

Reimplemented from Service.

Definition at line 644 of file MultiStoreSvc.cpp.

    00644                                   {
    00645     STATUS sc = Service::reinitialize();
    00646     MsgStream log(msgSvc(), name());
    00647     if (!sc.isSuccess()) {
    00648       log << MSG::ERROR << "Enable to reinitialize base class"
    00649           << endmsg;
    00650       return sc;
    00651     }
    00652     detachServices();
    00653     sc = attachServices();
    00654     if ( !sc.isSuccess() )  {
    00655       log << MSG::ERROR << "Failed to attach necessary services." << endmsg;
    00656       return sc;
    00657     }
    00658     sc = makePartitions();
    00659     if (!sc.isSuccess()) {
    00660       log << MSG::ERROR << "Failed to connect to store partitions." << endmsg;
    00661       return sc;
    00662     }
    00663     // return
    00664     return STATUS::SUCCESS;
    00665   }

virtual STATUS MultiStoreSvc::finalize | ( | void |  | ) | `[inline, virtual]`

Service initialisation.

Reimplemented from Service.

Definition at line 668 of file MultiStoreSvc.cpp.

    00668                               {
    00669     setDataLoader(0).ignore();
    00670     clearStore().ignore();
    00671     clearPartitions().ignore();
    00672     m_current = Partition();
    00673     detachServices();
    00674     return Service::finalize();
    00675   }

STATUS MultiStoreSvc::preparePartitions | ( |  | ) | `[inline]`

Prepare partition for usage.

Definition at line 702 of file MultiStoreSvc.cpp.

    00702                               {
    00703     STATUS iret = STATUS::SUCCESS;
    00704     for(Partitions::iterator i=m_partitions.begin(); i != m_partitions.end(); ++i) {
    00705       STATUS sc = STATUS::FAILURE;
    00706       switch ( m_root.type )  {
    00707         case address_type:
    00708           if ( m_root.root.address )  {
    00709             ADDRESS* pAdd = 0;
    00710             ADDRESS* p = m_root.root.address;
    00711             sc = m_addrCreator->createAddress(p->svcType(),
    00712                                               p->clID(),
    00713                                               p->par(),
    00714                                               p->ipar(),
    00715                                               pAdd);
    00716             if ( sc.isSuccess() )  {
    00717             sc = (*i).second.dataManager->setRoot(m_root.path, pAdd);
    00718             }
    00719           }
    00720           break;
    00721         case object_type:
    00722           if ( m_root.root.object )  {
    00723             if ( m_root.root.object->clID() == CLID_DataObject )  {
    00724               DataObject* pObj = new DataObject();
    00725               sc = (*i).second.dataManager->setRoot(m_root.path, pObj);
    00726             }
    00727           }
    00728           break;
    00729         default:
    00730           sc = STATUS::FAILURE;
    00731           break;
    00732       }
    00733       if ( !sc.isSuccess() )  {
    00734         iret = sc;
    00735       }
    00736     }
    00737     return iret;
    00738   }

STATUS MultiStoreSvc::clearPartitions | ( |  | ) | `[inline]`

Clear all partitions.

Definition at line 741 of file MultiStoreSvc.cpp.

    00741                             {
    00742     Partitions::iterator i;
    00743     for(i=m_partitions.begin(); i != m_partitions.end(); ++i) {
    00744       (*i).second.dataManager->clearStore().ignore();
    00745       (*i).second.dataProvider->release();
    00746       (*i).second.dataManager->release();
    00747     }
    00748     m_partitions.clear();
    00749     return STATUS::SUCCESS;
    00750   }

STATUS MultiStoreSvc::makePartitions | ( |  | ) | `[inline]`

Create all partitions according to job options.

Definition at line 753 of file MultiStoreSvc.cpp.

    00753                            {
    00754     std::string typ, nam;
    00755     PartitionDefs::iterator j;
    00756     clearPartitions().ignore();
    00757     for(j=m_partitionDefs.begin(); j != m_partitionDefs.end(); ++j)  {
    00758       Tokenizer tok(true);
    00759       Tokenizer::Items::iterator i;
    00760       tok.analyse(*j, " ", "", "", "=", "'", "'");
    00761       for(i = tok.items().begin(); i != tok.items().end(); i++ )   {
    00762         CSTR& t = (*i).tag();
    00763         CSTR& v = (*i).value();
    00764         switch( ::toupper(t[0]) )    {
    00765         case 'N':
    00766           nam = v;
    00767           break;
    00768         case 'T':
    00769           typ = v;
    00770           break;
    00771         }
    00772       }
    00773       STATUS sc = create(nam, typ);
    00774       if ( !sc.isSuccess() )  {
    00775         return sc;
    00776       }
    00777       else if ( !m_defaultPartition.length() )  {
    00778         m_defaultPartition = nam;
    00779       }
    00780     }
    00781     return STATUS::SUCCESS;
    00782   }

## Member Data Documentation

CLID MultiStoreSvc::m_rootCLID`[protected]`

Integer Property corresponding to CLID of root entry.

Definition at line 96 of file MultiStoreSvc.cpp.

std::string MultiStoreSvc::m_rootName`[protected]`

Name of root event.

Definition at line 98 of file MultiStoreSvc.cpp.

std::string MultiStoreSvc::m_loader`[protected]`

Data loader name.

Definition at line 100 of file MultiStoreSvc.cpp.

IConversionSvc* MultiStoreSvc::m_dataLoader`[protected]`

Pointer to data loader service.

Definition at line 102 of file MultiStoreSvc.cpp.

IAddressCreator* MultiStoreSvc::m_addrCreator`[protected]`

Reference to address creator.

Definition at line 104 of file MultiStoreSvc.cpp.

struct MultiStoreSvc::tagROOT MultiStoreSvc::m_root`[protected]`

Partition MultiStoreSvc::m_current`[protected]`

Current partition.

Definition at line 117 of file MultiStoreSvc.cpp.

Partitions MultiStoreSvc::m_partitions`[protected]`

Datastore partitions.

Definition at line 119 of file MultiStoreSvc.cpp.

PartitionDefs MultiStoreSvc::m_partitionDefs`[protected]`

Datastore partition definitions.

Definition at line 121 of file MultiStoreSvc.cpp.

std::string MultiStoreSvc::m_defaultPartition`[protected]`

Default partition.

Definition at line 123 of file MultiStoreSvc.cpp.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r3/GaudiSvc/src/DataSvc/MultiStoreSvc.cpp