Gaudi Framework, version v23r2

Home   Generated: Thu Jun 28 2012
Classes | Public Member Functions | Protected Types | Protected Attributes

MultiStoreSvc Class Reference

Data service base class. More...

Inheritance diagram for MultiStoreSvc:
Inheritance graph
[legend]
Collaboration diagram for MultiStoreSvc:
Collaboration graph
[legend]

List of all members.

Classes

struct  tagROOT

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)
 Analyze by traversing all data objects below the sub tree.
virtual STATUS traverseSubTree (OBJECT *pObject, AGENT *pAgent)
 IDataManagerSvc: Analyze by traversing all data objects below the sub tree.
virtual STATUS traverseTree (AGENT *pAgent)
 IDataManagerSvc: Analyze 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.
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::stringPartitionDefs
 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.
IConversionSvcm_dataLoader
 Pointer to data loader service.
IAddressCreatorm_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.

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.


Member Typedef Documentation

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.

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

Constructor & Destructor Documentation

MultiStoreSvc::MultiStoreSvc ( CSTR name,
ISvcLocator svc 
) [inline]

Standard Constructor.

Definition at line 661 of file MultiStoreSvc.cpp.

  : base_class(name,svc), m_rootCLID(110), m_rootName("/Event"),
    m_dataLoader(0), m_addrCreator(0)
  {
    m_dataLoader = 0;
    declareProperty("RootCLID",         m_rootCLID);
    declareProperty("RootName",         m_rootName);
    declareProperty("Partitions",       m_partitionDefs);
    declareProperty("DataLoader",       m_loader="EventPersistencySvc");
    declareProperty("DefaultPartition", m_defaultPartition="Default");
  }
virtual MultiStoreSvc::~MultiStoreSvc (  ) [inline, virtual]

Standard Destructor.

Definition at line 674 of file MultiStoreSvc.cpp.


Member Function Documentation

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

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

Definition at line 521 of file MultiStoreSvc.cpp.

                                     {
    Partitions::const_iterator i = m_partitions.find(nam);
    if ( i != m_partitions.end() )  {
      m_current = (*i).second;
      return STATUS::SUCCESS;
    }
    m_current = Partition();
    return PARTITION_NOT_PRESENT;
  }
virtual STATUS MultiStoreSvc::activate ( IInterface pPartition ) [inline, virtual]

Activate a partition object.

Definition at line 532 of file MultiStoreSvc.cpp.

                                                  {
    SmartIF<IDataProviderSvc> provider(pPartition);
    m_current = Partition();
    if ( provider )  {
      Partitions::iterator i;
      for(i=m_partitions.begin(); i != m_partitions.end(); ++i) {
        if ( (*i).second.dataProvider == provider )  {
          m_current = (*i).second;
          return STATUS::SUCCESS;
        }
      }
      return PARTITION_NOT_PRESENT;
    }
    return NO_INTERFACE;
  }
virtual StatusCode MultiStoreSvc::activePartition ( std::string nam,
IInterface *&  pPartition 
) const [inline, virtual]

Access the active partition object.

Definition at line 560 of file MultiStoreSvc.cpp.

                                                                                     {
    if ( m_current.dataProvider )  {
      nam = m_current.name;
      pPartition = m_current.dataProvider;
      return STATUS::SUCCESS;
    }
    nam = "";
    pPartition = 0;
    return NO_ACTIVE_PARTITION;
  }
virtual STATUS MultiStoreSvc::addPreLoadItem ( const DataStoreItem item ) [inline, virtual]

Add an item to the preload list.

Definition at line 278 of file MultiStoreSvc.cpp.

                                                              {
    return _CALL(m_current.dataProvider, addPreLoadItem, (item));
  }
virtual STATUS MultiStoreSvc::addPreLoadItem ( CSTR item ) [inline, virtual]

Add an item to the preload list.

Definition at line 282 of file MultiStoreSvc.cpp.

                                              {
    return _CALL(m_current.dataProvider, addPreLoadItem, (item));
  }
STATUS MultiStoreSvc::attachServices (  ) [inline]

