4 #include "EVENT/LCIO.h"
10 #include <sio/io_device.h>
11 #include <sio/version.h>
25 if( vers > SIO_VERSION_ENCODE( 1, 51) ) {
26 SIO_DATA( device , &(hit->_cellID0) , 1 ) ;
27 if( lcFlag.
bitSet( EVENT::LCIO::RTHPBIT_ID1 ) ){
28 SIO_DATA( device , &(hit->_cellID1) , 1 ) ;
31 SIO_DATA( device, &(hit->_type) , 1 ) ;
32 SIO_DATA( device, hit->_pos , 3 ) ;
33 SIO_DATA( device, hit->_u , 2 ) ;
34 SIO_DATA( device, hit->_v , 2 ) ;
35 SIO_DATA( device, &(hit->_du) , 1 ) ;
36 SIO_DATA( device, &(hit->_dv) , 1 ) ;
37 SIO_DATA( device, &(hit->_EDep) , 1 ) ;
38 SIO_DATA( device, &(hit->_EDepError) , 1 ) ;
39 SIO_DATA( device, &(hit->_time) , 1 ) ;
40 SIO_DATA( device, &(hit->_quality) , 1 ) ;
41 int numberOfRawHits = 1 ;
42 SIO_DATA( device , &numberOfRawHits , 1 ) ;
43 hit->_rawHits.resize( numberOfRawHits ) ;
44 for(
int i=0 ; i<numberOfRawHits ; i++ ) {
45 SIO_PNTR( device , &(hit->_rawHits[i] ) ) ;
47 SIO_PTAG( device , dynamic_cast<const EVENT::TrackerHitPlane*>(hit) ) ;
55 SIO_SDATA( device, hit->getCellID0() ) ;
56 if( lcFlag.
bitSet( EVENT::LCIO::RTHPBIT_ID1 ) ){
57 SIO_SDATA( device, hit->getCellID1() ) ;
59 SIO_SDATA( device , hit->getType() ) ;
60 SIO_DATA( device, hit->getPosition() , 3 ) ;
61 SIO_DATA( device, hit->getU() , 2 ) ;
62 SIO_DATA( device, hit->getV() , 2 ) ;
63 SIO_SDATA( device, hit->getdU() ) ;
64 SIO_SDATA( device, hit->getdV() ) ;
65 SIO_SDATA( device, hit->getEDep() ) ;
66 SIO_SDATA( device, hit->getEDepError() ) ;
67 SIO_SDATA( device, hit->getTime() ) ;
68 SIO_SDATA( device, hit->getQuality() ) ;
70 int nrawhits = rawHits.
size() ;
71 SIO_SDATA( device, nrawhits ) ;
72 for(
unsigned int i=0; i < rawHits.size() ; i++){
73 SIO_PNTR( device , &(rawHits[i]) ) ;
75 SIO_PTAG( device , hit ) ;
The generic object that is held in an LCCollection.
void read(sio::read_device &device, EVENT::LCObject *objP, sio::version_type vers) override
Reads lcio objects from an SIO stream.
virtual bool bitSet(int index) const
Returns true if bit at given index is set.
Adding stuff needed for io (friend declarations, etc.)
A tracker hit on a planar surface - the hit is stored as: x,y,z, u(theta, phi), v(theta,phi), du, dv where (x,y,z) is the position in global cartesian coordinates, u,v are the the meassurement directions (unit vectors, spanning the plane) and du,dv are the measurement errors along these directions.
Interface for all lcio object SIO-handlers, has to be implemented for all event entities (hits...
EVENT::LCObject * create() const override
Factory method to create an object of the type of the collection.
unsigned int _flag
The collection flag.
Implementation of helper class to create and interpret the 32-bit flag word in LCCollections.
void write(sio::write_device &device, const EVENT::LCObject *obj) override
Writes lcio objects to an SIO stream.
SIOTrackerHitPlaneHandler()
Constructor.