5 #include "EVENT/LCIO.h"
11 #include <sio/io_device.h>
12 #include <sio/version.h>
18 sio::block(
LCSIO::HeaderBlockName,
LCSIO::blockVersion() ) {
39 SIO_SDATA( device , evt->_runNumber ) ;
40 SIO_SDATA( device , evt->_eventNumber ) ;
41 SIO_SDATA( device , evt->_timeStamp ) ;
43 SIO_SDATA( device, detName ) ;
44 evt->setDetectorName( detName ) ;
46 SIO_SDATA( device, nCol ) ;
50 for(
int i=0; i<nCol ; i++ ) {
52 SIO_SDATA( device, colName ) ;
53 SIO_SDATA( device, colType ) ;
54 std::string::size_type idx ;
64 if( vers > SIO_VERSION_ENCODE( 1, 1 ) ) {
73 unsigned int nCol = 0 ;
74 for(
unsigned int i=0 ; i < colNames->size() ; i++ ) {
87 SIO_SDATA( device, nCol ) ;
88 for(
unsigned int i=0 ; i < colNames->size() ; i++ ) {
90 if( col->isTransient() ) {
97 if( col->isSubset() ) {
100 SIO_SDATA( device, (*colNames)[i] ) ;
101 SIO_SDATA( device, colType ) ;
virtual bool isTransient() const =0
True if collection is transient, i.e.
static void write(sio::write_device &device, const EVENT::LCParameters ¶ms)
Writes lcio objects to an SIO stream.
virtual const LCParameters & getParameters() const =0
Parameters defined for this event.
void write(sio::write_device &device) override
virtual int getRunNumber() const =0
Return the run number off this event.
static void checkVersion(sio::version_type versionID)
Check for old version of LCIO (> v01-08 ar no longer supported) Throws an exception if not supported...
Adding stuff needed for io (friend declarations, etc.)
virtual const std::vector< std::string > * getCollectionNames() const =0
Returns the names of the collections in the event.
Collection of constants and helper functions.
virtual long64 getTimeStamp() const =0
Returns the time stamp of the event.
void read(sio::read_device &device, sio::version_type vers) override
void setCollectionNames(const std::set< std::string > &colnames)
Set the collection to read or write only.
virtual LCCollection * getCollection(const std::string &name) const =0
Returns the collection for the given name.
SIOEventHandler()
Constructor.
virtual const std::string & getDetectorName() const =0
Returns the name of the detector setup used in the simulation.
Adding stuff needed for io (friend declarations, etc.)
void setEvent(EVENT::LCEvent *evt)
Set the event to read/write.
The main event interface.
static void read(sio::read_device &device, EVENT::LCParameters ¶ms, sio::version_type vers)
Reads objects from an SIO stream.
virtual int getEventNumber() const =0
Returns this event's number .
static constexpr const char * SubsetPostfix
std::set< std::string > _colSubSet
List of collection to read only.