LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LCIORecords.h
Go to the documentation of this file.
1 #ifndef SIO_LCIORECORDS_H
2 #define SIO_LCIORECORDS_H 1
3 
4 // -- std headers
5 #include <set>
6 
7 // -- sio headers
8 #include <sio/definitions.h>
9 
10 // -- lcio headers
11 #include "SIO/LCSIO.h"
12 #include "SIO/SIOHandlerMgr.h"
13 
14 namespace IOIMPL {
15  class LCEventIOImpl;
16  class LCRunHeaderIOImpl;
17 }
18 
19 namespace EVENT {
20  class LCEvent;
21  class LCRunHeader;
22 }
23 
24 namespace SIO {
25 
27  // static API only
28  SIOEventHeaderRecord() = delete ;
29  public:
40  static void readBlocks( const sio::buffer_span &buffer, EVENT::LCEvent *event, const std::vector<std::string> &readCol ) ;
41 
51  static void writeRecord( sio::buffer &outbuf, EVENT::LCEvent *event, sio::record_info& rec_info, sio::options_type opts = 0 ) ;
52 
63  static void writeRecord( sio::buffer &outbuf, EVENT::LCEvent *event, sio::record_info& rec_info, const std::set<std::string> &colsOnly, sio::options_type opts = 0 ) ;
64  };
65 
66  //----------------------------------------------------------------------------
67  //----------------------------------------------------------------------------
68 
70  // static API only
71  SIOEventRecord() = delete ;
72  public:
81  static void setupBlocks( EVENT::LCEvent *event, const SIOHandlerMgr &handlerMgr, sio::block_list &blocks, const std::set<std::string> &colsOnly = {} ) ;
82 
90  static void readBlocks( const sio::buffer_span &buffer, EVENT::LCEvent *event, const SIOHandlerMgr &handlerMgr ) ;
91 
102  static void writeRecord( sio::buffer &outbuf, EVENT::LCEvent *event, const SIOHandlerMgr &handlerMgr, sio::record_info& rec_info, sio::options_type opts = 0 ) ;
103 
115  static void writeRecord( sio::buffer &outbuf, EVENT::LCEvent *event, const SIOHandlerMgr &handlerMgr, sio::record_info& rec_info, const std::set<std::string> &colsOnly, sio::options_type opts = 0 ) ;
116  };
117 
118  //----------------------------------------------------------------------------
119  //----------------------------------------------------------------------------
120 
122  // static API only
123  SIORunHeaderRecord() = delete ;
124  public:
131  static void readBlocks( const sio::buffer_span &buffer, EVENT::LCRunHeader *rhdr ) ;
132 
141  static void writeRecord( sio::buffer &outbuf, EVENT::LCRunHeader *rhdr, sio::record_info& rec_info, sio::options_type opts = 0 ) ;
142  };
143 
144 } // namespace
145 
146 #endif // ifndef SIO_LCIORECORDS_H
static void writeRecord(sio::buffer &outbuf, EVENT::LCEvent *event, sio::record_info &rec_info, sio::options_type opts=0)
Write an event header to the raw sio buffer.
Definition: LCIORecords.cc:28
Interface for the run header.
Definition: LCRunHeader.h:23
struct opts_t opts
LCEvent * event
Definition: lsh.cc:80
static void writeRecord(sio::buffer &outbuf, EVENT::LCRunHeader *rhdr, sio::record_info &rec_info, sio::options_type opts=0)
Write a run header record to the sio buffer.
Definition: LCIORecords.cc:105
static void readBlocks(const sio::buffer_span &buffer, EVENT::LCRunHeader *rhdr)
Read the block(s) from the sio buffer and decode a run header.
Definition: LCIORecords.cc:95
static void writeRecord(sio::buffer &outbuf, EVENT::LCEvent *event, const SIOHandlerMgr &handlerMgr, sio::record_info &rec_info, sio::options_type opts=0)
Write an event record.
Definition: LCIORecords.cc:78
static void readBlocks(const sio::buffer_span &buffer, EVENT::LCEvent *event, const SIOHandlerMgr &handlerMgr)
Read the blocks (collections) from the sio buffer.
Definition: LCIORecords.cc:70
The main event interface.
Definition: LCEvent.h:31
Holds instances of all types of SIOObjectHandlers.
Definition: SIOHandlerMgr.h:20
static void setupBlocks(EVENT::LCEvent *event, const SIOHandlerMgr &handlerMgr, sio::block_list &blocks, const std::set< std::string > &colsOnly={})
Setup the record blocks for the given event.
Definition: LCIORecords.cc:50
static void readBlocks(const sio::buffer_span &buffer, EVENT::LCEvent *event, const std::vector< std::string > &readCol)
Read an event header record.
Definition: LCIORecords.cc:17