CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ora::QueryableVectorUpdater Class Reference

#include <QueryableVectorStreamer.h>

Inheritance diagram for ora::QueryableVectorUpdater:
ora::IRelationalUpdater

Public Member Functions

bool build (DataElement &offset, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
 
 QueryableVectorUpdater (const edm::TypeWithDict &objectType, MappingElement &mapping, ContainerSchema &contSchema)
 Constructor. More...
 
void setRecordId (const std::vector< int > &identity)
 
void update (int oid, const void *data)
 Updates a data element. More...
 
virtual ~QueryableVectorUpdater ()
 
- Public Member Functions inherited from ora::IRelationalUpdater
virtual ~IRelationalUpdater ()
 

Private Attributes

DataElement m_localElement
 
edm::TypeWithDict m_objectType
 
DataElementm_offset
 
PVectorUpdater m_updater
 

Detailed Description

Definition at line 39 of file QueryableVectorStreamer.h.

Constructor & Destructor Documentation

ora::QueryableVectorUpdater::QueryableVectorUpdater ( const edm::TypeWithDict objectType,
MappingElement mapping,
ContainerSchema contSchema 
)

Constructor.

Definition at line 390 of file QueryableVectorStreamer.cc.

392  :
393  m_objectType( objectType ),
394  m_offset( 0 ),
395  m_localElement(),
396  m_updater( ClassUtils::containerSubType(objectType,"store_base_type"), mapping, contSchema ){
397 }
edm::TypeWithDict containerSubType(const edm::TypeWithDict &typ, const std::string &subTypeName)
Definition: ClassUtils.cc:468
ora::QueryableVectorUpdater::~QueryableVectorUpdater ( )
virtual

Definition at line 399 of file QueryableVectorStreamer.cc.

399  {
400 }

Member Function Documentation

bool ora::QueryableVectorUpdater::build ( DataElement offset,
IRelationalData relationalData,
RelationalBuffer operationBuffer 
)
virtual

Implements ora::IRelationalUpdater.

Definition at line 402 of file QueryableVectorStreamer.cc.

References hltrates_dqm_sourceclient-live_cfg::offset.

Referenced by psClasses.BuildThread::run().

404  {
405  m_offset = &offset;
407  return m_updater.build( m_localElement, relationalData, operationBuffer );
408 }
bool build(DataElement &offset, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
void ora::QueryableVectorUpdater::setRecordId ( const std::vector< int > &  identity)
virtual

Implements ora::IRelationalUpdater.

Definition at line 410 of file QueryableVectorStreamer.cc.

410  {
411  m_updater.setRecordId( identity );
412 }
void setRecordId(const std::vector< int > &identity)
void ora::QueryableVectorUpdater::update ( int  oid,
const void *  data 
)
virtual

Updates a data element.

Implements ora::IRelationalUpdater.

Definition at line 414 of file QueryableVectorStreamer.cc.

References ora::throwException().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), python.seqvaluedict.seqdict::__setslice__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), python.seqvaluedict.seqdict::extend(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

415  {
416  if(!m_offset){
417  throwException("The streamer has not been built.",
418  "QueryableVectorUpdater::update");
419  }
420  void* vectorAddress = m_offset->address( data );
421  edm::ObjectWithDict vectorObj( m_objectType,const_cast<void*>(vectorAddress));
422  m_objectType.functionMemberByName("load").invoke(vectorObj, nullptr);
423  void* storageAddress = nullptr;
424  edm::ObjectWithDict storAddObj = edm::ObjectWithDict( edm::TypeWithDict(typeid(void*)), &storageAddress );
425  m_objectType.functionMemberByName("storageAddress").invoke(vectorObj, &storAddObj);
426  m_updater.update( oid, storageAddress );
427 }
void * address(const void *topLevelAddress) const
Definition: DataElement.cc:49
void update(int oid, const void *data)
Updates a data element.
void invoke(ObjectWithDict const &obj, ObjectWithDict *ret=nullptr, std::vector< void * > const &values=std::vector< void * >()) const
Call a member function.
FunctionWithDict functionMemberByName(std::string const &) const
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
Definition: Exception.cc:10

Member Data Documentation

DataElement ora::QueryableVectorUpdater::m_localElement
private

Definition at line 54 of file QueryableVectorStreamer.h.

edm::TypeWithDict ora::QueryableVectorUpdater::m_objectType
private

Definition at line 52 of file QueryableVectorStreamer.h.

DataElement* ora::QueryableVectorUpdater::m_offset
private

Definition at line 53 of file QueryableVectorStreamer.h.

PVectorUpdater ora::QueryableVectorUpdater::m_updater
private

Definition at line 56 of file QueryableVectorStreamer.h.