Replace some low hanging fruit raw pointers with std::unique_ptr to not have to care about manual memory management.
78 lines
4.1 KiB
C++
78 lines
4.1 KiB
C++
/***************************************************************************
|
|
* musrSim - the program for the simulation of (mainly) muSR instruments. *
|
|
* More info on http://lmu.web.psi.ch/simulation/index.html . *
|
|
* musrSim is based od Geant4 (http://geant4.web.cern.ch/geant4/) *
|
|
* *
|
|
* Copyright (C) 2009 by Paul Scherrer Institut, 5232 Villigen PSI, *
|
|
* Switzerland *
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
* (at your option) any later version. *
|
|
* *
|
|
* This program is distributed in the hope that it will be useful, *
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
* GNU General Public License for more details. *
|
|
* *
|
|
* You should have received a copy of the GNU General Public License *
|
|
* along with this program; if not, write to the Free Software *
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
|
|
***************************************************************************/
|
|
|
|
#ifndef musrPrimaryGeneratorMessenger_h
|
|
#define musrPrimaryGeneratorMessenger_h 1
|
|
|
|
#include "G4UImessenger.hh"
|
|
#include "globals.hh"
|
|
|
|
class musrPrimaryGeneratorAction;
|
|
class G4UIcmdWithAString;
|
|
class G4UIcmdWithADoubleAndUnit;
|
|
class G4UIcmdWithADouble;
|
|
class G4UIcmdWithAnInteger;
|
|
class G4UIcmdWith3VectorAndUnit;
|
|
class G4UIcmdWith3Vector;
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
class musrPrimaryGeneratorMessenger : public G4UImessenger {
|
|
public:
|
|
musrPrimaryGeneratorMessenger(musrPrimaryGeneratorAction *);
|
|
~musrPrimaryGeneratorMessenger();
|
|
|
|
void SetNewValue(G4UIcommand *, G4String);
|
|
|
|
private:
|
|
musrPrimaryGeneratorAction *musrAction;
|
|
std::unique_ptr<G4UIcmdWithAString> setPrimaryParticleCmd;
|
|
std::unique_ptr<G4UIcmdWith3VectorAndUnit> setvertexCmd;
|
|
std::unique_ptr<G4UIcmdWith3VectorAndUnit> setvertexSigmaCmd;
|
|
std::unique_ptr<G4UIcmdWith3VectorAndUnit> setvertexBoundaryCmd;
|
|
std::unique_ptr<G4UIcmdWithADoubleAndUnit> setvertexRelativeRCmd;
|
|
std::unique_ptr<G4UIcmdWithADoubleAndUnit> setMeanArrivalTimeCmd;
|
|
std::unique_ptr<G4UIcmdWithADoubleAndUnit> setStarttimeCmd;
|
|
std::unique_ptr<G4UIcmdWithADoubleAndUnit> setStarttimeSigmaCmd;
|
|
std::unique_ptr<G4UIcmdWith3VectorAndUnit> setboxBoundaryCmd;
|
|
std::unique_ptr<G4UIcmdWith3VectorAndUnit> setboxBoundaryCentreCmd;
|
|
std::unique_ptr<G4UIcmdWithADoubleAndUnit> setKEnergyCmd;
|
|
std::unique_ptr<G4UIcmdWithADoubleAndUnit> setMomentumCmd;
|
|
std::unique_ptr<G4UIcmdWithADoubleAndUnit> setMomentumSmearingCmd;
|
|
std::unique_ptr<G4UIcmdWith3VectorAndUnit> setMomentumBoundaryCmd;
|
|
std::unique_ptr<G4UIcmdWith3VectorAndUnit> setTiltAngleCmd;
|
|
std::unique_ptr<G4UIcmdWith3VectorAndUnit> setSigmaTiltAngleCmd;
|
|
std::unique_ptr<G4UIcmdWithADoubleAndUnit> setPitchCmd;
|
|
std::unique_ptr<G4UIcmdWith3Vector> setMuonPolarizCmd;
|
|
std::unique_ptr<G4UIcmdWith3Vector> setDirectionCmd;
|
|
std::unique_ptr<G4UIcmdWithADouble> setMuonPolarizFractionCmd;
|
|
std::unique_ptr<G4UIcmdWith3VectorAndUnit> setMuonDecayTimeCmd;
|
|
std::unique_ptr<G4UIcmdWithAString> setTurtleCmd;
|
|
std::unique_ptr<G4UIcmdWithADoubleAndUnit> setTurtleZ0Cmd;
|
|
std::unique_ptr<G4UIcmdWithAString> setTurtleInterpretAxesCmd;
|
|
std::unique_ptr<G4UIcmdWith3Vector> setTurtleMomentumBite;
|
|
std::unique_ptr<G4UIcmdWithADouble> setTurtleMomentumScalingFactor;
|
|
std::unique_ptr<G4UIcmdWithAnInteger> setTurtleEventNrCmd;
|
|
};
|
|
#endif
|