4 #include "EVENT/LCIO.h"
11 #include <sio/io_device.h>
12 #include <sio/version.h>
27 SIO_DATA( device , &(hit->_cellID0) , 1 ) ;
28 if( vers > SIO_VERSION_ENCODE( 1, 51) ) {
29 if( lcFlag.
bitSet( EVENT::LCIO::THBIT_ID1 ) ) {
30 SIO_DATA( device , &(hit->_cellID1) , 1 ) ;
33 SIO_DATA( device , hit->_pos , 3 ) ;
34 SIO_DATA( device , &(hit->_EDep) , 1 ) ;
35 SIO_DATA( device , &(hit->_time) , 1 ) ;
36 SIO_PNTR( device , &(hit->_particle) ) ;
37 if( lcFlag.
bitSet( EVENT::LCIO::THBIT_MOMENTUM ) ){
38 SIO_DATA( device , hit->_p , 3 ) ;
39 if( vers > SIO_VERSION_ENCODE( 1 , 6 ) ) {
40 SIO_DATA( device , &(hit->_pathLength) , 1 ) ;
43 if( vers > SIO_VERSION_ENCODE( 2, 7 ) ) {
44 SIO_DATA( device , &(hit->_quality) , 1 ) ;
47 if( vers > SIO_VERSION_ENCODE( 1, 0) ) {
48 SIO_PTAG( device , dynamic_cast<const EVENT::SimTrackerHit*>(hit) ) ;
57 SIO_SDATA( device, hit->getCellID0() ) ;
58 if( lcFlag.
bitSet( EVENT::LCIO::THBIT_ID1 ) ) {
59 SIO_SDATA( device, hit->getCellID1() ) ;
61 SIO_DATA( device, hit->getPosition() , 3 ) ;
62 SIO_SDATA( device, hit->getEDep() ) ;
63 SIO_SDATA( device, hit->getTime() ) ;
64 auto part = hit->getMCParticle() ;
65 SIO_PNTR( device , &part ) ;
66 if( lcFlag.
bitSet( EVENT::LCIO::THBIT_MOMENTUM ) ){
67 SIO_DATA( device , hit->getMomentum() , 3 ) ;
68 SIO_SDATA( device , hit->getPathLength() ) ;
70 SIO_SDATA( device, hit->getQuality() ) ;
72 SIO_PTAG( device , hit ) ;
The generic object that is held in an LCCollection.
void write(sio::write_device &device, const EVENT::LCObject *obj) override
Writes lcio objects to an SIO stream.
EVENT::LCObject * create() const override
Factory method to create an object of the type of the collection.
void read(sio::read_device &device, EVENT::LCObject *objP, sio::version_type vers) override
Reads lcio objects from an SIO stream.
SIOSimTrackHitHandler()
Constructor.
virtual bool bitSet(int index) const
Returns true if bit at given index is set.
A generic simulated tracker hit.
Adding stuff needed for io (friend declarations, etc.)
Interface for all lcio object SIO-handlers, has to be implemented for all event entities (hits...
unsigned int _flag
The collection flag.
Implementation of helper class to create and interpret the 32-bit flag word in LCCollections.