PXL
Public Member Functions | Static Public Member Functions
pxl::EventView Class Reference

By inheritance from pxl::ObjectManager, this class is capable of holding the complete information of one multicollision event with decay trees, spatial vertex information, four-momenta as well as additional event-related reconstruction data in the user records. More...

#include <EventView.hh>

+ Inheritance diagram for pxl::EventView:
+ Collaboration diagram for pxl::EventView:

Public Member Functions

virtual Serializableclone () const
 Creates a deep copy and returns a C++ pointer to the newly-created object. More...
 
virtual WkPtrBasecreateSelfWkPtr ()
 Creates a weak pointer to itself and returns a pxl::WkPtrBase* to the newly-created weak pointer instance. More...
 
virtual void deserialize (const InputStream &in)
 This method deserializes this object. More...
 
 EventView ()
 
 EventView (const EventView &original)
 This copy constructor provides a deep copy of the event container original with all data members, hep objects, and their (redirected) relations. More...
 
 EventView (const EventView *original)
 This copy constructor provides a deep copy of the event container original with all data members, hep objects, and their (redirected) relations. More...
 
virtual const IdgetTypeId () const
 Returns the unique ID of this class. More...
 
virtual std::ostream & print (int level=0, std::ostream &os=std::cout, int pan=1) const
 Prints out object state information on various verbosity levels. More...
 
virtual void serialize (const OutputStream &out) const
 This method serializes this object by serializing the type ID and the unique object ID. More...
 
- Public Member Functions inherited from pxl::ObjectManager
void clearCopyHistory ()
 Clears the copy history (created by the copy constructor). More...
 
void clearIndex ()
 Clears the index; please notice: it does not remove the objects themself. More...
 
void clearObjects ()
 Clears the object owner and deletes all owned objects. More...
 
template<class datatype >
datatype * create ()
 Creates a new instance of objecttype; objecttype must be a class inheriting from pxl::Relative; the newly-created instance is owned and will be deleted by the object owner. More...
 
template<class datatype >
datatype * createIndexed (const std::string &key)
 Acts like create() and registers the newly-created instance under key in the index. More...
 
template<class objecttype >
objecttype * findCopyOf (const Relative *original) const
 Searches the copy history to locate the copy of original and returns a dynamically casted C++ pointer of type objecttype* to the corresponding copy; in case no copy can be traced a null pointer is returned. More...
 
template<class objecttype >
objecttype * findObject (const std::string key) const
 Searches the index for the key and returns a dynamically casted C++ pointer of type objecttype* to the corresponding object; in case key is not found a null pointer is returned. More...
 
const std::map< Id, Relative * > & getCopyHistory () const
 Provides direct access to the copy history (created by the copy constructor). More...
 
const std::map< std::string,
Relative * > & 
getIndex () const
 Provides direct access to the index. More...
 
ObjectOwnergetObjectOwner ()
 Provides access to the object owner. More...
 
const ObjectOwnergetObjectOwner () const
 Provides const access to the object owner. More...
 
const std::vector< Relative * > & getObjects () const
 Returns a const reference to the underlying vector with pointers to all contained objects. More...
 
template<class objecttype >
void getObjectsOfType (std::vector< objecttype * > &vec) const
 Inserts pointer references to all objects which have the type of the template argument (or inherit from it) into the passed vector, which has to be a vector of pointers to the template argument class. More...
 
void insertObject (Relative *obj)
 Inserts obj in the container of the object owner and takes deletion responsability. More...
 
void insertObject (Relative *obj, const std::string &key)
 Inserts obj with the key in the container of the object owner and takes deletion responsability. More...
 
 ObjectManager ()
 
 ObjectManager (const ObjectManager &original)
 This copy constructor performs a deep copy of original with all contained objects and their (redirected) relations. More...
 
 ObjectManager (const ObjectManager *original)
 This copy constructor performs a deep copy of original with all contained objects and their (redirected) relations. More...
 
void removeIndexEntry (const std::string &key)
 Removes the index entry with the key; please notice: it does not remove the object itself. More...
 
void removeObject (Relative *obj)
 Deletes the object obj. More...
 
