Commit 2a0526c2 authored by Håkan Wennlöf's avatar Håkan Wennlöf
Browse files

Reinstated the unfairly-removed const

parent 03e46ed3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ void GeometryManager::load(ConfigManager* conf_manager, RandomNumberGenerator& s

    // Loop over all defined detectors
    LOG(DEBUG) << "Loading detectors";
    // Gets me a list of detector configurations. The sections for each detector in the geometry config file.
    // Gets a list of detector configurations. The sections for each detector in the geometry config file.
    for(auto& geometry_section : conf_manager->getDetectorConfigurations()) {

        // Read role of this section and default to "active" (i.e. detector)
+2 −2
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@
using namespace allpix;
using namespace ROOT::Math;

std::shared_ptr<PassiveMaterialModel> allpix::PassiveMaterialModel::factory(Configuration& config,
std::shared_ptr<PassiveMaterialModel> allpix::PassiveMaterialModel::factory(const Configuration& config,
                                                                            GeometryManager* geo_manager) {
    auto type = config.get<std::string>("type");
    if(type == "box") {
@@ -57,7 +57,7 @@ std::shared_ptr<PassiveMaterialModel> allpix::PassiveMaterialModel::factory(Conf
    }
}

PassiveMaterialModel::PassiveMaterialModel(Configuration& config, GeometryManager* geo_manager)
PassiveMaterialModel::PassiveMaterialModel(const Configuration& config, GeometryManager* geo_manager)
    : config_(std::move(config)), geo_manager_(geo_manager) {
    name_ = config_.getName();
    mother_volume_ = config_.get<std::string>("mother_volume", "");
+2 −2
Original line number Diff line number Diff line
@@ -44,14 +44,14 @@ namespace allpix {
         * @param geo_manager Pointer to the global geometry manager
         * @return By param trackModel assigned track model to be used
         */
        static std::shared_ptr<PassiveMaterialModel> factory(Configuration& config, GeometryManager* geo_manager);
        static std::shared_ptr<PassiveMaterialModel> factory(const Configuration& config, GeometryManager* geo_manager);

        /**
         * @brief Constructs the base passive material model
         * @param config Configuration with description of the model
         * @param geo_manager Pointer to the global geometry manager
         */
        PassiveMaterialModel(Configuration& config, GeometryManager* geo_manager);
        PassiveMaterialModel(const Configuration& config, GeometryManager* geo_manager);

        /**
         * @brief Essential virtual destructor
+2 −1
Original line number Diff line number Diff line
@@ -34,7 +34,8 @@ namespace allpix {
         * @param config Configuration with description of the model
         * @param geo_manager Pointer to the global geometry manager
         */
        explicit BoxModel(Configuration& config, GeometryManager* geo_manager) : PassiveMaterialModel(config, geo_manager) {
        explicit BoxModel(const Configuration& config, GeometryManager* geo_manager)
            : PassiveMaterialModel(config, geo_manager) {

            // Set the box specifications
            setOuterSize(config_.get<ROOT::Math::XYZVector>("size"));
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ namespace allpix {
         * @param config Configuration with description of the model
         * @param geo_manager Pointer to the global geometry manager
         */
        explicit CylinderModel(Configuration& config, GeometryManager* geo_manager)
        explicit CylinderModel(const Configuration& config, GeometryManager* geo_manager)
            : PassiveMaterialModel(config, geo_manager) {

            // Set the cylinder specifications
Loading