5 #include "EVENT/LCIO.h"
8 #include <sio/io_device.h>
9 #include <sio/version.h>
17 sio::block(
LCSIO::IndexBlockName,
LCSIO::blockVersion() ),
39 SIO_DATA( device , &control, 1 ) ;
40 bool oneRun = control & 1 ;
41 bool longOffset = control & 2 ;
44 SIO_THROW( sio::error_code::io_failure,
"SIOIndexHandler: parameters not implemented ...." ) ;
47 SIO_DATA( device , &runMin, 1 ) ;
49 SIO_DATA( device , &baseOffset, 1 ) ;
51 SIO_DATA( device , &size, 1 ) ;
60 for (
int i = 0; i < size; i++) {
63 SIO_DATA( device , &runOffset, 1 ) ;
66 SIO_DATA( device , &evtNum , 1 ) ;
68 SIO_DATA( device , &dummy_long , 1 ) ;
72 SIO_DATA( device , &dummy_int , 1 ) ;
83 unsigned control = 0 ;
86 bool oneRun = minEntry.RunNum == maxEntry.RunNum ;
96 SIO_DATA( device , &control, 1 ) ;
97 int runMin = minEntry.RunNum ;
98 SIO_DATA( device , &runMin, 1 ) ;
99 long64 baseOffset = posMin ;
100 SIO_DATA( device , &baseOffset, 1 ) ;
102 SIO_DATA( device , &size, 1 ) ;
105 int runOffset = it->first.RunNum - runMin ;
106 SIO_DATA( device , &runOffset, 1 ) ;
108 int evtNum = it->first.EvtNum ;
109 SIO_DATA( device , &evtNum , 1 ) ;
111 long64 dummyL = it->second - baseOffset ;
112 SIO_DATA( device , &dummyL , 1 ) ;
115 int dummyI = it->second - baseOffset ;
116 SIO_DATA( device , &dummyI , 1 ) ;
std::shared_ptr< RunEventMap > runEventMap() const
Get the run / event map.
void read(sio::read_device &device, sio::version_type vers) override
void write(sio::write_device &device) override
void setRunEventMap(std::shared_ptr< RunEventMap > remap)
Set the run / event map to read or write.
Helper struct that stores run and event positions in the file.
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...
Map that holds positions of Run and Event records.
Collection of constants and helper functions.
std::shared_ptr< RunEventMap > _runEventMap
The run / event map to read/write.
SIOIndexHandler()
Constructor.