bool setIndexEntry (const std::string &key, Relative *obj)
 Registers the object obj with the key in the index and returns true in case of success; please notice, that obj must be owned by this object owner and key must not be a zero length string. More...
 
void takeObject (Relative *obj)
 Takes the object obj from the object owner. More...
 
- Public Member Functions inherited from pxl::Object
int getWorkFlag () const
 Returns the value of the workflag. More...
 
bool isLocked () const
 Returns the value of the lock flag. More...
 
 Object ()
 
 Object (const Object &original)
 
 Object (const Object *original)
 
virtual std::ostream & printContent (int level=1, std::ostream &os=std::cout, int pan=0) const
 
void setLocked (bool v)
 Sets the value of the lock flag to v. More...
 
void setWorkFlag (int v)
 Sets the value of the workflag to v. More...
 
- Public Member Functions inherited from pxl::Relative
RelativegetDaughter () const
 Returns the first entry of the daughter relations. More...
 
const RelationsgetDaughterRelations () const
 Grants const access to the pxl::Relations instance managing daughter relations. More...
 
const std::set< Relative * > & getDaughters () const
 Returns all daughter relations. More...
 
const RelationsgetFlatRelations () const
 Grants const access to the pxl::Relations instance managing flat relations. More...
 
RelativegetMother () const
 Returns the first entry of the mother relations. More...
 
const RelationsgetMotherRelations () const
 Grants const access to the Relations instance managing mother relations. More...
 
const std::set< Relative * > & getMothers () const
 Returns all mother relations. More...
 
const std::string & getName () const
 Returns the name. More...
 
const SoftRelationsgetSoftRelations () const
 Get access to the soft relations. More...
 
SoftRelationsgetSoftRelations ()
 Get access to the soft relations. More...
 
Id id () const
 Returns the PXL unique object-id (UUID) More...
 
void linkDaughter (Relative *target)
 Establishes a daughter relation to the target object; please notice, that only relations between objects owned by the same object owner will be established. More...
 
void linkFlat (Relative *target)
 Establishes a flat relation to the target object; please notice, that only relations between objects owned by the same object owner will be established. More...
 
void linkMother (Relative *target)
 Establishes a mother relation to the target object; please notice, that only relations between objects owned by the same object owner will be established. More...
 
void linkSoft (Relative *relative, const std::string &type)
 Create a soft relation with name type to the Relative relative. More...
 
size_t numberOfDaughters () const
 Returns number of daughters. More...
 
size_t numberOfMothers () const
 Returns number of mothers. More...
 
ObjectOwnerowner () const
 Returns a C++ pointer to the pxl::ObjectOwner it is owned by. More...
 
std::ostream & printDecayTree (int level=0, std::ostream &os=std::cout, int pan=1) const
 Recursively invokes its own and the print() methods of all daughter objects. More...
 
void setName (const std::string &v)
 Sets the name to the contents of v. More...
 
void unlinkDaughter (Relative *target)
 Removes an existing daughter relation to the target object. More...
 
void unlinkDaughters ()
 Removes all existing daughter relations. More...
 
void unlinkFlat (Relative *target)
 Removes an existing daughter relation to the target object. More...
 
void unlinkFlat ()
 Removes all existing flat relations. More...
 
void unlinkMother (Relative *target)
 Removes an existing daughter relation to the target object. More...
 
void unlinkMothers ()
 Removes all existing mother relations. More...
 
void unlinkSoft (Relative *relative, const std::string &type)
 Remove a soft relation with name type to the Relative relative. More...
 
virtual ~Relative ()
 Destructor, ensures safe deletion of all hard relations. More...
 
- Public Member Functions inherited from pxl::Serializable
const IdgetId () const
 Returns the unique ID (UUID) of the individual object. More...
 
Serializableoperator= (const Serializable &original)
 Assignment operator, UUID is changed in case this object is changed. More...
 
 Serializable ()
 Constructor. More...
 
 Serializable (const Serializable &original)
 Copy constructor. A copied object gets a new unique ID. More...
 
virtual const std::string toString () const
 Returns a string with the output of the virtual print method. More...
 
virtual ~Serializable ()
 Destructor. More...
 
- Public Member Functions inherited from pxl::UserRecordHelper
void deserialize (const InputStream &in)
 