Definition at line 571 of file MultiStoreSvc.cpp.

                           {
    MsgStream log(msgSvc(), name());
    // Attach address creator facility
    STATUS sc = service(m_loader, m_addrCreator, true);
    if (!sc.isSuccess()) {
      log << MSG::ERROR
          << "Failed to retrieve data loader "
          << "\"" << m_loader << "\"" << endmsg;
      return sc;
    }
    IConversionSvc* dataLoader = 0;
    // Attach data loader facility
    sc = service(m_loader, dataLoader, true);
    if (!sc.isSuccess()) {
      log << MSG::ERROR << "Failed to retrieve data loader "
          << "\"" << m_loader << "\"" << endmsg;
      return sc;
    }
    sc = setDataLoader(dataLoader);
    dataLoader->release();
    if (!sc.isSuccess()) {
      log << MSG::ERROR << "Failed to set data loader "
          << "\"" << m_loader << "\"" << endmsg;
      return sc;
    }
    return sc;
  }
STATUS MultiStoreSvc::clearPartitions (  ) [inline]

Clear all partitions.

Definition at line 721 of file MultiStoreSvc.cpp.

                            {
    Partitions::iterator i;
    for(i=m_partitions.begin(); i != m_partitions.end(); ++i) {
      (*i).second.dataManager->clearStore().ignore();
      (*i).second.dataProvider->release();
      (*i).second.dataManager->release();
    }
    m_partitions.clear();
    return STATUS::SUCCESS;
  }
virtual STATUS MultiStoreSvc::clearStore (  ) [inline, virtual]

IDataManagerSvc: Remove all data objects in the data store.

Definition at line 188 of file MultiStoreSvc.cpp.

                               {
    Partitions::iterator i;
    for(i=m_partitions.begin(); i != m_partitions.end(); ++i) {
      (*i).second.dataManager->clearStore().ignore();
    }
    if ( m_root.root.object )  {
      switch ( m_root.type )  {
        case address_type:
          m_root.root.address->release();
          break;
        case object_type:
          m_root.root.object->release();
          break;
      }
      m_root.root.object = 0;
    }
    m_root.path = "";
    m_root.type = no_type;
    return STATUS::SUCCESS;
  }
virtual STATUS MultiStoreSvc::clearSubTree ( CSTR path ) [inline, virtual]

Remove all data objects below the sub tree identified.

Definition at line 180 of file MultiStoreSvc.cpp.

                                           {
    return _CALL(m_current.dataManager, clearSubTree, (path));
  }
virtual STATUS MultiStoreSvc::clearSubTree ( OBJECT pObject ) [inline, virtual]

Remove all data objects below the sub tree identified.

Definition at line 184 of file MultiStoreSvc.cpp.

                                                {
    return _CALL(m_current.dataManager, clearSubTree, (pObject));
  }
virtual STATUS MultiStoreSvc::create ( CSTR nam,
CSTR typ,
IInterface *&  pPartition 
) [inline, virtual]

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

: In the old implementation the services were "unmanaged" (non-active)

Definition at line 453 of file MultiStoreSvc.cpp.

                                                                        {
    STATUS sc = get(nam, pPartition);
    if ( !sc.isSuccess() )  {
      Gaudi::Utils::TypeNameString item(typ);
      SmartIF<IService>& isvc = serviceLocator()->service(typ);
      if (isvc.isValid())  {
        SmartIF<IDataManagerSvc> dataMgr(isvc);
        SmartIF<IDataProviderSvc> dataProv(isvc);
        if ( dataMgr.isValid() && dataProv.isValid() )  {
          Partition p;
          p.name         = nam;
          p.dataManager  = dataMgr;
          p.dataProvider = dataProv;
          p.dataManager->addRef();
          p.dataProvider->addRef();
          m_partitions.insert(std::make_pair(nam, p));
          return STATUS::SUCCESS;
        }
        else  {
          // Error
          return NO_INTERFACE;
        }
      }
      else {
        // Error
        return NO_INTERFACE;
      }
    }
    return PARTITION_EXISTS;
  }
virtual STATUS MultiStoreSvc::create ( CSTR nam,
CSTR typ 
) [inline, virtual]

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

Definition at line 447 of file MultiStoreSvc.cpp.

                                               {
    IInterface* pPartition = 0;
    return create(nam, typ, pPartition);
  }
