EUDAQ
 All Classes Namespaces Files Functions Variables Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
eudaq::RawDataEvent Class Reference

#include <RawDataEvent.hh>

Inheritance diagram for eudaq::RawDataEvent:
eudaq::Event eudaq::Serializable

Classes

struct  block_t
 

Public Types

typedef unsigned char byte_t
 
typedef std::vector< byte_t > data_t
 
- Public Types inherited from eudaq::Event
enum  Flags {
  FLAG_BORE = 1, FLAG_EORE = 2, FLAG_HITS = 4, FLAG_FAKE = 8,
  FLAG_SIMU = 16, FLAG_EUDAQ2 = 32, FLAG_PACKET = 64, FLAG_BROKEN = 128,
  FLAG_STATUS = 256, FLAG_ALL = (unsigned)-1
}
 

Public Member Functions

 RawDataEvent (std::string type, unsigned run, unsigned event)
 
 RawDataEvent (Deserializer &)
 
size_t AddBlock (unsigned id)
 Add an empty block.
 
template<typename T >
size_t AddBlock (unsigned id, const std::vector< T > &data)
 Add a data block as std::vector.
 
template<typename T >
size_t AddBlock (unsigned id, const T *data, size_t bytes)
 Add a data block as array with given size.
 
template<typename T >
void AppendBlock (size_t index, const std::vector< T > &data)
 Append data to a block as std::vector.
 
template<typename T >
void AppendBlock (size_t index, const T *data, size_t bytes)
 Append data to a block as array with given size.
 
unsigned GetID (size_t i) const
 
const data_t & GetBlock (size_t i) const
 
byte_t GetByte (size_t block, size_t index) const
 
size_t NumBlocks () const
 Return the number of data blocks in the RawDataEvent.
 
virtual void Print (std::ostream &) const
 
virtual void Serialize (Serializer &) const
 
virtual std::string GetSubType () const
 Return the type string.
 
- Public Member Functions inherited from eudaq::Event
 Event (unsigned run, unsigned event, uint64_t timestamp=NOTIMESTAMP, unsigned flags=0)
 
 Event (Deserializer &ds)
 
unsigned GetRunNumber () const
 
unsigned GetEventNumber () const
 
uint64_t GetTimestamp () const
 
bool HasTag (const std::string &name) const
 
std::vector< std::string > GetTagList (const std::string &prefix) const
 
EventSetTag (const std::string &name, const std::string &val)
 
template<typename T >
EventSetTag (const std::string &name, const T &val)
 
std::string GetTag (const std::string &name, const std::string &def="") const
 
std::string GetTag (const std::string &name, const char *def) const
 
template<typename T >
GetTag (const std::string &name, T def) const
 
bool IsBORE () const
 
bool IsEORE () const
 
bool HasHits () const
 
bool IsFake () const
 
bool IsSimulation () const
 
unsigned GetFlags (unsigned f=FLAG_ALL) const
 
void SetFlags (unsigned f)
 
void SetTimeStampToNow ()
 
void setTimeStamp (uint64_t timeStamp)
 
void ClearFlags (unsigned f=FLAG_ALL)
 
virtual unsigned get_id () const =0
 

Static Public Member Functions

static RawDataEvent BORE (std::string type, unsigned run)
 
static RawDataEventnewBORE (std::string type, unsigned run)
 
static RawDataEvent EORE (std::string type, unsigned run, unsigned event)
 
static RawDataEventnewEORE (std::string type, unsigned run, unsigned event)
 
- Static Public Member Functions inherited from eudaq::Event
static unsigned str2id (const std::string &idstr)
 
static std::string id2str (unsigned id)
 

Additional Inherited Members

- Protected Types inherited from eudaq::Event
typedef std::map< std::string,
std::string > 
map_t
 
- Protected Attributes inherited from eudaq::Event
unsigned m_flags
 
unsigned m_runnumber
 
unsigned m_eventnumber
 
uint64_t m_timestamp
 
map_t m_tags
 Metadata tags in (name=value) pairs of strings.
 

Detailed Description

An Event type consisting of just a vector of bytes.

Member Function Documentation

const RawDataEvent::data_t & eudaq::RawDataEvent::GetBlock ( size_t  i) const

Get the data block number i as vector of {unsigned char}, which is the byte sequence which which has been serialised. This is the recommended way to retrieve your data from the RawDataEvent since the other GetBlock functions might give different results depending on the endiannes of your mashine.


The documentation for this class was generated from the following files: