MIDSX 0.1
A x-ray transport code system for dosimetry
Loading...
Searching...
No Matches
volume_quantity_container.h
1#ifndef MIDSX_VOLUME_QUANTITY_CONTAINER_H
2#define MIDSX_VOLUME_QUANTITY_CONTAINER_H
3
4#include <memory>
5#include <unordered_map>
6#include "volume_quantity.h"
7#include "tally_data.h"
8
16public:
23
30
36 void measureAll(TempVolumeTallyData& temp_tally_data);
37
45
50 void clear();
51
57 std::unordered_map<VectorVolumeQuantityType, VectorVolumeQuantity>& getVectorQuantities();
58
64 std::unordered_map<CountVolumeQuantityType, CountVolumeQuantity>& getCountQuantities();
65
71 void setVolume(double volume);
72
78 double getVolume() const;
79private:
80 std::unordered_map<VectorVolumeQuantityType, VectorVolumeQuantity> vector_quantities_;
81 std::unordered_map<CountVolumeQuantityType, CountVolumeQuantity> count_quantities_;
82 double volume_;
83};
84
85namespace VolumeQuantityContainerFactory {
86 VolumeQuantityContainer AllQuantities();
87 VolumeQuantityContainer EnergyDeposition();
88}
89
90#endif //MIDSX_VOLUME_QUANTITY_CONTAINER_H
Class which represents a vector quantity for a volume tally.
Class which represents a container for volume quantities.
void addVectorQuantity(const VectorVolumeQuantity &quantity)
Adds a vector quantity to the container.
std::unordered_map< VectorVolumeQuantityType, VectorVolumeQuantity > & getVectorQuantities()
Gets the map of vector quantities in the container.
void setVolume(double volume)
Sets the volume of the volume tally.
void addCountQuantity(const CountVolumeQuantity &quantity)
Adds a count quantity to the container.
VolumeQuantityContainer operator+(VolumeQuantityContainer &other) const
Overloads the + operator for VolumeQuantityContainer.
double getVolume() const
Gets the volume of the volume tally.
std::unordered_map< CountVolumeQuantityType, CountVolumeQuantity > & getCountQuantities()
Gets the map of count quantities in the container.
void measureAll(TempVolumeTallyData &temp_tally_data)
Measures all quantities in the container for a TempVolumeTallyData object.
void clear()
Clears the container of all quantities.
Struct which represents the temporary data for a volume tally.
Definition tally_data.h:37