STATUS MultiStoreSvc::detachServices (  ) [inline]

Definition at line 599 of file MultiStoreSvc.cpp.

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

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

Definition at line 486 of file MultiStoreSvc.cpp.

                                   {
    Partitions::iterator i = m_partitions.find(nam);
    if ( i != m_partitions.end() )  {
      if ( (*i).second.dataManager == m_current.dataManager )  {
        m_current = Partition();
      }
      (*i).second.dataManager->clearStore().ignore();
      (*i).second.dataProvider->release();
      (*i).second.dataManager->release();
      m_partitions.erase(i);
      return STATUS::SUCCESS;
    }
    return PARTITION_NOT_PRESENT;
  }
virtual STATUS MultiStoreSvc::drop ( IInterface pPartition ) [inline, virtual]

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

Definition at line 502 of file MultiStoreSvc.cpp.

                                               {
    SmartIF<IDataProviderSvc> provider(pPartition);
    if ( provider.isValid() )  {
      Partitions::iterator i;
      for(i=m_partitions.begin(); i != m_partitions.end(); ++i) {
        if ( (*i).second.dataProvider == provider )  {
          (*i).second.dataManager->clearStore().ignore();
          (*i).second.dataProvider->release();
          (*i).second.dataManager->release();
          m_partitions.erase(i);
          return STATUS::SUCCESS;
        }
      }
      return PARTITION_NOT_PRESENT;
    }
    return NO_INTERFACE;
  }
virtual STATUS MultiStoreSvc::finalize (  ) [inline, virtual]

Service initialisation.

Reimplemented from Service.

Definition at line 648 of file MultiStoreSvc.cpp.

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

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

Definition at line 370 of file MultiStoreSvc.cpp.

                                                        {
    return _CALL(m_current.dataProvider, retrieveObject, (path, pObj));
  }
virtual STATUS MultiStoreSvc::findObject ( IRegistry parent,
CSTR path,
OBJECT *&  pObj 
) [inline, virtual]

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

Definition at line 374 of file MultiStoreSvc.cpp.

                                                                           {
    return _CALL(m_current.dataProvider, retrieveObject, (parent, path, pObj));
  }
virtual STATUS MultiStoreSvc::findObject ( CSTR parent,
CSTR path,
OBJECT *&  pObj 
) [inline, virtual]

Find object in the data store.

Definition at line 378 of file MultiStoreSvc.cpp.

                                                                      {
    return _CALL(m_current.dataProvider, retrieveObject, (parent, path, pObj));
  }
virtual STATUS MultiStoreSvc::findObject ( CSTR parent,
int  item,
OBJECT *&  pObject 
) [inline, virtual]

Find object in the data store.

Definition at line 382 of file MultiStoreSvc.cpp.

                                                                       {
    return _CALL(m_current.dataProvider, findObject, (parent, item, pObject));
  }
virtual STATUS MultiStoreSvc::findObject ( OBJECT parent,
CSTR path,
OBJECT *&  pObject 
) [inline, virtual]

Find object in the data store.

Definition at line 386 of file MultiStoreSvc.cpp.

                                                                           {
    return _CALL(m_current.dataProvider, findObject, (parent, path, pObject));
  }
virtual STATUS MultiStoreSvc::findObject ( OBJECT parent,
int  item,
OBJECT *&  pObject 
) [inline, virtual]

Find object in the data store.

Definition at line 390 of file MultiStoreSvc.cpp.

                                                                         {
    return _CALL(m_current.dataProvider, findObject, (parent, item, pObject));
  }
virtual STATUS MultiStoreSvc::get ( CSTR nam,
IInterface *&  pPartition 
) const [inline, virtual]

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

Definition at line 549 of file MultiStoreSvc.cpp.

                                                                {
    Partitions::const_iterator i = m_partitions.find(nam);
    if ( i != m_partitions.end() )  {
      pPartition = (*i).second.dataProvider;
      return STATUS::SUCCESS;
    }
    pPartition = 0;
    return PARTITION_NOT_PRESENT;
  }
virtual STATUS MultiStoreSvc::initialize (  ) [inline, virtual]

Service initialisation.

Reimplemented from Service.

