gdata
Loading...
Searching...
No Matches
gEventDataCollection.cc
Go to the documentation of this file.
1
7#include "gEventHeader.h"
8
9std::atomic<int> GEventDataCollection::globalEventDataCollectionCounter{1};
10std::atomic<int> GEventHeader::globalEventHeaderCounter{1};
11
12void GEventDataCollection::addDetectorTrueInfoData(const std::string& sdName, std::unique_ptr<GTrueInfoData> data) {
13 if (gdataCollectionMap.find(sdName) == gdataCollectionMap.end()) { gdataCollectionMap[sdName] = std::make_unique<GDataCollection>(); }
14 gdataCollectionMap[sdName]->addTrueInfoData(std::move(data));
15 log->info(2, "GEventDataCollection: added new detector TrueInfoData for ", sdName);
16}
17
18void GEventDataCollection::addDetectorDigitizedData(const std::string& sdName, std::unique_ptr<GDigitizedData> data) {
19 if (gdataCollectionMap.find(sdName) == gdataCollectionMap.end()) { gdataCollectionMap[sdName] = std::make_unique<GDataCollection>(); }
20 gdataCollectionMap[sdName]->addDigitizedData(std::move(data));
21 log->info(2, "GEventDataCollection: added new detector DigitizedData for ", sdName);
22}
23
void addDetectorTrueInfoData(const std::string &sdName, std::unique_ptr< GTrueInfoData > data)
Adds true hit information data for a detector.
void addDetectorDigitizedData(const std::string &sdName, std::unique_ptr< GDigitizedData > data)
Adds digitized hit data for a detector.