15template<
class U,
class T>
23template<
class U,
class T>
33template<
class U,
class T>
37 std::map<TString, const VQwHardwareChannel*>::const_iterator iter1 =
56 QwError <<
"PublishByRequest succeeded, but can't find the record for "
67template<
class U,
class T>
70 Bool_t foundit = kFALSE;
74 QwWarning <<
"MQwPublishable::ReturnInternalValue requires that "
75 <<
"'value' be a non-null pointer to a VQwHardwareChannel."
80 if (value && internal_value) {
84 QwWarning <<
"MQwPublishable::ReturnInternalValue: name \""
91template<
class U,
class T>
110template<
class U,
class T>
113 Bool_t status = kFALSE;
115 QwDebug <<
"MQwPublishable::PublishByRequest: Channel "
116 << device_name <<
" has already been published."
121 U* u =
dynamic_cast<U*
>(
this);
122 if (not u->empty()) {
123 for (
auto subsys = u->begin(); subsys != u->end(); ++subsys)
125 status = (*subsys)->PublishByRequest(device_name);
130 QwDebug <<
"MQwPublishable::PublishByRequest: Failed to publish channel name: "
140template<
class U,
class T>
144 std::map<TString,TString>::const_iterator iter;
154template<
class U,
class T>
157 return fParent->RequestExternalValue(name,value);
162template<
class U,
class T>
165 return fParent->RequestExternalPointer(name);
171template<
class U,
class T>
179 if (fParent->PublishInternalValue(name, desc, fSelf, element) == kFALSE) {
180 QwError <<
"Could not publish variable " << name
181 <<
" in from object " << fSelf->GetName() <<
"!" <<
QwLog::endl;
Definition of the pure virtual base class of all subsystems.
#define QwOut
Predefined log drain for explicit output.
#define QwError
Predefined log drain for errors.
#define QwWarning
Predefined log drain for warnings.
#define QwDebug
Predefined log drain for debugging output.
Array container for managing multiple subsystems.
Virtual base class for data handlers accessing multiple subsystems.
Array container for managing multiple data handlers.
Mix-in for objects that can publish/request variables via a parent container.
Bool_t RequestExternalValue(const TString &name, VQwHardwareChannel *value) const
Retrieve the variable name from other subsystem arrays Get the value corresponding to some variable n...
Bool_t PublishInternalValue(const TString name, const TString desc, const VQwHardwareChannel *element) const
Publish a variable from this child into the parent container.
const VQwHardwareChannel * RequestExternalPointer(const TString &name) const
Retrieve a pointer to an external variable by name Requests a direct pointer to a variable from sibli...
Mix-in for container classes that manage variable publishing.
Bool_t PublishInternalValue(const TString name, const TString desc, const T *subsys, const VQwHardwareChannel *element)
Publish an internal variable from a subsystem Registers a variable from one of the contained subsyste...
virtual Bool_t PublishByRequest(TString device_name)
Try to publish an internal variable on demand Called internally when a variable is requested but not ...
void ListPublishedValues() const
List all published variables with descriptions Prints a summary of all currently published variables ...
std::map< TString, const T * > fPublishedValuesSubsystem
MQwPublishable()
Default constructor Initializes empty variable publishing maps.
std::map< TString, const VQwHardwareChannel * > fPublishedValuesDataElement
Published values.
Bool_t RequestExternalValue(const TString &name, VQwHardwareChannel *value) const
Retrieve a variable value from external sources by copying Searches for the named variable in externa...
std::map< TString, TString > fPublishedValuesDescription
const VQwHardwareChannel * RequestExternalPointer(const TString &name) const
Retrieve a direct pointer to an external variable Searches for the named variable in external subsyst...
virtual const VQwHardwareChannel * ReturnInternalValue(const TString &name) const
Retrieve an internal variable by name (pointer version) Searches for the named variable among publish...
static std::ostream & endl(std::ostream &)
End of the line.
Abstract base for concrete hardware channels implementing dual-operator pattern.
void AssignValueFrom(const VQwDataElement *valueptr) override=0