14void GRunDataCollection::collectDetectorDigitizedData(
const std::string& sdName,
15 const std::unique_ptr<GDigitizedData>& data) {
17 if (gdataCollectionMap.find(sdName) == gdataCollectionMap.end()) {
18 gdataCollectionMap[sdName] = std::make_unique<GDataCollection>();
22 gdataCollectionMap[sdName]->collectDigitizedData(data);
30 auto& dcm = edc->getDataCollectionMap();
33 for (
auto& [sdname, ptr] : dcm) {
36 auto& digitized_data = ptr->getDigitizedData();
37 for (
auto& digitized_data_hit : digitized_data) {
38 collectDetectorDigitizedData(sdname, digitized_data_hit);
44 std::unique_ptr<GDigitizedData> ddata) {
45 collectDetectorDigitizedData(sdName, ddata);
46 log->
info(2, *gdataCollectionMap[sdName]);
57 for (
const auto& [sdName, other_data_collection] : other_map) {
58 if (!other_data_collection) {
62 const auto& other_digitized_data = other_data_collection->getDigitizedData();
63 for (
const auto& digitized_data_hit : other_digitized_data) {
64 if (digitized_data_hit) {
65 collectDetectorDigitizedData(sdName, digitized_data_hit);
std::shared_ptr< GLogger > log
void info(int level, Args &&... args) const
Owns and updates the run-level detector summary map.
auto getDataCollectionMap() const -> const std::map< std::string, std::unique_ptr< GDataCollection > > &
Returns read-only access to the detector summary map.
void collect_event_data_collection(const std::shared_ptr< GEventDataCollection > edc)
Integrates one event collection into the run summary.
void collect_event_data_collections(const std::string &sdName, std::unique_ptr< GDigitizedData > ddata)
Integrates one digitized object into the named detector entry.
void merge(const GRunDataCollection &other)
Merges another run accumulator into this one.
auto get_events_processed() const -> int
Returns the total processed-event count stored in the header.
auto get_events_with_payload() const -> int
Returns the number of processed events that contributed payload.
Defines GRunDataCollection, the run-level aggregation of detector data.