 |
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include "GaudiKernel/IMessageSvc.h"
11 #include "GaudiKernel/MsgStream.h"
12 #include "GaudiKernel/ISvcLocator.h"
15 #include "GaudiKernel/IClassIDSvc.h"
28 const std::string&
name,
29 const IInterface*
parent) :
31 m_pCLIDSvc(
"ClassIDSvc",
name)
46 std::vector< std::string >::const_iterator
52 assert( !
item.empty() );
56 std::cout <<
"Folder::decodeItem("<<
item<<
") called" << std::endl;
58 std::string::size_type
sep(
item.rfind(
'#'));
61 if (
sep != std::string::npos) skey =
item.substr(
sep+1);
69 }
else add(clid, skey, checkValid,
false).ignore();
76 if (tn.size() > 0 && tn[tn.size()-1] ==
'!') {
78 tn.erase (tn.end()-1);
85 if (
sc.isSuccess())
sc=
add(clid, skey,
false, exact);
88 log << MSG::ERROR <<
"add: can not find type ["
96 bool checkValid,
bool exact)
99 if ( !checkValid ||
m_pCLIDSvc->isIDInUse(clid) ) {
101 sc = StatusCode::SUCCESS;
102 }
else if (0 != clid) {
104 log << MSG::ERROR <<
"add: can not find clid "
105 << clid <<
" in clid db" <<
endmsg;
107 #ifdef SGFOLDER_DEBUG
108 std::cout <<
"SG::Folder::add(" << clid <<
",\"" << skey <<
"\") returns "
109 << (
sc.isSuccess() ?
"SUCCESS" :
"FAILURE") << std::endl;
a run-time configurable list of data objects
virtual ~Folder() override
virtual void updateItemList(bool checkValidCLID) override final
update contents of the ItemList
ServiceHandle< IClassIDSvc > m_pCLIDSvc
StringArrayProperty m_itemList
msgSvc
Provide convenience handles for various services.
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
Folder(const std::string &type, const std::string &name, const IInterface *parent)
::StatusCode StatusCode
StatusCode definition for legacy code.
uint32_t CLID
The Class ID type.
virtual StatusCode add(const std::string &typeName, const std::string &skey) override
add a data object identifier to the list.
virtual StatusCode initialize() override
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
void decodeItem(const std::string &item, bool checkValidCLID)
a Folder item (data object) is identified by the clid/key pair