5 #include "EVENT/LCIO.h"
10 #include <sio/io_device.h>
11 #include <sio/version.h>
24 SIO_DATA( device , &(hit->_cellID) , 1 ) ;
25 SIO_DATA( device , &(hit->_time) , 1 ) ;
26 SIO_DATA( device , &(hit->_charge) , 1 ) ;
27 SIO_DATA( device , &(hit->_quality) , 1 ) ;
29 if( lcflag.
bitSet( EVENT::LCIO::TPCBIT_RAW ) ){
30 SIO_DATA( device , &(hit->_rawSize) , 1 ) ;
31 hit->initRawArray( hit->_rawSize ) ;
32 SIO_DATA( device , hit->_rawArray , hit->_rawSize ) ;
34 if( vers > SIO_VERSION_ENCODE( 1, 2 ) ) {
35 if( ! lcflag.
bitSet( EVENT::LCIO::TPCBIT_NO_PTR ) ) {
36 SIO_PTAG( device , dynamic_cast<const EVENT::TPCHit*>(hit) ) ;
40 if( lcflag.
bitSet( EVENT::LCIO::TPCBIT_NO_PTR ) ) {
41 SIO_PTAG( device , dynamic_cast<const EVENT::TPCHit*>(hit) ) ;
50 SIO_SDATA( device, hit->getCellID() ) ;
51 SIO_SDATA( device, hit->getTime() ) ;
52 SIO_SDATA( device, hit->getCharge() ) ;
53 SIO_SDATA( device, hit->getQuality() ) ;
55 if( lcflag.bitSet( EVENT::LCIO::TPCBIT_RAW ) ) {
56 SIO_SDATA( device, hit->getNRawDataWords() ) ;
57 for(
int i=0;i<hit->getNRawDataWords();i++){
58 SIO_SDATA( device, hit->getRawDataWord(i) ) ;
62 if( ! lcflag.bitSet( EVENT::LCIO::TPCBIT_NO_PTR ) ) {
63 SIO_PTAG( device , hit ) ;
The generic object that is held in an LCCollection.
SIOTPCHitHandler()
Constructor.
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.
EVENT::LCObject * create() const override
Factory method to create an object of the type of the collection.
Interface for all lcio object SIO-handlers, has to be implemented for all event entities (hits...
unsigned int _flag
The collection flag.
void write(sio::write_device &device, const EVENT::LCObject *obj) override
Writes lcio objects to an SIO stream.
Implementation of helper class to create and interpret the 32-bit flag word in LCCollections.
Adding stuff needed for io (friend declarations, etc.)