| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

MultiStoreSvc.cpp
Go to the documentation of this file.
1 //====================================================================
2 // MultiStoreSvc.cpp
3 //--------------------------------------------------------------------
4 //
5 // Package : System ( The LHCb Offline System)
6 //
7 // Description: implementation of the Transient event data service.
8 //
9 // Author : M.Frank
10 // History :
11 // +---------+----------------------------------------------+---------
12 // | Date | Comment | Who
13 // +---------+----------------------------------------------+---------
14 // | 29/10/98| Initial version | MF
15 // +---------+----------------------------------------------+---------
16 //
17 //====================================================================
18 #define DATASVC_MULTISTORESVC_CPP
19
20 // Include files
21 #include "GaudiKernel/Service.h"
22 #include "GaudiKernel/SmartIF.h"
23 #include "GaudiKernel/TypeNameString.h"
24 #include "GaudiKernel/MsgStream.h"
25 #include "GaudiKernel/AttribStringParser.h"
26 #include "GaudiKernel/DataObject.h"
27 #include "GaudiKernel/ISvcLocator.h"
28 #include "GaudiKernel/ISvcManager.h"
29 #include "GaudiKernel/IOpaqueAddress.h"
30 #include "GaudiKernel/IConversionSvc.h"
31 #include "GaudiKernel/IDataManagerSvc.h"
32 #include "GaudiKernel/IAddressCreator.h"
33 #include "GaudiKernel/IDataProviderSvc.h"
34 #include "GaudiKernel/IPartitionControl.h"
35
36 #include <map>
37
38 // Forward declarations
39 // This class
40 class MultiStoreSvc;
41
42 typedef const std::string CSTR;
43 typedef IDataStoreAgent AGENT;
44 typedef DataObject OBJECT;
45 typedef IOpaqueAddress ADDRESS;
46 typedef StatusCode STATUS;
47
48 namespace {
49 struct Partition final {
50 SmartIF<IDataProviderSvc> dataProvider;
51 SmartIF<IDataManagerSvc> dataManager;
52 std::string name;
53 };
54 }
55
67 class MultiStoreSvc: public extends<Service,
68 IDataProviderSvc,
69 IDataManagerSvc,
70 IPartitionControl>
71 {
72 protected:
73 typedef std::vector<std::string> PartitionDefs;
74 typedef std::map<std::string, Partition> Partitions;
76 CLID m_rootCLID;
78 std::string m_rootName;
80 std::string m_loader;
82 SmartIF<IConversionSvc> m_dataLoader;
84 SmartIF<IAddressCreator> m_addrCreator;
86 enum { no_type = 0, address_type = 1, object_type = 2};
87 struct tagROOT {
88 int type = no_type;
89 std::string path;
90 union {
91 ADDRESS* address;
92 OBJECT* object;
93 } root;
94 tagROOT() { root.address = nullptr; }
95 } m_root;
97 Partition m_current;
99 Partitions m_partitions;
101 PartitionDefs m_partitionDefs;
103 std::string m_defaultPartition;
104
105 // member templates to help writing the function calls
106 template <typename... Args, typename... UArgs>
107 STATUS call_(STATUS (IDataProviderSvc::*pmf)( Args... ), UArgs&&... args)
108 {
109 return m_current.dataProvider ? (m_current.dataProvider->*pmf)(std::forward<UArgs>(args)...)
110 : IDataProviderSvc::INVALID_ROOT;
111 }
112 template <typename... Args, typename... UArgs>
113 STATUS call_(STATUS (IDataManagerSvc::*pmf)( Args... ), UArgs&&... args)
114 {
115 return m_current.dataManager ? (m_current.dataManager->*pmf)(std::forward<UArgs>(args)...)
116 : IDataProviderSvc::INVALID_ROOT;
117 }
118
119 public:
121 CLID rootCLID() const override {
122 return m_rootCLID;
123 }
125 const std::string& rootName() const override {
126 return m_rootName;
127 }
128
130 STATUS registerAddress(CSTR& path, ADDRESS* pAddr) override {
131 return call_<CSTR&,ADDRESS*>( &IDataManagerSvc::registerAddress, path, pAddr);
132 }
134 STATUS registerAddress(OBJECT* parent, CSTR& path, ADDRESS* pAddr) override {
135 return call_<OBJECT*,CSTR&,ADDRESS*>( &IDataManagerSvc::registerAddress, parent, path, pAddr);
136 }
138 STATUS registerAddress(IRegistry* parent, CSTR& path, ADDRESS* pAdd) override {
139 return call_<IRegistry*,CSTR&,ADDRESS*>( &IDataManagerSvc::registerAddress, parent, path, pAdd);
140 }
142 STATUS unregisterAddress(CSTR& path) override {
143 return call_<CSTR&>( &IDataManagerSvc::unregisterAddress, path);
144 }
146 STATUS unregisterAddress(OBJECT* pParent, CSTR& path) override {
147 return call_<OBJECT*,CSTR&>( &IDataManagerSvc::unregisterAddress, pParent, path);
148 }
150 STATUS unregisterAddress(IRegistry* pParent, CSTR& path) override {
151 return call_<IRegistry*,CSTR&>( &IDataManagerSvc::unregisterAddress, pParent, path);
152 }
154 STATUS objectLeaves(const OBJECT* pObject, std::vector<IRegistry*>& leaves) override {
155 return call_<const OBJECT*,std::vector<IRegistry*>&>(&IDataManagerSvc::objectLeaves, pObject, leaves);
156 }
158 STATUS objectLeaves(const IRegistry* pObject, std::vector<IRegistry*>& leaves) override {
159 return call_<const IRegistry*,std::vector<IRegistry*>&>( &IDataManagerSvc::objectLeaves, pObject, leaves);
160 }
162 STATUS objectParent(const OBJECT* pObject, IRegistry*& refpParent) override {
163 return call_<const OBJECT*, IRegistry*&>( &IDataManagerSvc::objectParent, pObject, refpParent);
164 }
166 STATUS objectParent(const IRegistry* pObject, IRegistry*& refpParent) override {
167 return call_<const IRegistry*, IRegistry*&>( &IDataManagerSvc::objectParent, pObject, refpParent);
168 }
170 STATUS clearSubTree(CSTR& path) override {
171 return call_<CSTR&>( &IDataManagerSvc::clearSubTree, path);
172 }
174 STATUS clearSubTree(OBJECT* pObject) override {
175 return call_<OBJECT*>( &IDataManagerSvc::clearSubTree, pObject);
176 }
178 STATUS clearStore() override {
179 for(auto &i : m_partitions) {
180 i.second.dataManager->clearStore().ignore();
181 }
182 if ( m_root.root.object ) {
183 switch ( m_root.type ) {
184 case address_type:
185 m_root.root.address->release();
186 break;
187 case object_type:
188 m_root.root.object->release();
189 break;
190 }
191 m_root.root.object = nullptr;
192 }
193 m_root.path.clear();
194 m_root.type = no_type;
195 return STATUS::SUCCESS;
196 }
198 STATUS traverseSubTree(CSTR& path, AGENT* pAgent) override {
199 return call_<CSTR&,AGENT*>( &IDataManagerSvc::traverseSubTree, path, pAgent);
200 }
202 STATUS traverseSubTree(OBJECT* pObject, AGENT* pAgent) override {
203 return call_<OBJECT*,AGENT*>( &IDataManagerSvc::traverseSubTree, pObject, pAgent);
204 }
206 STATUS traverseTree( AGENT* pAgent ) override {
207 return call_<AGENT*>( &IDataManagerSvc::traverseTree, pAgent);
208 }
211 STATUS setRoot( std::string path, OBJECT* pObj) override {
212 if ( m_root.root.object ) {
213 switch ( m_root.type ) {
214 case address_type:
215 m_root.root.address->release();
216 break;
217 case object_type:
218 m_root.root.object->release();
219 break;
220 }
221 }
222 m_root.path = std::move(path);
223 m_root.type = object_type;
224 m_root.root.object = pObj;
225 preparePartitions();
226 return activate(m_defaultPartition);
227 }
228
231 STATUS setRoot (std::string path, ADDRESS* pAddr) override {
232 if ( m_root.root.object ) {
233 switch ( m_root.type ) {
234 case address_type:
235 m_root.root.address->release();
236 break;
237 case object_type:
238 m_root.root.object->release();
239 break;
240 }
241 }
242 m_root.path = std::move(path);
243 m_root.type = address_type;
244 m_root.root.address = pAddr;
245 if ( m_root.root.address ) {
246 m_root.root.address->addRef();
247 preparePartitions();
248 return activate(m_defaultPartition);
249 }
250 return STATUS::FAILURE;
251 }
253 STATUS setDataLoader(IConversionSvc* pDataLoader, IDataProviderSvc* dpsvc = nullptr) override {
254 m_dataLoader = pDataLoader;
255 if ( m_dataLoader ) m_dataLoader->setDataProvider(dpsvc ? dpsvc : this);
256 for(auto& i : m_partitions) {
257 i.second.dataManager->setDataLoader(m_dataLoader.get()).ignore();
258 }
259 return SUCCESS;
260 }
262 STATUS addPreLoadItem(const DataStoreItem& item) override {
263 return call_<const DataStoreItem&>( &IDataProviderSvc::addPreLoadItem, item);
264 }
266 STATUS addPreLoadItem(CSTR& item) override {
267 return call_<CSTR&>( &IDataProviderSvc::addPreLoadItem, item);
268 }
270 STATUS removePreLoadItem(const DataStoreItem& item) override {
271 return call_<const DataStoreItem&>( &IDataProviderSvc::removePreLoadItem, item);
272 }
274 STATUS removePreLoadItem(CSTR& item) override {
275 return call_<CSTR&>( &IDataProviderSvc::removePreLoadItem, item);
276 }
278 STATUS resetPreLoad() override {
279 return call_<>( &IDataProviderSvc::resetPreLoad);
280 }
282 STATUS preLoad() override {
283 return call_<>( &IDataProviderSvc::preLoad );
284 }
286 STATUS registerObject(CSTR& path, OBJECT* pObj) override {
287 return registerObject(nullptr, path, pObj);
288 }
290 STATUS registerObject(CSTR& parent, CSTR& obj, OBJECT* pObj) override {
291 return call_<CSTR&,CSTR&,OBJECT*>(&IDataProviderSvc::registerObject, parent,obj,pObj);
292 }
294 STATUS registerObject(CSTR& parent, int item, OBJECT* pObj) override {
295 return call_<CSTR&,int,OBJECT*>( &IDataProviderSvc::registerObject, parent, item, pObj);
296 }
298 STATUS registerObject(OBJECT* parent, CSTR& obj, OBJECT* pObj) override {
299 return call_<OBJECT*,CSTR&,OBJECT*>( &IDataProviderSvc::registerObject, parent, obj, pObj);
300 }
302 STATUS registerObject(OBJECT* parent, int obj, OBJECT* pObj) override {
303 return call_<OBJECT*,int,OBJECT*>( &IDataProviderSvc::registerObject, parent, obj, pObj);
304 }
306 STATUS unregisterObject(CSTR& path) override {
307 return call_<CSTR&>( &IDataProviderSvc::unregisterObject, path);
308 }
310 STATUS unregisterObject(CSTR& parent, CSTR& obj) override {
311 return call_<CSTR&,CSTR&>( &IDataProviderSvc::unregisterObject, parent, obj);
312 }
314 STATUS unregisterObject(CSTR& parent, int obj) override {
315 return call_<CSTR&,int>( &IDataProviderSvc::unregisterObject, parent, obj);
316 }
318 STATUS unregisterObject(OBJECT* pObj) override {
319 return call_<OBJECT*>( &IDataProviderSvc::unregisterObject, pObj);
320 }
322 STATUS unregisterObject(OBJECT* pObj, CSTR& path) override {
323 return call_<OBJECT*,CSTR&>( &IDataProviderSvc::unregisterObject, pObj, path);
324 }
326 STATUS unregisterObject(OBJECT* pObj, int item ) override {
327 return call_<OBJECT*,int>( &IDataProviderSvc::unregisterObject, pObj, item);
328 }
330 STATUS retrieveObject(IRegistry* parent, CSTR& path, OBJECT*& pObj ) override {
331 return call_<IRegistry*,CSTR&,OBJECT*&>( &IDataProviderSvc::retrieveObject, parent, path, pObj);
332 }
334 STATUS retrieveObject(CSTR& path, OBJECT*& pObj) override {
335 return call_<CSTR&,OBJECT*&>( &IDataProviderSvc::retrieveObject, path, pObj);
336 }
338 STATUS retrieveObject(CSTR& parent, CSTR& path, OBJECT*& pObj ) override {
339 return call_<CSTR&,CSTR&,OBJECT*&>( &IDataProviderSvc::retrieveObject, parent, path, pObj);
340 }
342 STATUS retrieveObject(CSTR& parent, int item, OBJECT*& pObj) override {
343 return call_<CSTR&,int,OBJECT*&>( &IDataProviderSvc::retrieveObject, parent, item, pObj);
344 }
346 STATUS retrieveObject(OBJECT* parent, CSTR& path, OBJECT*& pObj ) override {
347 return call_<OBJECT*,CSTR&,OBJECT*&>( &IDataProviderSvc::retrieveObject, parent, path, pObj);
348 }
350 STATUS retrieveObject(OBJECT* parent, int item, OBJECT*& pObj ) override {
351 return call_<OBJECT*,int,OBJECT*&>( &IDataProviderSvc::retrieveObject, parent, item, pObj);
352 }
354 STATUS findObject(CSTR& path, OBJECT*& pObj) override {
355 return call_<CSTR&,OBJECT*&>( &IDataProviderSvc::retrieveObject, path, pObj);
356 }
358 STATUS findObject(IRegistry* parent, CSTR& path, OBJECT*& pObj) override {
359 return call_<IRegistry*,CSTR&,OBJECT*&>( &IDataProviderSvc::findObject, parent, path, pObj);
360 }
362 STATUS findObject(CSTR& parent, CSTR& path, OBJECT*& pObj) override {
363 return call_<CSTR&,CSTR&,OBJECT*&>( &IDataProviderSvc::retrieveObject, parent, path, pObj);
364 }
366 STATUS findObject(CSTR& parent, int item, OBJECT*& pObject ) override {
367 return call_<CSTR&,int,OBJECT*&>( &IDataProviderSvc::findObject, parent, item, pObject);
368 }
370 STATUS findObject(OBJECT* parent, CSTR& path, OBJECT*& pObject) override {
371 return call_<OBJECT*,CSTR&,OBJECT*&>( &IDataProviderSvc::findObject, parent, path, pObject);
372 }
374 STATUS findObject(OBJECT* parent, int item, OBJECT*& pObject) override {
375 return call_<OBJECT*,int,OBJECT*&>( &IDataProviderSvc::findObject, parent, item, pObject);
376 }
378 STATUS linkObject(IRegistry* from, CSTR& objPath, OBJECT* to) override {
379 return call_<IRegistry*,CSTR&,OBJECT*>( &IDataProviderSvc::linkObject, from, objPath, to);
380 }
382 STATUS linkObject(CSTR& from, CSTR& objPath, OBJECT* to) override {
383 return call_<CSTR&,CSTR&,OBJECT*>( &IDataProviderSvc::linkObject, from, objPath, to);
384 }
386 STATUS linkObject(OBJECT* from, CSTR& objPath, OBJECT* to) override {
387 return call_<OBJECT*,CSTR&,OBJECT*>( &IDataProviderSvc::linkObject, from, objPath, to);
388 }
390 STATUS linkObject(CSTR& fullPath, OBJECT* to) override {
391 return call_<CSTR&,OBJECT*>( &IDataProviderSvc::linkObject, fullPath, to);
392 }
394 STATUS unlinkObject(IRegistry* from, CSTR& objPath) override {
395 return call_<IRegistry*,CSTR&>( &IDataProviderSvc::unlinkObject, from, objPath);
396 }
398 STATUS unlinkObject(CSTR& from, CSTR& objPath) override {
399 return call_<CSTR&,CSTR&>( &IDataProviderSvc::unlinkObject, from, objPath);
400 }
402 STATUS unlinkObject(OBJECT* from, CSTR& objPath) override {
403 return call_<OBJECT*,CSTR&>( &IDataProviderSvc::unlinkObject, from, objPath);
404 }
406 STATUS unlinkObject(CSTR& path) override {
407 return call_<CSTR&>( &IDataProviderSvc::unlinkObject, path);
408 }
410 STATUS updateObject(IRegistry* pDirectory ) override {
411 return call_<IRegistry*>( &IDataProviderSvc::updateObject, pDirectory);
412 }
414 STATUS updateObject(CSTR& path) override {
415 return call_<CSTR&>( &IDataProviderSvc::updateObject, path);
416 }
418 STATUS updateObject(OBJECT* pObj ) override {
419 return call_<OBJECT*>( &IDataProviderSvc::updateObject, pObj);
420 }
422 STATUS updateObject(CSTR& parent, CSTR& updatePath ) override {
423 return call_<CSTR&,CSTR&>( &IDataProviderSvc::updateObject, parent, updatePath);
424 }
426 STATUS updateObject(OBJECT* parent, CSTR& updatePath) override {
427 return call_<OBJECT*,CSTR&>( &IDataProviderSvc::updateObject, parent, updatePath);
428 }
429
431 STATUS create(CSTR& nam, CSTR& typ) override {
432 IInterface* pPartition = nullptr;
433 return create(nam, typ, pPartition);
434 }
436 STATUS create(CSTR& nam, CSTR& typ, IInterface*& pPartition) override {
437 if ( get(nam, pPartition).isSuccess() ) return PARTITION_EXISTS;
439 auto isvc = serviceLocator()->service<IService>(typ);
440 if (!isvc) return NO_INTERFACE;
441 auto dataMgr = isvc.as<IDataManagerSvc>();
442 auto dataProv = isvc.as<IDataProviderSvc>();
443 if ( !dataMgr || !dataProv ) return NO_INTERFACE;
444 m_partitions.emplace( nam, Partition{ dataProv, dataMgr, nam } );
445 return STATUS::SUCCESS;
446 }
447
449 STATUS drop(CSTR& nam) override {
450 auto i = m_partitions.find(nam);
451 if ( i == m_partitions.end() ) return PARTITION_NOT_PRESENT;
452 if ( i->second.dataManager == m_current.dataManager ) {
453 m_current = Partition();
454 }
455 i->second.dataManager->clearStore().ignore();
456 m_partitions.erase(i);
457 return STATUS::SUCCESS;
458 }
459
461 STATUS drop(IInterface* pPartition) override {
462 auto provider = SmartIF<IDataProviderSvc>(pPartition);
463 if ( !provider ) return NO_INTERFACE;
464 auto i = std::find_if( std::begin(m_partitions), std::end(m_partitions),
465 [&](Partitions::const_reference p) {
466 return p.second.dataProvider == provider;
467 } );
468 if (i==std::end(m_partitions)) return PARTITION_NOT_PRESENT;
469 i->second.dataManager->clearStore().ignore();
470 m_partitions.erase(i);
471 return STATUS::SUCCESS;
472 }
473
475 STATUS activate(CSTR& nam) override {
476 auto i = m_partitions.find(nam);
477 if ( i != m_partitions.end() ) {
478 m_current = i->second;
479 return STATUS::SUCCESS;
480 }
481 m_current = Partition();
482 return PARTITION_NOT_PRESENT;
483 }
484
486 STATUS activate(IInterface* pPartition) override {
487 auto provider = SmartIF<IDataProviderSvc>(pPartition);
488 m_current = Partition();
489 if ( !provider ) return NO_INTERFACE;
490 auto i = std::find_if(std::begin(m_partitions), std::end(m_partitions),
491 [&](Partitions::const_reference p) {
492 return p.second.dataProvider == provider;
493 } );
494 if (i == std::end(m_partitions)) return PARTITION_NOT_PRESENT;
495 m_current = i->second;
496 return STATUS::SUCCESS;
497 }
498
500 STATUS get(CSTR& nam, IInterface*& pPartition) const override {
501 auto i = m_partitions.find(nam);
502 if ( i != m_partitions.end() ) {
503 pPartition = i->second.dataProvider;
504 return STATUS::SUCCESS;
505 }
506 pPartition = nullptr;
507 return PARTITION_NOT_PRESENT;
508 }
509
511 StatusCode activePartition(std::string& nam, IInterface*& pPartition) const override {
512 if ( m_current.dataProvider ) {
513 nam = m_current.name;
514 pPartition = m_current.dataProvider;
515 return STATUS::SUCCESS;
516 }
517 nam.clear();
518 pPartition = nullptr;
519 return NO_ACTIVE_PARTITION;
520 }
521
522 STATUS attachServices() {
523 // Attach address creator facility
524 m_addrCreator = service(m_loader, true);
525 if (!m_addrCreator) {
526 error()
527 << "Failed to retrieve data loader "
528 << "\"" << m_loader << "\"" << endmsg;
529 return StatusCode::FAILURE;
530 }
531 // Attach data loader facility
532 auto dataLoader = service<IConversionSvc>(m_loader, true);
533 if (!dataLoader) {
534 error() << "Failed to retrieve data loader "
535 << "\"" << m_loader << "\"" << endmsg;
536 return StatusCode::FAILURE;
537 }
538 auto sc = setDataLoader(dataLoader.get());
539 if (!sc.isSuccess()) {
540 error() << "Failed to set data loader "
541 << "\"" << m_loader << "\"" << endmsg;
542 }
543 return sc;
544 }
545
546 STATUS detachServices() {
547 m_addrCreator.reset();
548 m_dataLoader.reset();
549 return STATUS::SUCCESS;
550 }
551
553 STATUS initialize() override {
554 // Nothing to do: just call base class initialisation
555 STATUS sc = Service::initialize();
556 if ( !sc.isSuccess() ) return sc;
557 sc = makePartitions();
558 if (!sc.isSuccess()) {
559 error() << "Failed to connect to all store partitions." << endmsg;
560 return sc;
561 }
562 return attachServices();
563 }
564
566 STATUS reinitialize() override {
567 STATUS sc = Service::reinitialize();
568 if (!sc.isSuccess()) {
569 error() << "Enable to reinitialize base class"
570 << endmsg;
571 return sc;
572 }
573 detachServices();
574 sc = attachServices();
575 if ( !sc.isSuccess() ) {
576 error() << "Failed to attach necessary services." << endmsg;
577 return sc;
578 }
579 sc = makePartitions();
580 if (!sc.isSuccess()) {
581 error() << "Failed to connect to store partitions." << endmsg;
582 return sc;
583 }
584 // return
585 return STATUS::SUCCESS;
586 }
587
589 STATUS finalize() override {
590 setDataLoader(nullptr).ignore();
591 clearStore().ignore();
592 clearPartitions().ignore();
593 m_current = Partition();
594 detachServices();
595 return Service::finalize();
596 }
597
598
599 //protected:
600
602 MultiStoreSvc( CSTR& name, ISvcLocator* svc )
603 : base_class(name,svc)
604 {
605 declareProperty("RootCLID", m_rootCLID = 110);
606 declareProperty("RootName", m_rootName = "/Event");
607 declareProperty("Partitions", m_partitionDefs);
608 declareProperty("DataLoader", m_loader="EventPersistencySvc");
609 declareProperty("DefaultPartition", m_defaultPartition="Default");
610 }
611
613 ~MultiStoreSvc() override {
614 setDataLoader(nullptr).ignore();
615 resetPreLoad().ignore();
616 clearStore().ignore();
617 clearPartitions().ignore();
618 }
619
621 STATUS preparePartitions() {
622 STATUS iret = STATUS::SUCCESS;
623 for(auto& i : m_partitions) {
624 STATUS sc = STATUS::FAILURE;
625 switch ( m_root.type ) {
626 case address_type:
627 if ( m_root.root.address ) {
628 ADDRESS* pAdd = nullptr;
629 ADDRESS* p = m_root.root.address;
630 sc = m_addrCreator->createAddress(p->svcType(),
631 p->clID(),
632 p->par(),
633 p->ipar(),
634 pAdd);
635 if ( sc.isSuccess() ) {
636 sc = i.second.dataManager->setRoot(m_root.path, pAdd);
637 }
638 }
639 break;
640 case object_type:
641 if ( m_root.root.object ) {
642 if ( m_root.root.object->clID() == CLID_DataObject ) {
643 sc = i.second.dataManager->setRoot(m_root.path, new DataObject());
644 }
645 }
646 break;
647 default:
648 sc = STATUS::FAILURE;
649 break;
650 }
651 if ( !sc.isSuccess() ) iret = sc;
652 }
653 return iret;
654 }
655
657 STATUS clearPartitions() {
658 for(auto &i : m_partitions) i.second.dataManager->clearStore().ignore();
659 m_partitions.clear();
660 return STATUS::SUCCESS;
661 }
662
664 STATUS makePartitions() {
665 using Parser = Gaudi::Utils::AttribStringParser;
666 std::string typ, nam;
667 clearPartitions().ignore();
668 for(auto part: m_partitionDefs) {
669 for(auto attrib: Parser(std::move(part))) {
670 switch( ::toupper(attrib.tag[0]) ) {
671 case 'N':
672 nam = std::move(attrib.value);
673 break;
674 case 'T':
675 typ = std::move(attrib.value);
676 break;
677 }
678 }
679 STATUS sc = create(nam, typ);
680 if ( !sc.isSuccess() ) return sc;
681 if ( m_defaultPartition.empty() ) m_defaultPartition = nam;
682 }
683 return STATUS::SUCCESS;
684 }
685 };
686
687 // Instantiation of a static factory class used by clients to create
688 // instances of this service
689 DECLARE_COMPONENT(MultiStoreSvc)
IDataManagerSvc::objectParent
virtual StatusCode objectParent(const DataObject *pObject, IRegistry *&refpParent)=0
IDataManagerSvc: Explore the object store: retrieve the object's parent.
Gaudi::Utils::AttribStringParser
Parse attribute strings allowing iteration over the various attributes.
Definition: AttribStringParser.h:30
MultiStoreSvc::objectLeaves
STATUS objectLeaves(const IRegistry *pObject, std::vector< IRegistry * > &leaves) override
Explore the object store: retrieve all leaves attached to the object.
Definition: MultiStoreSvc.cpp:158
IOpaqueAddress::par
virtual const std::string * par() const =0
Retrieve String parameters.
MultiStoreSvc::tagROOT::type
int type
Definition: MultiStoreSvc.cpp:88
Service::initialize
StatusCode initialize() override
Definition: Service.cpp:68
MultiStoreSvc::clearSubTree
STATUS clearSubTree(CSTR &path) override
Remove all data objects below the sub tree identified.
Definition: MultiStoreSvc.cpp:170
MultiStoreSvc::unregisterObject
STATUS unregisterObject(CSTR &path) override
Unregister object from the data store.
Definition: MultiStoreSvc.cpp:306
MultiStoreSvc::removePreLoadItem
STATUS removePreLoadItem(CSTR &item) override
Add an item to the preload list.
Definition: MultiStoreSvc.cpp:274
SmartIF< IDataProviderSvc >
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:324
MultiStoreSvc::tagROOT::address
ADDRESS * address
Definition: MultiStoreSvc.cpp:91
MultiStoreSvc::preLoad
STATUS preLoad() override
load all preload items of the list
Definition: MultiStoreSvc.cpp:282
std::string::empty
T empty(T...args)
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
MultiStoreSvc::m_partitions
Partitions m_partitions
Datastore partitions.
Definition: MultiStoreSvc.cpp:99
MultiStoreSvc::unlinkObject
STATUS unlinkObject(CSTR &path) override
Remove a link to another object.
Definition: MultiStoreSvc.cpp:406
MultiStoreSvc::finalize
STATUS finalize() override
Service initialisation.
Definition: MultiStoreSvc.cpp:589
MultiStoreSvc::registerAddress
STATUS registerAddress(CSTR &path, ADDRESS *pAddr) override
IDataManagerSvc: Register object address with the data store.
Definition: MultiStoreSvc.cpp:130
MultiStoreSvc::m_partitionDefs
PartitionDefs m_partitionDefs
Datastore partition definitions.
Definition: MultiStoreSvc.cpp:101
Service::finalize
StatusCode finalize() override
Definition: Service.cpp:193
IConversionSvc
Definition: IConversionSvc.h:37
MsgStream.h
IDataProviderSvc::addPreLoadItem
virtual StatusCode addPreLoadItem(const DataStoreItem &item)=0
Add an item to the preload list.
MultiStoreSvc::updateObject
STATUS updateObject(OBJECT *pObj) override
Update object.
Definition: MultiStoreSvc.cpp:418
IAddressCreator::createAddress
virtual StatusCode createAddress(long svc_type, const CLID &clid, const std::string *par, const unsigned long *ipar, IOpaqueAddress *&refpAddress)=0
Create a Generic address using explicit arguments to identify a single object.
IDataManagerSvc::clearSubTree
virtual StatusCode clearSubTree(const std::string &sub_path)=0
Remove all data objects below the sub tree identified by its full path name.
IDataProviderSvc::INVALID_ROOT
Invalid root path object cannot be retrieved or stored.
Definition: IDataProviderSvc.h:537
MultiStoreSvc::objectParent
STATUS objectParent(const OBJECT *pObject, IRegistry *&refpParent) override
IDataManagerSvc: Explore the object store: retrieve the object's parent.
Definition: MultiStoreSvc.cpp:162
MultiStoreSvc::findObject
STATUS findObject(OBJECT *parent, int item, OBJECT *&pObject) override
Find object in the data store.
Definition: MultiStoreSvc.cpp:374
MultiStoreSvc::tagROOT::tagROOT
tagROOT()
Definition: MultiStoreSvc.cpp:94
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
MultiStoreSvc::tagROOT
Definition: MultiStoreSvc.cpp:87
MultiStoreSvc::detachServices
STATUS detachServices()
Definition: MultiStoreSvc.cpp:546
IConverter::setDataProvider
virtual StatusCode setDataProvider(IDataProviderSvc *pService)=0
Set Data provider service.
IDataProviderSvc::preLoad
virtual StatusCode preLoad()=0
Load all preload items of the list.
STATUS
StatusCode STATUS
Definition: MultiStoreSvc.cpp:46
MultiStoreSvc::registerObject
STATUS registerObject(CSTR &parent, CSTR &obj, OBJECT *pObj) override
Register object with the data store.
Definition: MultiStoreSvc.cpp:290
IDataProviderSvc::resetPreLoad
virtual StatusCode resetPreLoad()=0
Clear the preload list.
MultiStoreSvc::unregisterAddress
STATUS unregisterAddress(OBJECT *pParent, CSTR &path) override
IDataManagerSvc: Unregister object address from the data store.
Definition: MultiStoreSvc.cpp:146
MultiStoreSvc::unregisterObject
STATUS unregisterObject(CSTR &parent, CSTR &obj) override
Unregister object from the data store.
Definition: MultiStoreSvc.cpp:310
MultiStoreSvc::unlinkObject
STATUS unlinkObject(OBJECT *from, CSTR &objPath) override
Remove a link to another object.
Definition: MultiStoreSvc.cpp:402
std::map::end
T end(T...args)
IOpaqueAddress::release
virtual unsigned long release()=0
release reference to object
MultiStoreSvc::create
STATUS create(CSTR &nam, CSTR &typ, IInterface *&pPartition) override
Create a partition object. The name identifies the partition uniquely.
Definition: MultiStoreSvc.cpp:436
MultiStoreSvc
Data service base class.
Definition: MultiStoreSvc.cpp:67
IDataManagerSvc::unregisterAddress
virtual StatusCode unregisterAddress(const std::string &fullPath)=0
Unregister object address from the data store.
MultiStoreSvc::findObject
STATUS findObject(CSTR &parent, int item, OBJECT *&pObject) override
Find object in the data store.
Definition: MultiStoreSvc.cpp:366
MultiStoreSvc::reinitialize
STATUS reinitialize() override
Service initialisation.
Definition: MultiStoreSvc.cpp:566
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:45
MultiStoreSvc::removePreLoadItem
STATUS removePreLoadItem(const DataStoreItem &item) override
Remove an item from the preload list.
Definition: MultiStoreSvc.cpp:270
merge_files.sc
int sc
Definition: merge_files.py:167
DataStoreItem
Description of the DataStoreItem class.
Definition: DataStoreItem.h:17
IOpaqueAddress::svcType
virtual long svcType() const =0
Retrieve service type.
std::map< std::string, Partition >
MultiStoreSvc::linkObject
STATUS linkObject(OBJECT *from, CSTR &objPath, OBJECT *to) override
Add a link to another object.
Definition: MultiStoreSvc.cpp:386
ISvcManager.h
MultiStoreSvc::m_rootName
std::string m_rootName
Name of root event.
Definition: MultiStoreSvc.cpp:78
MultiStoreSvc::m_dataLoader
SmartIF< IConversionSvc > m_dataLoader
Pointer to data loader service.
Definition: MultiStoreSvc.cpp:82
MultiStoreSvc::traverseSubTree
STATUS traverseSubTree(CSTR &path, AGENT *pAgent) override
Analyze by traversing all data objects below the sub tree.
Definition: MultiStoreSvc.cpp:198
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginService.h:36
MultiStoreSvc::create
STATUS create(CSTR &nam, CSTR &typ) override
Create a partition object. The name identifies the partition uniquely.
Definition: MultiStoreSvc.cpp:431
MultiStoreSvc::linkObject
STATUS linkObject(CSTR &from, CSTR &objPath, OBJECT *to) override
Add a link to another object.
Definition: MultiStoreSvc.cpp:382
MultiStoreSvc::setDataLoader
STATUS setDataLoader(IConversionSvc *pDataLoader, IDataProviderSvc *dpsvc=nullptr) override
IDataManagerSvc: Pass a default data loader to the service.
Definition: MultiStoreSvc.cpp:253
std::string
STL class.
MultiStoreSvc::updateObject
STATUS updateObject(CSTR &parent, CSTR &updatePath) override
Update object.
Definition: MultiStoreSvc.cpp:422
MultiStoreSvc::PartitionDefs
std::vector< std::string > PartitionDefs
Definition: MultiStoreSvc.cpp:73
IDataProviderSvc::removePreLoadItem
virtual StatusCode removePreLoadItem(const DataStoreItem &item)=0
Remove an item from the preload list.
Service.h
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
MultiStoreSvc::updateObject
STATUS updateObject(OBJECT *parent, CSTR &updatePath) override
Update object.
Definition: MultiStoreSvc.cpp:426
MultiStoreSvc::makePartitions
STATUS makePartitions()
Create all partitions according to job options.
Definition: MultiStoreSvc.cpp:664
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:78
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:319
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:118
MultiStoreSvc::retrieveObject
STATUS retrieveObject(CSTR &path, OBJECT *&pObj) override
Retrieve object identified by its full path from the data store.
Definition: MultiStoreSvc.cpp:334
IDataManagerSvc.h
IDataProviderSvc.h
MultiStoreSvc::unlinkObject
STATUS unlinkObject(IRegistry *from, CSTR &objPath) override
Remove a link to another object.
Definition: MultiStoreSvc.cpp:394
MultiStoreSvc::unregisterAddress
STATUS unregisterAddress(IRegistry *pParent, CSTR &path) override
IDataManagerSvc: Unregister object address from the data store.
Definition: MultiStoreSvc.cpp:150
GaudiPython.Bindings.SUCCESS
tuple SUCCESS
Definition: Bindings.py:51
DataObject::clID
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: DataObject.cpp:68
IDataProviderSvc::findObject
virtual StatusCode findObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Find object identified by its directory entry.
IPartitionControl.h
MultiStoreSvc::setRoot
STATUS setRoot(std::string path, OBJECT *pObj) override
Initialize data store for new event by giving new event path and root object.
Definition: MultiStoreSvc.cpp:211
IOpaqueAddress::clID
virtual const CLID & clID() const =0
Retrieve class information from link.
StatusCode::FAILURE
Definition: StatusCode.h:29
IDataManagerSvc::traverseTree
virtual StatusCode traverseTree(IDataStoreAgent *pAgent)=0
Analyse by traversing all data objects in the data store.
MultiStoreSvc::addPreLoadItem
STATUS addPreLoadItem(const DataStoreItem &item) override
Add an item to the preload list.
Definition: MultiStoreSvc.cpp:262
MultiStoreSvc::findObject
STATUS findObject(IRegistry *parent, CSTR &path, OBJECT *&pObj) override
Find object identified by its full path in the data store.
Definition: MultiStoreSvc.cpp:358
IDataProviderSvc::unregisterObject
virtual StatusCode unregisterObject(const std::string &fullPath)=0
Unregister object from the data store.
MultiStoreSvc::retrieveObject
STATUS retrieveObject(IRegistry *parent, CSTR &path, OBJECT *&pObj) override
Retrieve object from data store.
Definition: MultiStoreSvc.cpp:330
IDataProviderSvc::linkObject
virtual StatusCode linkObject(IRegistry *from, const std::string &objPath, DataObject *toObj)=0
Add a link to another object.
IService
General service interface definition.
Definition: IService.h:18
StatusCode::SUCCESS
Definition: StatusCode.h:30
MultiStoreSvc::clearSubTree
STATUS clearSubTree(OBJECT *pObject) override
Remove all data objects below the sub tree identified.
Definition: MultiStoreSvc.cpp:174
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
MultiStoreSvc::address_type
Definition: MultiStoreSvc.cpp:86
IDataProviderSvc::updateObject
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.
MultiStoreSvc::activate
STATUS activate(CSTR &nam) override
Activate a partition object. The name identifies the partition uniquely.
Definition: MultiStoreSvc.cpp:475
IInterface
Definition of the basic interface.
Definition: IInterface.h:234
MultiStoreSvc::m_root
struct MultiStoreSvc::tagROOT m_root
SmartIF.h
std::map::erase
T erase(T...args)
MultiStoreSvc::registerObject
STATUS registerObject(CSTR &path, OBJECT *pObj) override
Register object with the data store.
Definition: MultiStoreSvc.cpp:286
IRegistry
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
CSTR
const std::string CSTR
Definition: MultiStoreSvc.cpp:40
MultiStoreSvc::findObject
STATUS findObject(CSTR &parent, CSTR &path, OBJECT *&pObj) override
Find object in the data store.
Definition: MultiStoreSvc.cpp:362
OBJECT
DataObject OBJECT
Definition: MultiStoreSvc.cpp:44
MultiStoreSvc::MultiStoreSvc
MultiStoreSvc(CSTR &name, ISvcLocator *svc)
Standard Constructor.
Definition: MultiStoreSvc.cpp:602
Service::reinitialize
StatusCode reinitialize() override
Definition: Service.cpp:282
MultiStoreSvc::retrieveObject
STATUS retrieveObject(CSTR &parent, int item, OBJECT *&pObj) override
Retrieve object from data store.
Definition: MultiStoreSvc.cpp:342
MultiStoreSvc::unregisterObject
STATUS unregisterObject(OBJECT *pObj, CSTR &path) override
Unregister object from the data store.
Definition: MultiStoreSvc.cpp:322
MultiStoreSvc::linkObject
STATUS linkObject(CSTR &fullPath, OBJECT *to) override
Add a link to another object.
Definition: MultiStoreSvc.cpp:390
MultiStoreSvc::clearPartitions
STATUS clearPartitions()
Clear all partitions.
Definition: MultiStoreSvc.cpp:657
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
std::string::clear
T clear(T...args)
MultiStoreSvc::tagROOT::object
OBJECT * object
Definition: MultiStoreSvc.cpp:92
MultiStoreSvc::call_
STATUS call_(STATUS(IDataProviderSvc::*pmf)(Args...), UArgs &&...args)
Definition: MultiStoreSvc.cpp:107
std::move
T move(T...args)
MultiStoreSvc::tagROOT::root
union MultiStoreSvc::tagROOT::@1 root
MultiStoreSvc::m_loader
std::string m_loader
Data loader name.
Definition: MultiStoreSvc.cpp:80
MultiStoreSvc::rootCLID
CLID rootCLID() const override
IDataManagerSvc: Accessor for root event CLID.
Definition: MultiStoreSvc.cpp:121
MultiStoreSvc::rootName
const std::string & rootName() const override
Name for root Event.
Definition: MultiStoreSvc.cpp:125
MultiStoreSvc::m_current
Partition m_current
Current partition.
Definition: MultiStoreSvc.cpp:97
MultiStoreSvc::unregisterAddress
STATUS unregisterAddress(CSTR &path) override
IDataManagerSvc: Unregister object address from the data store.
Definition: MultiStoreSvc.cpp:142
Gaudi::Utils::Histos::path
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
Definition: HistoTableFormat.cpp:191
IOpaqueAddress.h
MultiStoreSvc::retrieveObject
STATUS retrieveObject(OBJECT *parent, CSTR &path, OBJECT *&pObj) override
Retrieve object from data store.
Definition: MultiStoreSvc.cpp:346
MultiStoreSvc::preparePartitions
STATUS preparePartitions()
Prepare partition for usage.
Definition: MultiStoreSvc.cpp:621
MultiStoreSvc::objectLeaves
STATUS objectLeaves(const OBJECT *pObject, std::vector< IRegistry * > &leaves) override
Explore the object store: retrieve all leaves attached to the object.
Definition: MultiStoreSvc.cpp:154
MultiStoreSvc::unregisterObject
STATUS unregisterObject(OBJECT *pObj) override
Unregister object from the data store.
Definition: MultiStoreSvc.cpp:318
MultiStoreSvc::setRoot
STATUS setRoot(std::string path, ADDRESS *pAddr) override
Initialize data store for new event by giving new event path and address of root object.
Definition: MultiStoreSvc.cpp:231
IDataManagerSvc::objectLeaves
virtual StatusCode objectLeaves(const DataObject *pObject, std::vector< IRegistry * > &refLeaves)=0
Explore the object store: retrieve all leaves attached to the object The object is identified by its ...
DataObject::release
virtual unsigned long release()
release reference to object
Definition: DataObject.cpp:56
MultiStoreSvc::resetPreLoad
STATUS resetPreLoad() override
Clear the preload list.
Definition: MultiStoreSvc.cpp:278
std::map::find
T find(T...args)
MultiStoreSvc::unregisterObject
STATUS unregisterObject(OBJECT *pObj, int item) override
Unregister object from the data store.
Definition: MultiStoreSvc.cpp:326
MultiStoreSvc::initialize
STATUS initialize() override
Service initialisation.
Definition: MultiStoreSvc.cpp:553
std::vector< std::string >
IDataStoreAgent
Generic data agent interface.
Definition: IDataStoreAgent.h:16
MultiStoreSvc::drop
STATUS drop(CSTR &nam) override
Drop a partition object. The name identifies the partition uniquely.
Definition: MultiStoreSvc.cpp:449
gaudirun.args
list args
Definition: gaudirun.py:290
IAddressCreator.h
IConversionSvc.h
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
IDataManagerSvc
Definition: IDataManagerSvc.h:45
std::begin
T begin(T...args)
IDataProviderSvc::unlinkObject
virtual StatusCode unlinkObject(IRegistry *from, const std::string &objPath)=0
Remove a link to another object.
MultiStoreSvc::activate
STATUS activate(IInterface *pPartition) override
Activate a partition object.
Definition: MultiStoreSvc.cpp:486
MultiStoreSvc::object_type
Definition: MultiStoreSvc.cpp:86
MultiStoreSvc::addPreLoadItem
STATUS addPreLoadItem(CSTR &item) override
Add an item to the preload list.
Definition: MultiStoreSvc.cpp:266
MultiStoreSvc::activePartition
StatusCode activePartition(std::string &nam, IInterface *&pPartition) const override
Access the active partition object.
Definition: MultiStoreSvc.cpp:511
MultiStoreSvc::m_addrCreator
SmartIF< IAddressCreator > m_addrCreator
Reference to address creator.
Definition: MultiStoreSvc.cpp:84
MultiStoreSvc::registerObject
STATUS registerObject(OBJECT *parent, CSTR &obj, OBJECT *pObj) override
Register object with the data store.
Definition: MultiStoreSvc.cpp:298
std::map::emplace
T emplace(T...args)
MultiStoreSvc::m_rootCLID
CLID m_rootCLID
Integer Property corresponding to CLID of root entry.
Definition: MultiStoreSvc.cpp:76
TypeNameString.h
ana.item
tuple item
print s1,s2
Definition: ana.py:146
AttribStringParser.h
CommonMessaging
Definition: CommonMessaging.h:58
MultiStoreSvc::retrieveObject
STATUS retrieveObject(OBJECT *parent, int item, OBJECT *&pObj) override
Retrieve object from data store.
Definition: MultiStoreSvc.cpp:350
MultiStoreSvc::findObject
STATUS findObject(CSTR &path, OBJECT *&pObj) override
Find object identified by its full path in the data store.
Definition: MultiStoreSvc.cpp:354
MultiStoreSvc::retrieveObject
STATUS retrieveObject(CSTR &parent, CSTR &path, OBJECT *&pObj) override
Retrieve object from data store.
Definition: MultiStoreSvc.cpp:338
MultiStoreSvc::linkObject
STATUS linkObject(IRegistry *from, CSTR &objPath, OBJECT *to) override
Add a link to another object.
Definition: MultiStoreSvc.cpp:378
Service::service
StatusCode service(const std::string &name, const T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: Service.h:144
MultiStoreSvc::updateObject
STATUS updateObject(CSTR &path) override
Update object.
Definition: MultiStoreSvc.cpp:414
SmartIF::reset
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:88
IDataManagerSvc::registerAddress
virtual StatusCode registerAddress(const std::string &fullPath, IOpaqueAddress *pAddress)=0
Register object address with the data store.
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
MultiStoreSvc::unregisterObject
STATUS unregisterObject(CSTR &parent, int obj) override
Unregister object from the data store.
Definition: MultiStoreSvc.cpp:314
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:108
Service::declareProperty
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Service.h:215
ADDRESS
IOpaqueAddress ADDRESS
Definition: MultiStoreSvc.cpp:45
IDataProviderSvc::registerObject
virtual StatusCode registerObject(const std::string &fullPath, DataObject *pObject)=0
Register object with the data store.
MultiStoreSvc::traverseSubTree
STATUS traverseSubTree(OBJECT *pObject, AGENT *pAgent) override
IDataManagerSvc: Analyze by traversing all data objects below the sub tree.
Definition: MultiStoreSvc.cpp:202
IDataManagerSvc::traverseSubTree
virtual StatusCode traverseSubTree(const std::string &sub_path, IDataStoreAgent *pAgent)=0
Analyse by traversing all data objects below the sub tree identified by its full path name...
MultiStoreSvc::call_
STATUS call_(STATUS(IDataManagerSvc::*pmf)(Args...), UArgs &&...args)
Definition: MultiStoreSvc.cpp:113
MultiStoreSvc::Partitions
std::map< std::string, Partition > Partitions
Definition: MultiStoreSvc.cpp:74
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
MultiStoreSvc::clearStore
STATUS clearStore() override
IDataManagerSvc: Remove all data objects in the data store.
Definition: MultiStoreSvc.cpp:178
ana.i
list i
Definition: ana.py:128
MultiStoreSvc::m_defaultPartition
std::string m_defaultPartition
Default partition.
Definition: MultiStoreSvc.cpp:103
MultiStoreSvc::registerObject
STATUS registerObject(CSTR &parent, int item, OBJECT *pObj) override
Register object with the data store.
Definition: MultiStoreSvc.cpp:294
MultiStoreSvc::registerAddress
STATUS registerAddress(OBJECT *parent, CSTR &path, ADDRESS *pAddr) override
IDataManagerSvc: Register object address with the data store.
Definition: MultiStoreSvc.cpp:134
MultiStoreSvc::registerAddress
STATUS registerAddress(IRegistry *parent, CSTR &path, ADDRESS *pAdd) override
IDataManagerSvc: Register object address with the data store.
Definition: MultiStoreSvc.cpp:138
MultiStoreSvc::updateObject
STATUS updateObject(IRegistry *pDirectory) override
Update object identified by its directory entry.
Definition: MultiStoreSvc.cpp:410
ISvcLocator.h
MultiStoreSvc::unlinkObject
STATUS unlinkObject(CSTR &from, CSTR &objPath) override
Remove a link to another object.
Definition: MultiStoreSvc.cpp:398
IOpaqueAddress::ipar
virtual const unsigned long * ipar() const =0
Access to generic link parameters.
MultiStoreSvc::findObject
STATUS findObject(OBJECT *parent, CSTR &path, OBJECT *&pObject) override
Find object in the data store.
Definition: MultiStoreSvc.cpp:370
toupper
void toupper(std::string &s)
Definition: StatusCodeSvc.cpp:10
MultiStoreSvc::drop
STATUS drop(IInterface *pPartition) override
Drop a partition object. The name identifies the partition uniquely.
Definition: MultiStoreSvc.cpp:461
MultiStoreSvc::traverseTree
STATUS traverseTree(AGENT *pAgent) override
IDataManagerSvc: Analyze by traversing all data objects in the data store.
Definition: MultiStoreSvc.cpp:206
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
AGENT
IDataStoreAgent AGENT
Definition: MultiStoreSvc.cpp:43
MultiStoreSvc::tagROOT::path
std::string path
Definition: MultiStoreSvc.cpp:89
MultiStoreSvc::objectParent
STATUS objectParent(const IRegistry *pObject, IRegistry *&refpParent) override
IDataManagerSvc: Explore the object store: retrieve the object's parent.
Definition: MultiStoreSvc.cpp:166
DataObject.h
MultiStoreSvc::attachServices
STATUS attachServices()
Definition: MultiStoreSvc.cpp:522
MultiStoreSvc::registerObject
STATUS registerObject(OBJECT *parent, int obj, OBJECT *pObj) override
Register object with the data store.
Definition: MultiStoreSvc.cpp:302
MultiStoreSvc::~MultiStoreSvc
~MultiStoreSvc() override
Standard Destructor.
Definition: MultiStoreSvc.cpp:613
MultiStoreSvc::no_type
Definition: MultiStoreSvc.cpp:86
IOpaqueAddress::addRef
virtual unsigned long addRef()=0
Add reference to object.
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.