Definition at line 608 of file MultiStoreSvc.cpp.

                                 {
    // Nothing to do: just call base class initialisation
    STATUS sc = Service::initialize();
    if ( !sc.isSuccess() )  {
      return sc;
    }
    sc = makePartitions();
    if (!sc.isSuccess()) {
      MsgStream log(msgSvc(), name());
      log << MSG::ERROR << "Failed to connect to all store partitions." << endmsg;
      return sc;
    }
    return attachServices();
  }
virtual STATUS MultiStoreSvc::linkObject ( IRegistry from,
CSTR objPath,
OBJECT to 
) [inline, virtual]

Add a link to another object.

Definition at line 394 of file MultiStoreSvc.cpp.

                                                                         {
    return _CALL(m_current.dataProvider, linkObject, (from, objPath, to));
  }
virtual STATUS MultiStoreSvc::linkObject ( CSTR from,
CSTR objPath,
OBJECT to 
) [inline, virtual]

Add a link to another object.

Definition at line 398 of file MultiStoreSvc.cpp.

                                                                     {
    return _CALL(m_current.dataProvider, linkObject, (from, objPath, to));
  }
virtual STATUS MultiStoreSvc::linkObject ( OBJECT from,
CSTR objPath,
OBJECT to 
) [inline, virtual]

Add a link to another object.

Definition at line 402 of file MultiStoreSvc.cpp.

                                                                      {
    return _CALL(m_current.dataProvider, linkObject, (from, objPath, to));
  }
virtual STATUS MultiStoreSvc::linkObject ( CSTR fullPath,
OBJECT to 
) [inline, virtual]

Add a link to another object.

Definition at line 406 of file MultiStoreSvc.cpp.

                                                         {
    return _CALL(m_current.dataProvider, linkObject, (fullPath, to));
  }
STATUS MultiStoreSvc::makePartitions (  ) [inline]

Create all partitions according to job options.

Definition at line 733 of file MultiStoreSvc.cpp.

                           {
    std::string typ, nam;
    PartitionDefs::iterator j;
    clearPartitions().ignore();
    for(j=m_partitionDefs.begin(); j != m_partitionDefs.end(); ++j)  {
      Tokenizer tok(true);
      Tokenizer::Items::iterator i;
      tok.analyse(*j, " ", "", "", "=", "'", "'");
      for(i = tok.items().begin(); i != tok.items().end(); i++ )   {
        CSTR& t = (*i).tag();
        CSTR& v = (*i).value();
        switch( ::toupper(t[0]) )    {
        case 'N':
          nam = v;
          break;
        case 'T':
          typ = v;
          break;
        }
      }
      STATUS sc = create(nam, typ);
      if ( !sc.isSuccess() )  {
        return sc;
      }
      else if ( !m_defaultPartition.length() )  {
        m_defaultPartition = nam;
      }
    }
    return STATUS::SUCCESS;
  }
virtual STATUS MultiStoreSvc::objectLeaves ( const IRegistry pObject,
std::vector< IRegistry * > &  leaves 
) [inline, virtual]

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

Definition at line 168 of file MultiStoreSvc.cpp.

                                                                                        {
    return _CALL(m_current.dataManager, objectLeaves, (pObject, leaves));
  }
virtual STATUS MultiStoreSvc::objectLeaves ( const OBJECT pObject,
std::vector< IRegistry * > &  leaves 
) [inline, virtual]

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

Definition at line 164 of file MultiStoreSvc.cpp.

                                                                                      {
    return _CALL(m_current.dataManager, objectLeaves, (pObject, leaves));
  }
virtual STATUS MultiStoreSvc::objectParent ( const OBJECT pObject,
IRegistry *&  refpParent 
) [inline, virtual]

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

Definition at line 172 of file MultiStoreSvc.cpp.

                                                                              {
    return _CALL(m_current.dataManager, objectParent, (pObject, refpParent));
  }
virtual STATUS MultiStoreSvc::objectParent ( const IRegistry pObject,
IRegistry *&  refpParent 
) [inline, virtual]

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

Definition at line 176 of file MultiStoreSvc.cpp.

                                                                                 {
    return _CALL(m_current.dataManager, objectParent, (pObject, refpParent));
  }
