mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Namespace
This commit is contained in:
parent
54a8ea93ec
commit
93f09818da
@ -25,11 +25,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
See the full license in the file "LICENSE" in the top level distribution
|
||||
directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
/* END LEGAL */
|
||||
#ifndef HMC_OBSERVABLE_MODULES_H
|
||||
#define HMC_OBSERVABLE_MODULES_H
|
||||
|
||||
namespace Grid {
|
||||
NAMESPACE_BEGIN(Grid);
|
||||
|
||||
/////////////////////////////
|
||||
// Observables
|
||||
@ -38,7 +38,7 @@ template <class ObservableType, class OPar>
|
||||
class ObservableModule
|
||||
: public Parametrized<OPar>,
|
||||
public HMCModuleBase< QCD::HmcObservable<typename ObservableType::Field> > {
|
||||
public:
|
||||
public:
|
||||
typedef HMCModuleBase< QCD::HmcObservable< typename ObservableType::Field> > Base;
|
||||
typedef typename Base::Product Product;
|
||||
typedef OPar Parameters;
|
||||
@ -60,7 +60,7 @@ class ObservableModule
|
||||
return ObservablePtr.get();
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
virtual void initialize() = 0;
|
||||
};
|
||||
|
||||
@ -70,11 +70,9 @@ class ObservableModule
|
||||
// Modules
|
||||
////////////////
|
||||
|
||||
namespace QCD{
|
||||
|
||||
//// Observables module
|
||||
class PlaquetteObsParameters : Serializable {
|
||||
public:
|
||||
public:
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(PlaquetteObsParameters,
|
||||
std::string, output_prefix);
|
||||
};
|
||||
@ -88,7 +86,7 @@ class PlaquetteMod: public ObservableModule<PlaquetteLogger<Impl>, NoParameters>
|
||||
virtual void initialize(){
|
||||
this->ObservablePtr.reset(new PlaquetteLogger<Impl>());
|
||||
}
|
||||
public:
|
||||
public:
|
||||
PlaquetteMod(): ObsBase(NoParameters()){}
|
||||
};
|
||||
|
||||
@ -102,7 +100,7 @@ class TopologicalChargeMod: public ObservableModule<TopologicalCharge<Impl>, Top
|
||||
virtual void initialize(){
|
||||
this->ObservablePtr.reset(new TopologicalCharge<Impl>(this->Par_));
|
||||
}
|
||||
public:
|
||||
public:
|
||||
TopologicalChargeMod(TopologyObsParameters Par): ObsBase(Par){}
|
||||
TopologicalChargeMod(): ObsBase(){}
|
||||
};
|
||||
@ -120,7 +118,7 @@ class TopologicalChargeMod: public ObservableModule<TopologicalCharge<Impl>, Top
|
||||
template <char const *str, class Field, class ReaderClass >
|
||||
class HMC_ObservablesModuleFactory
|
||||
: public Factory < HMCModuleBase< QCD::HmcObservable<Field> >, Reader<ReaderClass> > {
|
||||
public:
|
||||
public:
|
||||
typedef Reader<ReaderClass> TheReader;
|
||||
// use SINGLETON FUNCTOR MACRO HERE
|
||||
HMC_ObservablesModuleFactory(const HMC_ObservablesModuleFactory& e) = delete;
|
||||
@ -130,7 +128,7 @@ class HMC_ObservablesModuleFactory
|
||||
return e;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
HMC_ObservablesModuleFactory(void) = default;
|
||||
std::string obj_type() const {
|
||||
return std::string(str);
|
||||
@ -139,7 +137,6 @@ class HMC_ObservablesModuleFactory
|
||||
|
||||
extern char observable_string[];
|
||||
|
||||
}
|
||||
|
||||
NAMESPACE_END(Grid);
|
||||
|
||||
#endif //HMC_OBSERVABLE_MODULES_H
|
Loading…
Reference in New Issue
Block a user