MarlinUtil
1.12.1
|
Bring the feature to print a LCIO-Objekt given by his ID. More...
#include <DDMarlinCED.h>
Public Member Functions | |
void | update (LCEvent *) |
Register all LCIO-objects of the given LCEvent in the DDCEDPickingHandler map. More... | |
void | printID (int) |
Print the LCIO-object given by his ID. | |
void | registerFunction (std::string, void(*)(const LCObject *)) |
This method provides to register a (user defined) print function. More... | |
Static Public Member Functions | |
static DDCEDPickingHandler & | getInstance () |
Returns a pointer to the DDCEDPickingHandler object. | |
template<class T > | |
static void | defaultOutputFunction (const LCObject *obj) |
The default print method for all LCIO objects. | |
static int | kbhit (void) |
Returns 1 if a key was been pressed, otherwise 0. More... | |
Bring the feature to print a LCIO-Objekt given by his ID.
To Provide this behavior it is required to register all ids first. This is an Singelton Class, use it with getInstance().
|
static |
Returns 1 if a key was been pressed, otherwise 0.
(Should be not part of DDCEDPickingHandler)
Referenced by DDMarlinCED::draw().
void DDCEDPickingHandler::registerFunction | ( | std::string | type, |
void(*)(const LCObject *) | printFunction | ||
) |
This method provides to register a (user defined) print function.
The first argument is the collection- or type-Name of the LCIO Object, the second a pointer of the print function.
Example: pHandler.registerFunction(LCIO::TRACKERHIT, &yourPrintFunction);
void DDCEDPickingHandler::update | ( | LCEvent * | evt | ) |
Register all LCIO-objects of the given LCEvent in the DDCEDPickingHandler map.
This method iterate over all objects how are part of the LCEvent.
For each object, the collection name will searched in the funcMap. If this collection name not found in the funcMap the typeName will be searched. Now the object pointer, the object id and the given print function from the funcMap will be stored in the the DDCEDPickingHandler map.
If either the collection name and the typeName not found in the funcMap, this function is not able to register the id of the object. The result is that print this object with his id is not possible.