virtual STATUS MultiStoreSvc::preLoad (  ) [inline, virtual]

load all preload items of the list

Definition at line 298 of file MultiStoreSvc.cpp.

                            {
    return _CALL(m_current.dataProvider, preLoad, ());
  }
STATUS MultiStoreSvc::preparePartitions (  ) [inline]

Prepare partition for usage.

Definition at line 682 of file MultiStoreSvc.cpp.

                              {
    STATUS iret = STATUS::SUCCESS;
    for(Partitions::iterator i=m_partitions.begin(); i != m_partitions.end(); ++i) {
      STATUS sc = STATUS::FAILURE;
      switch ( m_root.type )  {
        case address_type:
          if ( m_root.root.address )  {
            ADDRESS* pAdd = 0;
            ADDRESS* p = m_root.root.address;
            sc = m_addrCreator->createAddress(p->svcType(),
                                              p->clID(),
                                              p->par(),
                                              p->ipar(),
                                              pAdd);
            if ( sc.isSuccess() )  {
            sc = (*i).second.dataManager->setRoot(m_root.path, pAdd);
            }
          }
          break;
        case object_type:
          if ( m_root.root.object )  {
            if ( m_root.root.object->clID() == CLID_DataObject )  {
              DataObject* pObj = new DataObject();
              sc = (*i).second.dataManager->setRoot(m_root.path, pObj);
            }
          }
          break;
        default:
          sc = STATUS::FAILURE;
          break;
      }
      if ( !sc.isSuccess() )  {
        iret = sc;
      }
    }
    return iret;
  }
virtual STATUS MultiStoreSvc::registerAddress ( OBJECT parent,
CSTR path,
ADDRESS pAddr 
) [inline, virtual]

IDataManagerSvc: Register object address with the data store.

Definition at line 144 of file MultiStoreSvc.cpp.

                                                                              {
    return _CALL(m_current.dataManager, registerAddress, (parent, path, pAddr));
  }
virtual STATUS MultiStoreSvc::registerAddress ( IRegistry parent,
CSTR path,
ADDRESS pAdd 
) [inline, virtual]

IDataManagerSvc: Register object address with the data store.

Definition at line 148 of file MultiStoreSvc.cpp.

                                                                                {
    return _CALL(m_current.dataManager, registerAddress, (parent, path, pAdd));
  }
virtual STATUS MultiStoreSvc::registerAddress ( CSTR path,
ADDRESS pAddr 
) [inline, virtual]

IDataManagerSvc: Register object address with the data store.

Definition at line 140 of file MultiStoreSvc.cpp.

                                                               {
    return _CALL(m_current.dataManager, registerAddress, (path, pAddr));
  }
virtual STATUS MultiStoreSvc::registerObject ( OBJECT parent,
int  obj,
OBJECT pObj 
) [inline, virtual]

Register object with the data store.

Definition at line 318 of file MultiStoreSvc.cpp.

                                                                        {
    return _CALL(m_current.dataProvider, registerObject, (parent, obj, pObj));
  }
virtual STATUS MultiStoreSvc::registerObject ( CSTR path,
OBJECT pObj 
) [inline, virtual]

Register object with the data store.

Definition at line 302 of file MultiStoreSvc.cpp.

                                                           {
    return registerObject(0, path, pObj);
  }
virtual STATUS MultiStoreSvc::registerObject ( CSTR parent,
CSTR obj,
OBJECT pObj 
) [inline, virtual]

Register object with the data store.

Definition at line 306 of file MultiStoreSvc.cpp.

                                                                        {
    return _CALL(m_current.dataProvider, registerObject, (parent, obj, pObj));
  }
virtual STATUS MultiStoreSvc::registerObject ( CSTR parent,
int  item,
OBJECT pObj 
) [inline, virtual]

Register object with the data store.

Definition at line 310 of file MultiStoreSvc.cpp.

                                                                       {
    return _CALL(m_current.dataProvider, registerObject, (parent, item, pObj));
  }
virtual STATUS MultiStoreSvc::registerObject ( OBJECT parent,
CSTR obj,
OBJECT pObj 
) [inline, virtual]

Register object with the data store.

