5 #include "EVENT/LCIO.h"
11 #include <sio/io_device.h>
12 #include <sio/version.h>
17 sio::block( colname,
LCSIO::blockVersion() ),
38 if(
nullptr == ioCol ) {
39 SIO_THROW( sio::error_code::invalid_argument,
"Expected collection of type LCCollectionIOVec!" ) ;
44 SIO_DATA( device , &nObj , 1 ) ;
49 for(
int i=0 ; i< nObj ; i ++ ) {
50 SIO_PNTR( device , &(*ioCol)[i] ) ;
56 for(
int i=0 ; i< nObj ; i ++ ) {
59 _handler->read( device , (*ioCol)[i] , vers ) ;
63 SIO_RETHROW( e, sio::error_code::io_failure, ss.
str() ) ;
67 SIO_THROW( sio::error_code::io_failure, ss.
str() ) ;
79 SIO_DATA( device, &nObj , 1 ) ;
82 for(
int i=0 ; i< nObj ; i ++ ) {
84 SIO_PNTR( device , &ptr ) ;
89 for(
int i=0 ; i< nObj ; i ++ ) {
EVENT::LCCollection * _collection
The collection to read/write.
const std::string & type() const
Get the collection type.
std::shared_ptr< SIOObjectHandler > _handler
The object handler for reading/writing.
Adding stuff needed for io (friend declarations, etc.)
void read(sio::read_device &device, sio::version_type vers) override
Collection of constants and helper functions.
virtual LCObject * getElementAt(int index) const =0
Returns pointer to element at index - no range check, use getNumberOfEntries().
void write(sio::write_device &device) override
virtual int getNumberOfElements() const =0
Returns the number of elements in the collection.
The generic collection used in LCIO.
void setCollection(EVENT::LCCollection *col)
Set the collection to read/write.
SIOCollectionHandler()=delete
static const int BITSubset