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::RTHZBIT_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->_center , 2 ) ;
34 SIO_DATA( device, &(hit->_drphi), 1 ) ;
35 SIO_DATA( device, &(hit->_dz) , 1 ) ;
36 SIO_DATA( device, &(hit->_EDep) , 1 ) ;
37 SIO_DATA( device, &(hit->_EDepError) , 1 ) ;
38 SIO_DATA( device, &(hit->_time) , 1 ) ;
39 SIO_DATA( device, &(hit->_quality) , 1 ) ;
40 int numberOfRawHits = 1 ;
41 SIO_DATA( device , &numberOfRawHits , 1 ) ;
42 hit->_rawHits.resize( numberOfRawHits ) ;
43 for(
int i=0 ; i<numberOfRawHits ; i++ ) {
44 SIO_PNTR( device , &(hit->_rawHits[i] ) ) ;
46 SIO_PTAG( device , dynamic_cast<const EVENT::TrackerHitZCylinder*>(hit) ) ;
54 SIO_SDATA( device, hit->getCellID0() ) ;
55 if( lcFlag.
bitSet( EVENT::LCIO::RTHZBIT_ID1 ) ) {
56 SIO_SDATA( device, hit->getCellID1() ) ;
58 SIO_SDATA( device , hit->getType() ) ;
59 SIO_DATA( device, hit->getPosition() , 3 ) ;
60 SIO_DATA( device, hit->getCenter() , 2 ) ;
61 SIO_SDATA( device, hit->getdRPhi() ) ;
62 SIO_SDATA( device, hit->getdZ() ) ;
63 SIO_SDATA( device, hit->getEDep() ) ;
64 SIO_SDATA( device, hit->getEDepError() ) ;
65 SIO_SDATA( device, hit->getTime() ) ;
66 SIO_SDATA( device, hit->getQuality() ) ;
68 int nrawhits = rawHits.
size() ;
69 SIO_SDATA( device, nrawhits ) ;
70 for(
unsigned int i=0; i < rawHits.size() ; i++){
71 SIO_PNTR( device , &(rawHits[i]) ) ;
73 SIO_PTAG( device , hit ) ;
The generic object that is held in an LCCollection.
Adding stuff needed for io (friend declarations, etc.)
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.
Interface for all lcio object SIO-handlers, has to be implemented for all event entities (hits...
unsigned int _flag
The collection flag.
void read(sio::read_device &device, EVENT::LCObject *objP, sio::version_type vers) override
Reads lcio objects from an SIO stream.
Implementation of helper class to create and interpret the 32-bit flag word in LCCollections.
SIOTrackerHitZCylinderHandler()
Constructor.
A tracker hit on a cylindrical surface that runs parallel to the z-axis - the hit is stored as: x...
EVENT::LCObject * create() const override
Factory method to create an object of the type of the collection.