void eraseUserRecord (const std::string &key)
 
const VariantgetUserRecord (const std::string &key) const
 
template<typename datatype >
bool getUserRecord (const std::string &key, datatype &item) const
 
const UserRecordsgetUserRecords () const
 
UserRecordsgetUserRecords ()
 
bool hasUserRecord (const std::string &key) const
 
void serialize (const OutputStream &out) const
 
void setUserRecord (const std::string &key, const Variant &value)
 
void setUserRecords (const UserRecords &value)
 

Static Public Member Functions

static const IdgetStaticTypeId ()
 
- Static Public Member Functions inherited from pxl::ObjectManager
static const IdgetStaticTypeId ()
 
- Static Public Member Functions inherited from pxl::Object
static const IdgetStaticTypeId ()
 
- Static Public Member Functions inherited from pxl::Relative
static const IdgetStaticTypeId ()
 

Additional Inherited Members

- Protected Member Functions inherited from pxl::Relative
std::ostream & printPan (std::ostream &os, int pan) const
 Service method for printing relations tree. More...
 
std::ostream & printPan1st (std::ostream &os, int pan) const
 Service method for printing relations tree. More...
 
 Relative ()
 Default constructor. More...
 
 Relative (const Relative &original)
 Copy constructor. Relations are not copied. More...
 
 Relative (const Relative *original)
 Copy constructor. Relations are not copied. More...
 

Detailed Description

By inheritance from pxl::ObjectManager, this class is capable of holding the complete information of one multicollision event with decay trees, spatial vertex information, four-momenta as well as additional event-related reconstruction data in the user records.

Physics objects (i.e. instances of the classes pxl::Particle, pxl::Vertex or pxl::Collision) as well as other arbitrary pxl::Relative derivatives can be aggregated and managed. The name 'event view' arises from the fact that it is intended to represent a distinct view of an event (e.g. connecting particles to the decay tree according to one out of a number of hypotheses, applying different jet energy corrections, etc.). To facilitate the development of numerous parallel or subsequent event views, as needed for hypothesis evolution, for instance, this class features a copy constructor which provides a deep copy of the event container with all data members, hep objects, and their (redirected) relations. This way, PXL provides a flexible generalized event container meeting the needs of HEP analyses in channels with ambiguous event topologies.

Constructor & Destructor Documentation

pxl::EventView::EventView ( )
inline
pxl::EventView::EventView ( const EventView original)
inline

This copy constructor provides a deep copy of the event container original with all data members, hep objects, and their (redirected) relations.

pxl::EventView::EventView ( const EventView original)
inlineexplicit

This copy constructor provides a deep copy of the event container original with all data members, hep objects, and their (redirected) relations.

Member Function Documentation

virtual Serializable* pxl::EventView::clone ( ) const
inlinevirtual

Creates a deep copy and returns a C++ pointer to the newly-created object.

Reimplemented from pxl::ObjectManager.

virtual WkPtrBase* pxl::EventView::createSelfWkPtr ( )
inlinevirtual

Creates a weak pointer to itself and returns a pxl::WkPtrBase* to the newly-created weak pointer instance.

Reimplemented from pxl::ObjectManager.

virtual void pxl::EventView::deserialize ( const InputStream in)
inlinevirtual

This method deserializes this object.

When extending this method, derived classes must first call the base class method.

Reimplemented from pxl::ObjectManager.

const Id & pxl::EventView::getStaticTypeId ( )
static
virtual const Id& pxl::EventView::getTypeId ( ) const
inlinevirtual

Returns the unique ID of this class.

Reimplemented from pxl::ObjectManager.

std::ostream & pxl::EventView::print ( int  level = 0,
std::ostream &  os = std::cout,
int  pan = 1 
) const
virtual

Prints out object state information on various verbosity levels.

Parameters
levelverbosity level
osoutput _stream, default is std::cout
panprint indention
Returns
output _stream

Reimplemented from pxl::Object.

virtual void pxl::EventView::serialize ( const OutputStream out) const
inlinevirtual

This method serializes this object by serializing the type ID and the unique object ID.

When extending this method, derived classes must first call the base class method.

Reimplemented from pxl::ObjectManager.


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