5 #include "EVENT/LCIO.h"
10 #include <sio/io_device.h>
11 #include <sio/version.h>
24 SIO_DATA( device , &(hit->_cellID0) , 1 ) ;
26 if( lcFlag.
bitSet( EVENT::LCIO::TRAWBIT_ID1 ) ) {
27 SIO_DATA( device , &(hit->_cellID1) , 1 ) ;
29 SIO_DATA( device , &(hit->_time) , 1 ) ;
30 SIO_DATA( device , &(hit->_charge ) , 1 ) ;
31 if( vers > SIO_VERSION_ENCODE( 1, 12 ) ) {
32 if( lcFlag.
bitSet( EVENT::LCIO::TRAWBIT_CM ) ) {
35 hit->setCovMatrix( cov ) ;
38 SIO_DATA( device , &(hit->_quality ) , 1 ) ;
39 SIO_PNTR( device , &(hit->_corrData) ) ;
40 SIO_PTAG( device , dynamic_cast<const EVENT::TrackerPulse*>(hit) ) ;
47 SIO_SDATA( device, hit->getCellID0() ) ;
49 if( lcFlag.bitSet( EVENT::LCIO::TRAWBIT_ID1 ) ) {
50 SIO_SDATA( device, hit->getCellID1() ) ;
52 SIO_SDATA( device, hit->getTime() ) ;
53 SIO_SDATA( device, hit->getCharge() ) ;
54 if( lcFlag.bitSet( EVENT::LCIO::TRAWBIT_CM ) ) {
55 auto cov = hit->getCovMatrix() ;
56 for(
unsigned int i=0; i<cov.size(); i++){
57 SIO_SDATA( device, cov[i] ) ;
60 SIO_SDATA( device, hit->getQuality() ) ;
61 auto corr = hit->getTrackerData() ;
62 SIO_PNTR( device , & corr );
63 SIO_PTAG( device , hit ) ;
The generic object that is held in an LCCollection.
virtual bool bitSet(int index) const
Returns true if bit at given index is set.
void write(sio::write_device &device, const EVENT::LCObject *obj) override
Writes lcio objects to an SIO stream.
void read(sio::read_device &device, EVENT::LCObject *objP, sio::version_type vers) override
Reads lcio objects from an SIO stream.
#define TRKPULSENCOVMATRIX
Interface for all lcio object SIO-handlers, has to be implemented for all event entities (hits...
unsigned int _flag
The collection flag.
Tracker pulses as computed from TrackerData objects or as directly measured by a specific subdetector...
Adding stuff needed for io (friend declarations, etc.)
Implementation of helper class to create and interpret the 32-bit flag word in LCCollections.
EVENT::LCObject * create() const override
Factory method to create an object of the type of the collection.
SIOTrackerPulseHandler()
Constructor.