LDMX Software
File.h
1#ifndef PACKING_RAWDATAFILE_FILE_H_
2#define PACKING_RAWDATAFILE_FILE_H_
3
4#include "Framework/Configure/Parameters.h"
5#include "Framework/Event.h"
6#include "Framework/RunHeader.h"
7#include "Packing/RawDataFile/EventPacket.h"
8#include "Packing/Utility/Reader.h"
9#include "Packing/Utility/Writer.h"
10
11namespace packing {
12namespace rawdatafile {
13
17class File {
18 public:
26
30 bool connect(framework::Event& event);
31
35 bool nextEvent();
36
40 void writeRunHeader(ldmx::RunHeader& header);
41
43 void close();
44
45 private:
49 std::string ecal_object_name_;
51 std::string hcal_object_name_;
57 std::string pass_name_;
60
61 private:
63 uint32_t entries_{0};
65 uint32_t i_entry_{0};
69 uint32_t run_;
76}; // File
77
78} // namespace rawdatafile
79} // namespace packing
80
81#endif // PACKING_RAWDATAFILE_FILE_H_
Class implementing an event buffer system for storing event data.
Implements an event buffer system for storing event data.
Definition Event.h:41
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition RunHeader.h:54
The raw data file object.
Definition File.h:17
bool skip_unavailable_
for writing, do we skip subsystems if their raw object is unavailable
Definition File.h:59
void writeRunHeader(ldmx::RunHeader &header)
Write the run header.
Definition File.cxx:129
uint32_t run_
run number corresponding to this file of raw data
Definition File.h:69
std::string tracker_object_name_
the event bus object name of the Tracker encoded data
Definition File.h:53
uint32_t i_entry_
current entry index (may not be same as event number)
Definition File.h:65
framework::Event * event_
handle to the event bus we are reading from or writing to
Definition File.h:67
std::string triggerpad_object_name_
the event bus object name of the Trigger Pad encoded data
Definition File.h:55
uint32_t entries_
number of entries in the file
Definition File.h:63
std::string ecal_object_name_
the event bus object name of the ECal encoded data
Definition File.h:49
utility::Reader reader_
utility class for reading binary data files
Definition File.h:71
utility::Writer writer_
utility class for writing binary data files
Definition File.h:73
bool connect(framework::Event &event)
Connect the passed event bus to this event file.
Definition File.cxx:71
std::string hcal_object_name_
the event bus object name of the HCal encoded data
Definition File.h:51
utility::CRC crc_
crc calculator for output mode
Definition File.h:75
bool is_output_
are we reading or writing?
Definition File.h:47
bool nextEvent()
Load the next event into our connected event bus.
Definition File.cxx:76
void close()
close this file
Definition File.cxx:144
std::string pass_name_
for writing, we also should be able to specify a pass name
Definition File.h:57
The HGC ROC and FPGA use a CRC checksum to double check that the data transfer has been done correctl...
Definition CRC.h:50
Reading a raw data file.
Definition Reader.h:19
Writing a raw data file.
Definition Writer.h:19