41 GDigitizedData(
const std::shared_ptr<GOptions>& gopts,
const GHit* ghit);
90 [[nodiscard]]
inline std::map<std::string, std::vector<double>>
getArrayDblObservablesMap()
const {
return arrayDoubleObservablesMap; }
93 static std::unique_ptr<GDigitizedData>
create(
const std::shared_ptr<GOptions>& gopts) {
94 auto hit = GHit::create(gopts);
95 auto digi_data = std::make_unique<GDigitizedData>(gopts, hit);
96 auto counter = globalDigitizedDataCounter.fetch_add(1, std::memory_order_relaxed);
102 digi_data->includeVariable(
"adc", counter * 0.1);
107 std::map<std::string, int> intObservablesMap;
108 std::map<std::string, double> doubleObservablesMap;
109 std::map<std::string, std::vector<int>> arrayIntObservablesMap;
110 std::map<std::string, std::vector<double>> arrayDoubleObservablesMap;
111 std::vector<GIdentifier> gidentity;
112 [[nodiscard]]
static bool validVarName(
const std::string& varName,
int which);
115 static std::atomic<int> globalDigitizedDataCounter;
static std::unique_ptr< GDigitizedData > create(const std::shared_ptr< GOptions > &gopts)
int getIntObservable(const std::string &varName)
std::map< std::string, int > getIntObservablesMap(int which) const
Returns the filtered map of integer observables.
int getTimeAtElectronics()
Gets the time at electronics.
void includeVariable(const std::string &vname, int value)
std::map< std::string, double > getDblObservablesMap(int which) const
Returns the filtered map of double observables.
GDigitizedData(const std::shared_ptr< GOptions > &gopts, const GHit *ghit)
Constructs a GDigitizedData object from a GHit.
double getDblObservable(const std::string &varName)
std::string getIdentityString() const
Returns a string representation of the hit identity.
std::map< std::string, std::vector< int > > getArrayIntObservablesMap() const
Returns the map of integer array observables.
std::map< std::string, std::vector< double > > getArrayDblObservablesMap() const
Returns the map of double array observables.
constexpr const char * GDIGITIZED_DATA_LOGGER
Defines constants and exit codes for the GData library.
constexpr const char * TIMEATELECTRONICS
Identifier for time at electronics.
constexpr const char * CRATESTRINGID
Identifier for crate.
constexpr const char * CHANNELSTRINGID
Identifier for channel.
constexpr const char * SLOTSTRINGID
Identifier for slot.