4 #include "EVENT/LCIO.h"
10 #include <sio/io_device.h>
11 #include <sio/version.h>
55 SIO_DATA( device , &(vtx->_primary) , 1 ) ;
57 SIO_DATA( device , &algtype , 1 ) ;
58 vtx->setAlgorithmType(
_imr[algtype] ) ;
59 SIO_DATA( device , &(vtx->_chi2) , 1 ) ;
60 SIO_DATA( device , &(vtx->_probability) , 1 ) ;
61 SIO_DATA( device , vtx->_vpos , 3 ) ;
64 vtx->setCovMatrix( cov ) ;
66 SIO_DATA( device , &nPara , 1 ) ;
68 for(
int i=0 ; i<nPara ; i++ ) {
69 SIO_DATA( device , &aParameter , 1 ) ;
70 vtx->addParameter( aParameter ) ;
73 SIO_PNTR( device , &(vtx->_aParticle) ) ;
75 SIO_PTAG( device , dynamic_cast<const EVENT::Vertex*>(vtx) ) ;
82 SIO_SDATA( device, vtx->isPrimary() ) ;
83 SIO_SDATA( device, static_cast<int> (distance(
_set.
begin(),
_set.
find( vtx->getAlgorithmType() )))) ;
84 SIO_SDATA( device, vtx->getChi2() ) ;
85 SIO_SDATA( device, vtx->getProbability() ) ;
86 SIO_DATA( device, vtx->getPosition() , 3 ) ;
87 auto cov = vtx->getCovMatrix() ;
88 for(
unsigned int i=0 ; i<cov.size() ; i++ ) {
89 SIO_SDATA( device, cov[i] ) ;
91 int nPara = vtx->getParameters().size() ;
92 SIO_DATA( device , &nPara , 1 ) ;
93 for(
int i=0 ; i<nPara ; i++ ) {
94 SIO_SDATA( device, vtx->getParameters()[i] ) ;
97 auto recP = vtx->getAssociatedParticle() ;
98 SIO_PNTR( device , &recP ) ;
100 SIO_PTAG( device , vtx ) ;
The generic object that is held in an LCCollection.
void initWriting(sio::write_device &device, EVENT::LCCollection *collection) override
Init collection reading.
The Vertex class for LCIO.
SIOVertexHandler()
Constructor.
Interface for all lcio object SIO-handlers, has to be implemented for all event entities (hits...
EVENT::StringVec _parameters
virtual void initReading(sio::read_device &device, EVENT::LCCollection *collection, sio::version_type vers)
Init collection reading.
virtual LCObject * getElementAt(int index) const =0
Returns pointer to element at index - no range check, use getNumberOfEntries().
void initReading(sio::read_device &device, EVENT::LCCollection *collection, sio::version_type vers) override
Init collection reading.
virtual void initWriting(sio::write_device &device, EVENT::LCCollection *collection)
Init collection writing.
virtual LCParameters & parameters()=0
Parameters defined for this collection.
virtual void setValues(const std::string &key, const IntVec &values)=0
Set integer values for the given key.
std::set< std::string > _set
virtual int getNumberOfElements() const =0
Returns the number of elements in the collection.
void read(sio::read_device &device, EVENT::LCObject *objP, sio::version_type vers) override
Reads lcio objects from an SIO stream.
virtual StringVec & getStringVals(const std::string &key, StringVec &values) const =0
Adds all string values for the given key to values.
The generic collection used in LCIO.
void write(sio::write_device &device, const EVENT::LCObject *obj) override
Writes lcio objects to an SIO stream.
virtual const LCParameters & getParameters() const =0
Parameters defined for this collection.
EVENT::LCObject * create() const override
Factory method to create an object of the type of the collection.
Adding stuff needed for io (friend declarations, etc.)
std::map< int, std::string > _imr