Definition at line 314 of file MultiStoreSvc.cpp.

                                                                          {
    return _CALL(m_current.dataProvider, registerObject, (parent, obj, pObj));
  }
virtual STATUS MultiStoreSvc::reinitialize (  ) [inline, virtual]

Service initialisation.

Reimplemented from Service.

Definition at line 624 of file MultiStoreSvc.cpp.

                                  {
    STATUS sc = Service::reinitialize();
    MsgStream log(msgSvc(), name());
    if (!sc.isSuccess()) {
      log << MSG::ERROR << "Enable to reinitialize base class"
          << endmsg;
      return sc;
    }
    detachServices();
    sc = attachServices();
    if ( !sc.isSuccess() )  {
      log << MSG::ERROR << "Failed to attach necessary services." << endmsg;
      return sc;
    }
    sc = makePartitions();
    if (!sc.isSuccess()) {
      log << MSG::ERROR << "Failed to connect to store partitions." << endmsg;
      return sc;
    }
    // return
    return STATUS::SUCCESS;
  }
virtual STATUS MultiStoreSvc::removePreLoadItem ( const DataStoreItem item ) [inline, virtual]

Remove an item from the preload list.

Definition at line 286 of file MultiStoreSvc.cpp.

                                                               {
    return _CALL(m_current.dataProvider, removePreLoadItem, (item));
  }
virtual STATUS MultiStoreSvc::removePreLoadItem ( CSTR item ) [inline, virtual]

Add an item to the preload list.

Definition at line 290 of file MultiStoreSvc.cpp.

                                                {
    return _CALL(m_current.dataProvider, removePreLoadItem, (item));
  }
virtual STATUS MultiStoreSvc::resetPreLoad (  ) [inline, virtual]

Clear the preload list.

Definition at line 294 of file MultiStoreSvc.cpp.

                                {
    return _CALL(m_current.dataProvider, resetPreLoad, ());
  }
virtual STATUS MultiStoreSvc::retrieveObject ( OBJECT parent,
CSTR path,
OBJECT *&  pObj 
) [inline, virtual]

Retrieve object from data store.

Definition at line 362 of file MultiStoreSvc.cpp.

                                                                             {
    return _CALL(m_current.dataProvider, retrieveObject, (parent, path, pObj));
  }
virtual STATUS MultiStoreSvc::retrieveObject ( IRegistry parent,
CSTR path,
OBJECT *&  pObj 
) [inline, virtual]

Retrieve object from data store.

Definition at line 346 of file MultiStoreSvc.cpp.

                                                                                {
    return _CALL(m_current.dataProvider, retrieveObject, (parent, path, pObj));
  }
virtual STATUS MultiStoreSvc::retrieveObject ( CSTR path,
OBJECT *&  pObj 
) [inline, virtual]

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

Definition at line 350 of file MultiStoreSvc.cpp.

                                                            {
    return _CALL(m_current.dataProvider, retrieveObject, (path, pObj));
  }
virtual STATUS MultiStoreSvc::retrieveObject ( CSTR parent,
CSTR path,
OBJECT *&  pObj 
) [inline, virtual]

Retrieve object from data store.

Definition at line 354 of file MultiStoreSvc.cpp.

                                                                           {
    return _CALL(m_current.dataProvider, retrieveObject, (parent, path, pObj));
  }
virtual STATUS MultiStoreSvc::retrieveObject ( CSTR parent,
int  item,
OBJECT *&  pObj 
) [inline, virtual]

Retrieve object from data store.

Definition at line 358 of file MultiStoreSvc.cpp.

                                                                        {
    return _CALL(m_current.dataProvider, retrieveObject, (parent, item, pObj));
  }
virtual STATUS MultiStoreSvc::retrieveObject ( OBJECT parent,
int  item,
OBJECT *&  pObj 
) [inline, virtual]

Retrieve object from data store.

Definition at line 366 of file MultiStoreSvc.cpp.

                                                                           {
    return _CALL(m_current.dataProvider, retrieveObject, (parent, item, pObj));
  }
virtual CLID MultiStoreSvc::rootCLID (  ) const [inline, virtual]

IDataManagerSvc: Accessor for root event CLID.

Definition at line 127 of file MultiStoreSvc.cpp.

                                {
    return (CLID)m_rootCLID;
  }
