6 #include <boost/algorithm/string.hpp> 7 #include <boost/tokenizer.hpp> 27 typedef boost::tokenizer<boost::char_separator<char>> tokenizer;
28 boost::char_separator<char> sep(
"|" );
29 tokenizer tokens( prop, sep );
30 int nToks( distance( tokens.begin(), tokens.end() ) );
31 auto it = tokens.begin();
33 if ( nToks < 3 || nToks > 4 ) {
34 std::cerr <<
"Unable to instantiante DataObjectHandle from Property: " << s <<
" :: Format is bad" 40 boost::erase_all( k,
"'" );
41 boost::erase_all( k,
"(" );
42 boost::erase_all( k,
")" );
49 if ( v.
mode() !=
m ) {
50 std::cerr <<
"ERROR: mismatch in access mode for DataObjectHandle " << v.
fullKey() <<
" " << v.
mode() <<
" " 67 boost::char_separator<char> sep2(
"&" );
68 tokenizer tok2( alt, sep2 );
70 for (
auto it2 : tok2 ) {
120 return "DataObjectHandleBase(\"" +
toString() +
"\")";
164 return destination.
assign( *
this );
bool load(Property &destination) const override
virtual void setKey(const DataObjID &key)
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
DataObjectHandleProperty & operator=(const DataObjectHandleBase &value)
DataObjectHandleBase * m_pValue
Pointer to the real property.
virtual bool assign(const PropertyBase &source)=0
import the property value form the source
The declaration of major parsing functions used e.g for (re)implementation of new extended properties...
bool isSuccess() const
Test for a status code of SUCCESS.
virtual Mode mode() const
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
void setOptional(bool optional=true)
virtual std::string toString() const =0
value -> string
virtual ~DataObjectHandleProperty()
bool assign(const Property &source) override
DataObjectHandleProperty.h GaudiKernel/DataObjectHandleProperty.h.
Helper class to simplify the migration old properties deriving directly from PropertyBase.
void toStream(std::ostream &out) const override
value -> stream
DataObjectHandleProperty * clone() const override
clones the current property
virtual const DataObjID & fullKey() const
DataObjectHandleProperty(const std::string &name, DataObjectHandleBase &ref)
This class is used for returning status codes from appropriate routines.
bool useUpdateHandler() override
use the call-back function at update, if available
const std::string pythonRepr() const
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
void useReadHandler() const
use the call-back function at reading, if available
bool setValue(const DataObjectHandleBase &value)
StatusCode fromString(const std::string &s) override
string -> value
DataObjectHandleBase GaudiKernel/DataObjectHandleBase.h.
const DataObjectHandleBase & value() const
Helper functions to set/get the application return code.
const std::vector< std::string > & alternativeDataProductNames() const
void setAlternativeDataProductNames(const std::vector< std::string > &alternativeAddresses)
std::string toString() const override
value -> string