Diana Software
Public Member Functions | Private Attributes | List of all members
QEventAssembler Class Reference

Visitor class of QEvent that provides full handling of QEvent. More...

Public Member Functions

 QEventAssembler ()
 constructor More...
 
 QEventAssembler (const QEventAssembler &)
 copy constructor (copies also the underlying QEvent) More...
 
 ~QEventAssembler ()
 destructor More...
 
const QEventAssembleroperator= (const QEventAssembler &)
 operator= (copies also the underlying QEvent) More...
 
QEventGetEvent ()
 Get the QEvent. More...
 
const QEventGetEvent () const
 Get the QEvent (const version. More...
 
void SetReadNumber (const unsigned int readNumber)
 set the event number as read by the current QReader (calls QEvent::SetReadNumber()) More...
 
void SetOverWrite (const bool ow=true)
 set that all the QEvent QObject (s) can be overwritten (calls QEvent::SetOverWrite()) More...
 
void SetOwner (const std::string *owner)
 set the module that is currently acting on the QEvent calls (QEvent::SetOwner()) More...
 
template<typename Q >
void Add (const char *owner, WriteHandle< Q > &handle)
 Add QObject to the event. This method has to be called before the event loop, e.g. in the Init() method of a module. More...
 
template<typename Q >
Q & Add (const char *owner, const char *name)
 Add QObject to the event. This method has to be called before the event loop, e.g. in the Init() method of a module. More...
 
void Add (const char *owner, const char *name, QObject **evData)
 Add QObject to the event. This method has to be called before the event loop, e.g. in the Init() method of a module. More...
 
template<typename Q >
void Get (const char *owner, WriteHandle< Q > &handle)
 Get QObject from the event in write mode. This method has to be called in the event loop, e.g. in the Do() method of a module. More...
 
template<typename Q >
Q & Get (const char *owner, const char *name)
 Get QObject from the event in write mode. This method has to be called in the event loop, e.g. in the Do() method of a module. More...
 
void Assign (const QEvent &ev)
 copies the underlying QEvent (calls QEvent::operator=) More...
 
void Clear ()
 clear the underlying QEvent (calls QEvent::Clear()) More...
 
std::vector< QEventLabelGetLabels () const
 Get the list of all QObject labels in the event. More...
 
QObject ** Get (const char *owner, const char *name) const
 Get the QObject Address. More...
 
std::vector< QEventLabelGetWriteLabels () const
 Get the list of all writable QObject labels. More...
 
std::vector< QEventLabelGetRequiredLabels (const std::string &owner="all") const
 Get the list of all required QObject labels. More...
 
void SetRequiredLabels (const std::vector< QEventLabel > &labels, bool incremental=true)
 set which QObjects are required. If incremental = false, labels not in the vector are set to not required
More...
 
void Consolidate ()
 Consolidate QEvent. More...
 
const QAliasesGetAliases () const
 get aliases (const version) More...
 
QAliasesGetAliases ()
 get aliases More...
 
template<typename Q >
bool Contains (const char *owner, const char *name) const
 Check to see if the event contains a particular object. More...
 
template<typename Q >
bool Contains (const char *label) const
 Check to see if the event contains a particular object. More...
 

Private Attributes

QEvent fEvent
 the QEvent object. More...
 

Detailed Description

Visitor class of QEvent that provides full handling of QEvent.

Author
Marco Vignati

By creating an object of this class, a new QEvent will be created as member of the object. The interfaces of this class provides full handling of the QEvent, accessing the protected methods of QEvent. All the Add/Get methods defined here allows to specify not only the name of the object, but also the owner. The underlying QEvent object can be retreived using the GetEvent() method.

Definition at line 21 of file QEventAssembler.hh.

Constructor & Destructor Documentation

◆ QEventAssembler() [1/2]

Q_BEGIN_NAMESPACE QEventAssembler::QEventAssembler ( )

constructor

Definition at line 5 of file QEventAssembler.cc.

References QEvent::Clear(), and fEvent.

◆ QEventAssembler() [2/2]

QEventAssembler::QEventAssembler ( const QEventAssembler other)

copy constructor (copies also the underlying QEvent)

Definition at line 10 of file QEventAssembler.cc.

References fEvent.

◆ ~QEventAssembler()

QEventAssembler::~QEventAssembler ( )
inline

destructor

Definition at line 31 of file QEventAssembler.hh.

Member Function Documentation

◆ Add() [1/3]

template<typename Q >
Q& QEventAssembler::Add ( const char *  owner,
const char *  name 
)
inline

Add QObject to the event. This method has to be called before the event loop, e.g. in the Init() method of a module.

Definition at line 63 of file QEventAssembler.hh.

References QEvent::Add(), and fEvent.

◆ Add() [2/3]

void QEventAssembler::Add ( const char *  owner,
const char *  name,
QObject **  evData 
)
inline

Add QObject to the event. This method has to be called before the event loop, e.g. in the Init() method of a module.

Definition at line 72 of file QEventAssembler.hh.

References QEvent::Add(), and fEvent.

◆ Add() [3/3]

template<typename Q >
void QEventAssembler::Add ( const char *  owner,
WriteHandle< Q > &  handle 
)
inline

Add QObject to the event. This method has to be called before the event loop, e.g. in the Init() method of a module.

Definition at line 54 of file QEventAssembler.hh.

References QEvent::Add(), and fEvent.

Referenced by QRootFileReaderBase::AddToEvent(), QReader::Begin(), QCreateSidePulseByPulseSplitting::Init(), MNeighboursPacker::Init(), and MQinoDataReader::Init().

◆ Assign()

void QEventAssembler::Assign ( const QEvent ev)
inline

◆ Clear()

void QEventAssembler::Clear ( )
inline

◆ Consolidate()

void QEventAssembler::Consolidate ( )
inline

Consolidate QEvent.

Definition at line 131 of file QEventAssembler.hh.

References QEvent::Consolidate(), and fEvent.

Referenced by QNeighboursFiller::Do(), and QSequence::Run().

◆ Contains() [1/2]

template<typename Q >
bool QEventAssembler::Contains ( const char *  label) const
inline

Check to see if the event contains a particular object.

Definition at line 144 of file QEventAssembler.hh.

References QEvent::Contains(), and fEvent.

◆ Contains() [2/2]

template<typename Q >
bool QEventAssembler::Contains ( const char *  owner,
const char *  name 
) const
inline

Check to see if the event contains a particular object.

Definition at line 139 of file QEventAssembler.hh.

References QEvent::Contains(), and fEvent.

Referenced by QEventInspector::Contains().

◆ Get() [1/3]

template<typename Q >
Q& QEventAssembler::Get ( const char *  owner,
const char *  name 
)
inline

Get QObject from the event in write mode. This method has to be called in the event loop, e.g. in the Do() method of a module.

Definition at line 90 of file QEventAssembler.hh.

References WriteHandle< T >::Get(), and Get().

◆ Get() [2/3]

QObject** QEventAssembler::Get ( const char *  owner,
const char *  name 
) const
inline

Get the QObject Address.

Definition at line 116 of file QEventAssembler.hh.

References fEvent, and QEvent::GetObject().

◆ Get() [3/3]

template<typename Q >
void QEventAssembler::Get ( const char *  owner,
WriteHandle< Q > &  handle 
)
inline

◆ GetAliases() [1/2]

QAliases& QEventAssembler::GetAliases ( )
inline

get aliases

Definition at line 136 of file QEventAssembler.hh.

References fEvent, and QEvent::GetAliases().

◆ GetAliases() [2/2]

const QAliases& QEventAssembler::GetAliases ( ) const
inline

get aliases (const version)

Definition at line 134 of file QEventAssembler.hh.

References fEvent, and QEvent::GetAliases().

Referenced by QEventInspector::GetAliases(), MNeighboursPacker::Init(), MRootFileReader::Init(), and QNeighboursFiller::Init().

◆ GetEvent() [1/2]

QEvent& QEventAssembler::GetEvent ( )
inline

◆ GetEvent() [2/2]

const QEvent& QEventAssembler::GetEvent ( ) const
inline

Get the QEvent (const version.

Definition at line 40 of file QEventAssembler.hh.

References fEvent.

◆ GetLabels()

std::vector<QEventLabel> QEventAssembler::GetLabels ( ) const
inline

Get the list of all QObject labels in the event.

Definition at line 110 of file QEventAssembler.hh.

References fEvent, and QEvent::GetLabels().

Referenced by QRootFileReaderBase::GetBranches(), QEventInspector::GetLabels(), and MNeighboursPacker::Init().

◆ GetRequiredLabels()

std::vector< QEventLabel > QEventAssembler::GetRequiredLabels ( const std::string &  owner = "all") const

Get the list of all required QObject labels.

Definition at line 35 of file QEventAssembler.cc.

References fEvent, Get(), QEvent::GetLabels(), QObject::IsRequired(), QEventLabel::name, and QEventLabel::owner.

Referenced by QBaseModule::BeginBase().

◆ GetWriteLabels()

std::vector< QEventLabel > QEventAssembler::GetWriteLabels ( ) const

Get the list of all writable QObject labels.

Definition at line 20 of file QEventAssembler.cc.

References fEvent, Get(), QEvent::GetLabels(), QObject::GetWrite(), QEventLabel::name, and QEventLabel::owner.

Referenced by QEventInspector::GetWriteLabels(), and MQPulseManager::Init().

◆ operator=()

const QEventAssembler & QEventAssembler::operator= ( const QEventAssembler other)

operator= (copies also the underlying QEvent)

Definition at line 14 of file QEventAssembler.cc.

References fEvent.

◆ SetOverWrite()

void QEventAssembler::SetOverWrite ( const bool  ow = true)
inline

set that all the QEvent QObject (s) can be overwritten (calls QEvent::SetOverWrite())

Definition at line 46 of file QEventAssembler.hh.

References fEvent, and QEvent::SetOverWrite().

Referenced by QBaseModule::BeginBase().

◆ SetOwner()

void QEventAssembler::SetOwner ( const std::string *  owner)
inline

set the module that is currently acting on the QEvent calls (QEvent::SetOwner())

Definition at line 49 of file QEventAssembler.hh.

References fEvent, and QEvent::SetOwner().

Referenced by QBaseModule::BeginBase(), and QBaseModule::ProcessBase().

◆ SetReadNumber()

void QEventAssembler::SetReadNumber ( const unsigned int  readNumber)
inline

set the event number as read by the current QReader (calls QEvent::SetReadNumber())

Definition at line 43 of file QEventAssembler.hh.

References fEvent, and QEvent::SetReadNumber().

Referenced by QReader::DoBase().

◆ SetRequiredLabels()

void QEventAssembler::SetRequiredLabels ( const std::vector< QEventLabel > &  labels,
bool  incremental = true 
)

set which QObjects are required. If incremental = false, labels not in the vector are set to not required

Definition at line 52 of file QEventAssembler.cc.

References fEvent, Get(), QEvent::GetLabels(), QEventLabel::name, QEventLabel::owner, and QObject::SetIsRequired().

Referenced by QBaseModule::BeginBase().

Member Data Documentation

◆ fEvent

QEvent QEventAssembler::fEvent
private

The documentation for this class was generated from the following files: