11 #ifndef EVIO_6_0_EVENTBUILDER_H
12 #define EVIO_6_0_EVENTBUILDER_H
48 std::shared_ptr<EvioEvent> event;
56 void clearData(std::shared_ptr<BaseStructure> structure);
57 void addChild(std::shared_ptr<BaseStructure> parent, std::shared_ptr<BaseStructure> child);
58 void remove(std::shared_ptr<BaseStructure> child);
60 void setIntData(std::shared_ptr<BaseStructure> structure, int32_t* data,
size_t count);
61 void setUIntData(std::shared_ptr<BaseStructure> structure, uint32_t* data,
size_t count);
62 void setShortData(std::shared_ptr<BaseStructure> structure, int16_t* data,
size_t count);
63 void setUShortData(std::shared_ptr<BaseStructure> structure, uint16_t* data,
size_t count);
64 void setLongData(std::shared_ptr<BaseStructure> structure, int64_t* data,
size_t count);
65 void setULongData(std::shared_ptr<BaseStructure> structure, uint64_t* data,
size_t count);
66 void setCharData(std::shared_ptr<BaseStructure> structure,
char* data,
size_t count);
67 void setUCharData(std::shared_ptr<BaseStructure> structure,
unsigned char* data,
size_t count);
68 void setFloatData(std::shared_ptr<BaseStructure> structure,
float* data,
size_t count);
69 void setDoubleData(std::shared_ptr<BaseStructure> structure,
double* data,
size_t count);
72 void setStringData(std::shared_ptr<BaseStructure> structure, std::string* data,
size_t count);
74 std::shared_ptr<CompositeData> *data,
size_t count);
76 void appendIntData(std::shared_ptr<BaseStructure> structure, int32_t* data,
size_t count);
77 void appendUIntData(std::shared_ptr<BaseStructure> structure, uint32_t* data,
size_t count);
78 void appendShortData(std::shared_ptr<BaseStructure> structure, int16_t* data,
size_t count);
79 void appendUShortData(std::shared_ptr<BaseStructure> structure, uint16_t* data,
size_t count);
80 void appendLongData(std::shared_ptr<BaseStructure> structure, int64_t* data,
size_t count);
81 void appendULongData(std::shared_ptr<BaseStructure> structure, uint64_t* data,
size_t count);
82 void appendCharData(std::shared_ptr<BaseStructure> structure,
char* data,
size_t count);
83 void appendUCharData(std::shared_ptr<BaseStructure> structure,
unsigned char* data,
size_t count);
84 void appendFloatData(std::shared_ptr<BaseStructure> structure,
float* data,
size_t count);
85 void appendDoubleData(std::shared_ptr<BaseStructure> structure,
double* data,
size_t count);
86 void appendStringData(std::shared_ptr<BaseStructure> structure, std::string* data,
size_t count);
88 std::shared_ptr<CompositeData> *data,
size_t count);
90 std::shared_ptr<EvioEvent>
getEvent();
91 void setEvent(std::shared_ptr<EvioEvent> & ev);
93 static int main(
int argc,
char **argv);
97 static void fakeIntArray(uint32_t* array, uint32_t size);
98 static void fakeShortArray(uint16_t* array, uint32_t size);
99 static std::string* fakeStringArray();
100 static void fakeDoubleArray(
double *array, uint32_t size);
108 #endif //EVIO_6_0_EVENTBUILDER_H
void appendFloatData(std::shared_ptr< BaseStructure > structure, float *data, size_t count)
Append float data to the structure.
Definition: EventBuilder.cpp:671
std::shared_ptr< EvioEvent > getEvent()
Get the underlying event.
Definition: EventBuilder.cpp:773
void setAllHeaderLengths()
This goes through the event recursively, and makes sure all the length fields in the headers are prop...
Definition: EventBuilder.cpp:41
void setIntData(std::shared_ptr< BaseStructure > structure, int32_t *data, size_t count)
Set int data in the structure.
Definition: EventBuilder.cpp:158
void appendUCharData(std::shared_ptr< BaseStructure > structure, unsigned char *data, size_t count)
Append unsigned char data to the structure.
Definition: EventBuilder.cpp:645
void setUIntData(std::shared_ptr< BaseStructure > structure, uint32_t *data, size_t count)
Set unsigned int data in the structure.
Definition: EventBuilder.cpp:183
void setUCharData(std::shared_ptr< BaseStructure > structure, unsigned char *data, size_t count)
Set unsigned char data in the structure.
Definition: EventBuilder.cpp:333
void setUShortData(std::shared_ptr< BaseStructure > structure, uint16_t *data, size_t count)
Set unsigned short data in the structure.
Definition: EventBuilder.cpp:233
void setLongData(std::shared_ptr< BaseStructure > structure, int64_t *data, size_t count)
Set long data in the structure.
Definition: EventBuilder.cpp:258
This class is used for creating and manipulating events.
Definition: EventBuilder.h:43
void addChild(std::shared_ptr< BaseStructure > parent, std::shared_ptr< BaseStructure > child)
Add a child to a parent structure.
Definition: EventBuilder.cpp:72
void appendLongData(std::shared_ptr< BaseStructure > structure, int64_t *data, size_t count)
Append long data to the structure.
Definition: EventBuilder.cpp:567
void setEvent(std::shared_ptr< EvioEvent > &ev)
Set the underlying event.
Definition: EventBuilder.cpp:781
void appendDoubleData(std::shared_ptr< BaseStructure > structure, double *data, size_t count)
Append double data to the structure.
Definition: EventBuilder.cpp:697
void setShortData(std::shared_ptr< BaseStructure > structure, int16_t *data, size_t count)
Set short data in the structure.
Definition: EventBuilder.cpp:208
void setCharData(std::shared_ptr< BaseStructure > structure, char *data, size_t count)
Set char data in the structure.
Definition: EventBuilder.cpp:308
void setStringData(std::shared_ptr< BaseStructure > structure, std::string *data, size_t count)
Set string data in the structure.
Definition: EventBuilder.cpp:408
void appendIntData(std::shared_ptr< BaseStructure > structure, int32_t *data, size_t count)
Append int data to the structure.
Definition: EventBuilder.cpp:462
void setFloatData(std::shared_ptr< BaseStructure > structure, float *data, size_t count)
Set float data in the structure.
Definition: EventBuilder.cpp:358
void appendULongData(std::shared_ptr< BaseStructure > structure, uint64_t *data, size_t count)
Append unsigned long data to the structure.
Definition: EventBuilder.cpp:593
void appendStringData(std::shared_ptr< BaseStructure > structure, std::string *data, size_t count)
Append string data to the structure.
Definition: EventBuilder.cpp:723
Numerical values associated with evio data types.
Definition: DataType.h:32
void setCompositeData(std::shared_ptr< BaseStructure > structure, std::shared_ptr< CompositeData > *data, size_t count)
Set composite data in the structure.
Definition: EventBuilder.cpp:433
void setULongData(std::shared_ptr< BaseStructure > structure, uint64_t *data, size_t count)
Set unsigned long data in the structure.
Definition: EventBuilder.cpp:283
void clearData(std::shared_ptr< BaseStructure > structure)
This clears all the data fields in a structure, but not the parent or the children.
Definition: EventBuilder.cpp:57
void appendCharData(std::shared_ptr< BaseStructure > structure, char *data, size_t count)
Append char data to the structure.
Definition: EventBuilder.cpp:619
void appendCompositeData(std::shared_ptr< BaseStructure > structure, std::shared_ptr< CompositeData > *data, size_t count)
Append string data to the structure.
Definition: EventBuilder.cpp:749
void appendUIntData(std::shared_ptr< BaseStructure > structure, uint32_t *data, size_t count)
Append unsigned int data to the structure.
Definition: EventBuilder.cpp:489
void appendShortData(std::shared_ptr< BaseStructure > structure, int16_t *data, size_t count)
Append short data to the structure.
Definition: EventBuilder.cpp:515
EventBuilder(uint16_t tag, DataType const dataType, uint8_t num)
This is the constructor to use for an EventBuilder object that will operate on a new, empty event.
Definition: EventBuilder.cpp:24
static int main(int argc, char **argv)
Main program for testing.
Definition: EventBuilder.cpp:792
void appendUShortData(std::shared_ptr< BaseStructure > structure, uint16_t *data, size_t count)
Append unsigned short data to the structure.
Definition: EventBuilder.cpp:541
void setDoubleData(std::shared_ptr< BaseStructure > structure, double *data, size_t count)
Set double data in the structure.
Definition: EventBuilder.cpp:383