std::string MultiStoreSvc::rootName (  ) const [inline]

Name for root Event.

Definition at line 131 of file MultiStoreSvc.cpp.

                             {
    return m_rootName;
  }
virtual STATUS MultiStoreSvc::setDataLoader ( IConversionSvc pDataLoader ) [inline, virtual]

IDataManagerSvc: Pass a default data loader to the service.

Definition at line 264 of file MultiStoreSvc.cpp.

                                                             {
    Partitions::iterator i;
    if ( 0 != pDataLoader  ) pDataLoader->addRef();
    if ( 0 != m_dataLoader ) m_dataLoader->release();
    if ( 0 != pDataLoader  )    {
      pDataLoader->setDataProvider(this);
    }
    m_dataLoader = pDataLoader;
    for(i=m_partitions.begin(); i != m_partitions.end(); ++i) {
      (*i).second.dataManager->setDataLoader(m_dataLoader).ignore();
    }
    return SUCCESS;
  }
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

Definition at line 222 of file MultiStoreSvc.cpp.

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

Definition at line 242 of file MultiStoreSvc.cpp.

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

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

Definition at line 213 of file MultiStoreSvc.cpp.

                                                                  {
    return _CALL(m_current.dataManager, traverseSubTree, (pObject, pAgent));
  }
virtual STATUS MultiStoreSvc::traverseSubTree ( CSTR path,
AGENT pAgent 
) [inline, virtual]

Analyze by traversing all data objects below the sub tree.

Definition at line 209 of file MultiStoreSvc.cpp.

                                                             {
    return _CALL(m_current.dataManager, traverseSubTree, (path, pAgent));
  }
virtual STATUS MultiStoreSvc::traverseTree ( AGENT pAgent ) [inline, virtual]

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

Definition at line 217 of file MultiStoreSvc.cpp.

                                                {
    return _CALL(m_current.dataManager, traverseTree, (pAgent));
  }
virtual STATUS MultiStoreSvc::unlinkObject ( CSTR path ) [inline, virtual]

Remove a link to another object.

Definition at line 422 of file MultiStoreSvc.cpp.

                                          {
    return _CALL(m_current.dataProvider, unlinkObject, (path));
  }
virtual STATUS MultiStoreSvc::unlinkObject ( IRegistry from,
CSTR objPath 
) [inline, virtual]

Remove a link to another object.

Definition at line 410 of file MultiStoreSvc.cpp.

                                                               {
    return _CALL(m_current.dataProvider, unlinkObject, (from, objPath));
  }
virtual STATUS MultiStoreSvc::unlinkObject ( OBJECT from,
CSTR objPath 
) [inline, virtual]

Remove a link to another object.

Definition at line 418 of file MultiStoreSvc.cpp.

                                                            {
    return _CALL(m_current.dataProvider, unlinkObject, (from, objPath));
  }
virtual STATUS MultiStoreSvc::unlinkObject ( CSTR from,
CSTR objPath 
) [inline, virtual]

Remove a link to another object.

Definition at line 414 of file MultiStoreSvc.cpp.

                                                          {
    return _CALL(m_current.dataProvider, unlinkObject, (from, objPath));
  }
virtual STATUS MultiStoreSvc::unregisterAddress ( OBJECT pParent,
CSTR path 
) [inline, virtual]

IDataManagerSvc: Unregister object address from the data store.

Definition at line 156 of file MultiStoreSvc.cpp.

                                                                 {
    return _CALL(m_current.dataManager, unregisterAddress, (pParent, path));
  }
virtual STATUS MultiStoreSvc::unregisterAddress ( CSTR path ) [inline, virtual]

IDataManagerSvc: Unregister object address from the data store.

Definition at line 152 of file MultiStoreSvc.cpp.

                                                {
    return _CALL(m_current.dataManager, unregisterAddress, (path));
  }
virtual STATUS MultiStoreSvc::unregisterAddress ( IRegistry pParent,
CSTR path 
) [inline, virtual]

IDataManagerSvc: Unregister object address from the data store.

Definition at line 160 of file MultiStoreSvc.cpp.

                                                                    {
    return _CALL(m_current.dataManager, unregisterAddress, (pParent, path));
  }
virtual STATUS MultiStoreSvc::unregisterObject ( CSTR parent,
CSTR obj 
) [inline, virtual]

Unregister object from the data store.

Definition at line 326 of file MultiStoreSvc.cpp.

                                                            {
    return _CALL(m_current.dataProvider, unregisterObject, (parent, obj));
  }
virtual STATUS MultiStoreSvc::unregisterObject ( OBJECT pObj,
int  item 
) [inline, virtual]

Unregister object from the data store.

Definition at line 342 of file MultiStoreSvc.cpp.

                                                            {
    return _CALL(m_current.dataProvider, unregisterObject, (pObj, item));
  }
virtual STATUS MultiStoreSvc::unregisterObject ( OBJECT pObj ) [inline, virtual]

Unregister object from the data store.

Definition at line 334 of file MultiStoreSvc.cpp.

                                                 {
    return _CALL(m_current.dataProvider, unregisterObject, (pObj));
  }
virtual STATUS MultiStoreSvc::unregisterObject ( CSTR parent,
int  obj 
) [inline, virtual]

Unregister object from the data store.

Definition at line 330 of file MultiStoreSvc.cpp.

                                                          {
    return _CALL(m_current.dataProvider, unregisterObject, (parent, obj));
  }
virtual STATUS MultiStoreSvc::unregisterObject ( CSTR path ) [inline, virtual]

Unregister object from the data store.

Definition at line 322 of file MultiStoreSvc.cpp.

                                                {
    return _CALL(m_current.dataProvider, unregisterObject, (path));
  }
virtual STATUS MultiStoreSvc::unregisterObject ( OBJECT pObj,
CSTR path 
) [inline, virtual]

Unregister object from the data store.

Definition at line 338 of file MultiStoreSvc.cpp.

                                                             {
    return _CALL(m_current.dataProvider, unregisterObject, (pObj, path));
  }
virtual STATUS MultiStoreSvc::updateObject ( OBJECT pObj ) [inline, virtual]

Update object.

Definition at line 434 of file MultiStoreSvc.cpp.

                                              {
    return _CALL(m_current.dataProvider, updateObject, (pObj));
  }
virtual STATUS MultiStoreSvc::updateObject ( CSTR parent,
CSTR updatePath 
) [inline, virtual]

Update object.

Definition at line 438 of file MultiStoreSvc.cpp.

                                                                {
    return _CALL(m_current.dataProvider, updateObject, (parent, updatePath));
  }
virtual STATUS MultiStoreSvc::updateObject ( OBJECT parent,
CSTR updatePath 
) [inline, virtual]

Update object.

Definition at line 442 of file MultiStoreSvc.cpp.

                                                                 {
    return _CALL(m_current.dataProvider, updateObject, (parent, updatePath));
  }
virtual STATUS MultiStoreSvc::updateObject ( IRegistry pDirectory ) [inline, virtual]

Update object identified by its directory entry.

Definition at line 426 of file MultiStoreSvc.cpp.

                                                       {
    return _CALL(m_current.dataProvider, updateObject, (pDirectory));
  }
virtual STATUS MultiStoreSvc::updateObject ( CSTR path ) [inline, virtual]

Update object.

Definition at line 430 of file MultiStoreSvc.cpp.

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

Member Data Documentation

Reference to address creator.

Definition at line 104 of file MultiStoreSvc.cpp.

Partition MultiStoreSvc::m_current [protected]

Current partition.

Definition at line 117 of file MultiStoreSvc.cpp.

Pointer to data loader service.

Definition at line 102 of file MultiStoreSvc.cpp.

Default partition.

Definition at line 123 of file MultiStoreSvc.cpp.

Data loader name.

Definition at line 100 of file MultiStoreSvc.cpp.

Datastore partition definitions.

Definition at line 121 of file MultiStoreSvc.cpp.

Datastore partitions.

Definition at line 119 of file MultiStoreSvc.cpp.

Integer Property corresponding to CLID of root entry.

Definition at line 96 of file MultiStoreSvc.cpp.

Name of root event.

Definition at line 98 of file MultiStoreSvc.cpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Thu Jun 28 2012 23:27:43 for Gaudi Framework, version v23r2 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004