本文整理汇总了C++中declareProperty函数的典型用法代码示例。如果您正苦于以下问题:C++ declareProperty函数的具体用法?C++ declareProperty怎么用?C++ declareProperty使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了declareProperty函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CustomIncidentAlg
CustomIncidentAlg(const std::string& name, ISvcLocator *pSvcLocator):
GaudiAlgorithm(name, pSvcLocator) {
declareProperty("EventCount", m_eventCount = 3,
"Number of events to let go before firing the incident.");
declareProperty("Incident", m_incident = "",
"Type of incident to fire.");
}
示例2: declareProperty
/** Initialize the algorithm's properties.
*/
void PoldiIndexKnownCompounds::init() {
declareProperty(make_unique<WorkspaceProperty<TableWorkspace>>(
"InputWorkspace", "", Direction::Input),
"Workspace that contains unindexed peaks.");
declareProperty(make_unique<ArrayProperty<std::string>>("CompoundWorkspaces"),
"A comma-separated list of workspace names or a workspace "
"group. Each workspace must contain a list of indexed "
"reflections.");
declareProperty(
Kernel::make_unique<ArrayProperty<double>>("Tolerances",
std::vector<double>(1, 0.01)),
"Maximum relative tolerance delta(d)/d for lines to be indexed. Either "
"one value or one for each compound.");
declareProperty(Kernel::make_unique<ArrayProperty<double>>(
"ScatteringContributions", std::vector<double>(1, 1.0)),
"Approximate scattering contribution ratio of the compounds. "
"If omitted, all are assumed to contribute to scattering "
"equally.");
declareProperty(make_unique<WorkspaceProperty<WorkspaceGroup>>(
"OutputWorkspace", "", Direction::Output),
"A workspace group that contains workspaces with indexed and "
"unindexed reflections from the input workspace.");
}
示例3: GaudiAlgorithm
DelphesSimulation::DelphesSimulation(const std::string& name, ISvcLocator* svcLoc):
GaudiAlgorithm(name, svcLoc) ,
m_DelphesCard(),
m_Delphes(nullptr),
m_hepMCConverter(nullptr),
m_eventCounter(0),
m_outRootFile(nullptr),
m_outRootFileName(""),
m_treeWriter(nullptr),
m_branchEvent(nullptr),
m_confReader(nullptr),
m_allParticles(nullptr),
m_stableParticles(nullptr),
m_partons(nullptr)
{
//declareProperty("filename", m_filename="" , "Name of the HepMC file to read");
declareProperty("DelphesCard" , m_DelphesCard , "Name of Delphes tcl config file with detector and simulation parameters");
declareProperty("ROOTOutputFile" , m_outRootFileName , "Name of Delphes Root output file, if defined, the Delphes standard tree write out (in addition to FCC-EDM based output to transient data store)");
declareInput("hepmc", m_hepmcHandle);
declareProperty("outputs", m_saveToolNames);
declareOutput("genParticles" , m_handleGenParticles, "genParticles");
declareOutput("genVertices" , m_handleGenVertices, "genVertices");
}
示例4: StopLoopAlg
StopLoopAlg(const std::string& name, ISvcLocator *pSvcLocator):
GaudiAlgorithm(name, pSvcLocator) {
declareProperty("EventCount", m_eventCount = 3,
"Number of events to let go before breaking the event loop");
declareProperty("Mode", m_mode = "failure",
"Type of interruption ['exception', 'stopRun', 'failure']");
}
示例5: Algorithm
// Standard Constructor
EvtCollectionStream::EvtCollectionStream(const std::string& name, ISvcLocator* pSvcLocator)
: Algorithm(name, pSvcLocator)
{
m_storeName = "TagCollectionSvc";
declareProperty("ItemList", m_itemNames);
declareProperty("EvtDataSvc", m_storeName);
}
示例6: SignallingAlg
SignallingAlg(const std::string& name, ISvcLocator *pSvcLocator):
GaudiAlgorithm(name, pSvcLocator){
declareProperty("EventCount", m_eventCount = 3,
"Number of events to let go before raising the signal");
declareProperty("Signal", m_signal = SIGINT,
"Signal to raise");
}
示例7: GaudiAlgorithm
MergeHits::MergeHits(const std::string& name, ISvcLocator* svcLoc) :
GaudiAlgorithm(name, svcLoc)
{
declareProperty("positionedHits", m_positionedHits, "Positioned hits (Input)");
declareProperty("mergedHits", m_mergedHits, "Merged Tracker hits (Output)");
declareProperty("trackHits", m_trackHitHandle, "Dummy Hit collection (output)");
}
示例8: PutDataObjectAlg
PutDataObjectAlg(const std::string& name, ISvcLocator *pSvcLocator):
GaudiAlgorithm(name, pSvcLocator){
declareProperty("Paths", m_paths,
"List of paths in the transient store to load");
declareProperty("DataSvc", m_dataSvc = "EventDataSvc",
"Name of the data service to use");
}
示例9: declareProperty
/** Initialize the algorithm's properties.
*/
void ReflectometrySumInQ::init() {
auto inputWSValidator = boost::make_shared<Kernel::CompositeValidator>();
inputWSValidator->add<API::WorkspaceUnitValidator>("Wavelength");
inputWSValidator->add<API::InstrumentValidator>();
auto mandatoryNonnegative = boost::make_shared<Kernel::CompositeValidator>();
mandatoryNonnegative->add<Kernel::MandatoryValidator<double>>();
auto nonnegative = boost::make_shared<Kernel::BoundedValidator<double>>();
nonnegative->setLower(0.);
mandatoryNonnegative->add(nonnegative);
declareWorkspaceInputProperties<API::MatrixWorkspace,
API::IndexType::SpectrumNum |
API::IndexType::WorkspaceIndex>(
Prop::INPUT_WS, "A workspace in X units of wavelength to be summed.",
inputWSValidator);
declareProperty(
Kernel::make_unique<API::WorkspaceProperty<API::MatrixWorkspace>>(
Prop::OUTPUT_WS, "", Kernel::Direction::Output),
"A single histogram workspace containing the result of summation in Q.");
declareProperty(
Prop::BEAM_CENTRE, EMPTY_DBL(), mandatoryNonnegative,
"Fractional workspace index of the specular reflection centre.");
declareProperty(Prop::IS_FLAT_SAMPLE, true,
"If true, the summation is handled as the standard divergent "
"beam case, otherwise as the non-flat sample case.");
declareProperty(Prop::PARTIAL_BINS, false,
"If true, use the full projected wavelength range possibly "
"including partially filled bins.");
}
示例10: declareProperty
/** Initialize the algorithm's properties.
*/
void UnaryOperationMD::init()
{
declareProperty(new WorkspaceProperty<IMDWorkspace>(inputPropName(),"",Direction::Input),
"A MDEventWorkspace or MDHistoWorkspace on which to apply the operation.");
declareProperty(new WorkspaceProperty<IMDWorkspace>(outputPropName(),"",Direction::Output),
"Name of the output MDEventWorkspace or MDHistoWorkspace.");
this->initExtraProperties();
}
示例11: GaudiHistoAlg
//=============================================================================
// Standard constructor, initializes variables
//=============================================================================
HistoTimingAlg::HistoTimingAlg( const std::string& name,
ISvcLocator* pSvcLocator)
: GaudiHistoAlg ( name , pSvcLocator )
{
declareProperty( "UseLookup", m_useGaudiAlg = false );
declareProperty( "NumHistos", m_nHistos = 20 );
declareProperty( "NumTracks", m_nTracks = 30 );
}
示例12: GaudiTool
NoiseCaloCellsTool::NoiseCaloCellsTool(const std::string& type,const std::string& name, const IInterface* parent)
: GaudiTool(type, name, parent)
{
declareInterface<INoiseCaloCellsTool>(this);
declareProperty("cellNoise", m_cellNoise=50.0);
//remove cells with energy bellow filterThreshold (threshold is multiplied by a cell noise sigma)
declareProperty("filterNoiseThreshold", m_filterThreshold=3);
}
示例13: GaudiAlgorithm
CreateCaloCells::CreateCaloCells(const std::string& name, ISvcLocator* svcLoc) : GaudiAlgorithm(name, svcLoc) {
declareProperty("hits", m_hits, "Hits from which to create cells (input)");
declareProperty("cells", m_cells, "The created calorimeter cells (output)");
declareProperty("calibTool", m_calibTool, "Handle for tool to calibrate Geant4 energy to EM scale tool");
declareProperty("noiseTool", m_noiseTool, "Handle for the calorimeter cells noise tool");
declareProperty("geometryTool", m_geoTool, "Handle for the geometry tool");
}
示例14: ConversionSvc
//-----------------------------------------------------------------------------
RootHistCnv::PersSvc::PersSvc(const std::string& name, ISvcLocator* svc)
//-----------------------------------------------------------------------------
: ConversionSvc(name, svc, ROOT_StorageType), m_hfile(0), m_prtWar(false) {
declareProperty("OutputFile", m_defFileName = undefFileName);
declareProperty("ForceAlphaIds", m_alphaIds = false);
declareProperty("OutputEnabled", m_outputEnabled = true,
"Flag to enable/disable the output to file.");
}
示例15: GaudiAlgorithm
CreatePositionedHit::CreatePositionedHit(const std::string& name, ISvcLocator* svcLoc)
: GaudiAlgorithm(name, svcLoc) {
declareInput("caloCells", m_caloCells,"caloCells");
declareOutput("caloPositionedHits", m_caloPositionedHits,"caloPositionedHits");
declareProperty("readoutName", m_readoutName="ECalHitsNew");
declareProperty("activeFieldName", m_activeFieldName="active_layer");
declareProperty("activeVolumeName", m_activeVolumeName="LAr_sensitive");
}