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."); }
/** 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."); }
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"); }
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']"); }
// Standard Constructor EvtCollectionStream::EvtCollectionStream(const std::string& name, ISvcLocator* pSvcLocator) : Algorithm(name, pSvcLocator) { m_storeName = "TagCollectionSvc"; declareProperty("ItemList", m_itemNames); declareProperty("EvtDataSvc", m_storeName); }
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"); }
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)"); }
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"); }
/** 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."); }
//-------------------------------------------------------------------------- // Private methods //-------------------------------------------------------------------------- /// Initialisation method. void LoadAscii::init() { std::vector<std::string> exts; exts.push_back(".dat"); exts.push_back(".txt"); exts.push_back(".csv"); exts.push_back(""); declareProperty(new FileProperty("Filename", "", FileProperty::Load, exts), "A comma separated Ascii file"); declareProperty(new WorkspaceProperty<Workspace>("OutputWorkspace", "",Direction::Output), "The name of the workspace that will be created."); std::string spacers[5][2] = { {"CSV", ","}, {"Tab", "\t"}, {"Space", " "}, {"Colon", ":"}, {"SemiColon", ";"} }; // For the ListValidator std::vector<std::string> sepOptions; for( size_t i = 0; i < 5; ++i ) { std::string option = spacers[i][0]; m_separatorIndex.insert(std::pair<std::string,std::string>(option, spacers[i][1])); sepOptions.push_back(option); } declareProperty("Separator", "CSV", new ListValidator(sepOptions), "The column separator character (default: CSV)"); std::vector<std::string> units = UnitFactory::Instance().getKeys(); units.insert(units.begin(),"Dimensionless"); declareProperty("Unit","Energy",new Kernel::ListValidator(units), "The unit to assign to the X axis (default: Energy)"); BoundedValidator<int> * mustBePosInt = new BoundedValidator<int>(); mustBePosInt->setLower(0); declareProperty("SkipNumLines", EMPTY_INT(), mustBePosInt, "If set, this number of lines from the top of the file are ignored."); }
/** 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(); }
//============================================================================= // 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 ); }
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); }
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"); }
//----------------------------------------------------------------------------- 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."); }
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"); }
MergeCells::MergeCells(const std::string& aName, ISvcLocator* aSvcLoc): GaudiAlgorithm(aName, aSvcLoc){ declareInput("inhits", m_inHits,"hits/caloInHits"); declareOutput("outhits", m_outHits,"hits/caloOutHits"); declareProperty("readout", m_readoutName); declareProperty("identifier", m_idToMerge); declareProperty("merge", m_numToMerge = 0); declareProperty("debugPrint", m_debugPrint = 10); }
G4SaveSmearedParticles::G4SaveSmearedParticles(const std::string& aType, const std::string& aName, const IInterface* aParent) : AlgTool(aType, aName, aParent) { declareInterface<IG4SaveOutputTool>(this); declareOutput("particles", m_particles,"particles/smearedParticles"); declareOutput("particlesMCparticles", m_particlesMCparticles,"particles/smearedParticles"); // needed for AlgTool wit output/input until it appears in Gaudi AlgTool constructor declareProperty("DataInputs", inputDataObjects()); declareProperty("DataOutputs", outputDataObjects()); }
GetDataObjectAlg(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"); declareProperty("IgnoreMissing", m_ignoreMissing=false, "if True, missing objects will not beconsidered an error"); }
//-------------------------------------------------------------------------- // Private methods //-------------------------------------------------------------------------- /// Initialisation method. void LoadTBL::init() { declareProperty(Kernel::make_unique<FileProperty>("Filename", "", FileProperty::Load, ".tbl"), "The name of the table file to read, including its full or " "relative path. The file extension must be .tbl"); declareProperty(make_unique<WorkspaceProperty<ITableWorkspace>>( "OutputWorkspace", "", Direction::Output), "The name of the workspace that will be created."); }
SimG4ParticleSmearSimple::SimG4ParticleSmearSimple(const std::string& type, const std::string& name, const IInterface* parent): GaudiTool(type, name, parent) { declareInterface<ISimG4ParticleSmearTool>(this); declareProperty("detectorNames", m_volumeNames); declareProperty("sigma", m_sigma = 0.01); declareProperty("minP", m_minP = 0); declareProperty("maxP", m_maxP = 0); declareProperty("maxEta", m_maxEta = 0); }
/** Initialize the algorithm's properties. */ void LoadNXSPE::init() { const std::vector<std::string> exts{".nxspe", ""}; declareProperty(Kernel::make_unique<FileProperty>("Filename", "", FileProperty::Load, exts), "An NXSPE file"); declareProperty(make_unique<WorkspaceProperty<>>("OutputWorkspace", "", Direction::Output), "The name of the workspace that will be created."); }
SimG4ParticleSmearFormula::SimG4ParticleSmearFormula(const std::string& type, const std::string& name, const IInterface* parent): GaudiTool(type, name, parent), m_resolutionMomentum() { declareInterface<ISimG4ParticleSmearTool>(this); declareProperty("detectorNames", m_volumeNames); declareProperty("resolutionMomentum", m_resolutionMomentumStr = ""); declareProperty("minP", m_minP = 0); declareProperty("maxP", m_maxP = 0); declareProperty("maxEta", m_maxEta = 0); }
G4SaveCalHits::G4SaveCalHits(const std::string& aType, const std::string& aName, const IInterface* aParent) : GaudiTool(aType, aName, aParent) { declareInterface<IG4SaveOutputTool>(this); declareProperty("caloType", m_calType); declareOutput("caloClusters", m_caloClusters,"hits/caloClusters"); declareOutput("caloHits", m_caloHits,"hits/caloHits"); // needed for AlgTool wit output/input until it appears in Gaudi AlgTool constructor declareProperty("DataInputs", inputDataObjects()); declareProperty("DataOutputs", outputDataObjects()); }
DelphesSaveGenJets::DelphesSaveGenJets(const std::string& aType, const std::string& aName, const IInterface* aParent) : GaudiTool(aType, aName, aParent) { declareInterface<IDelphesSaveOutputTool>(this); declareOutput("genJets", m_genJets); declareOutput("genJetsFlavorTagged", m_taggedGenJets); declareProperty("delphesArrayName", m_delphesArrayName); // needed for AlgTool wit output/input until it appears in Gaudi AlgTool constructor declareProperty("DataInputs", inputDataObjects()); declareProperty("DataOutputs", outputDataObjects()); }
ConstPileUp::ConstPileUp( const std::string& type, const std::string& name, const IInterface* parent) : GaudiTool ( type, name , parent ) { declareInterface< IPileUpTool >( this ); declareProperty( "numPileUpEvents", m_numPileUpEvents = 0 ); declareProperty( "Filename", m_filename = "" ); }
SimG4SaveTrackerHits::SimG4SaveTrackerHits(const std::string& aType, const std::string& aName, const IInterface* aParent) : GaudiTool(aType, aName, aParent) { declareInterface<ISimG4SaveOutputTool>(this); declareProperty("readoutNames", m_readoutNames); declareOutput("trackClusters", m_trackClusters,"hits/trackerClusters"); declareOutput("trackHits", m_trackHits,"hits/trackerHits"); declareOutput("trackHitsClusters", m_trackHitsClusters,"hits/trackerAssociations"); // needed for AlgTool wit output/input until it appears in Gaudi AlgTool constructor declareProperty("DataInputs", inputDataObjects()); declareProperty("DataOutputs", outputDataObjects()); }
//============================================================================= // Standard constructor, initializes variables //============================================================================= TbPacketRecycler::TbPacketRecycler(const std::string& name, ISvcLocator* pSvcLocator) : TbAlgorithm(name, pSvcLocator) { // Declare algorithm properties - see header for description. declareProperty("HitLocation", m_hitLocation = LHCb::TbHitLocation::Default); declareProperty("TriggerLocation", m_trgLocation = LHCb::TbTriggerLocation::Default); declareProperty("ClusterLocation", m_clusLocation = LHCb::TbClusterLocation::Default); }
//============================================================================= // Standard constructor, initializes variables //============================================================================= PrTrackAssociator::PrTrackAssociator( const std::string& name, ISvcLocator* pSvcLocator ) : GaudiAlgorithm( name, pSvcLocator ) { declareProperty( "RootOfContainers", m_rootOfContainers = "/Event/Rec/Track" ); declareProperty( "SingleContainer", m_singleContainer = "" ); declareProperty( "FractionOK" , m_fractionOK = 0.70 ); declareProperty( "TrackContainerIDs", m_containerIDs = { LHCb::Track::classID() + 0x60000, LHCb::Track::Selection::classID() }); }
/** Standard constructor * */ ArrayProperties ( const std::string& name , // algorithm instance name ISvcLocator* pSvc ) // service locator : GaudiAlgorithm ( name , pSvc ) { // std::fill_n ( m_doubles , 5 , -10 ) ; std::fill_n ( m_strings , 4 , "blah-blah-blah" ) ; // declareProperty ( "Doubles" , m_doubles , "C-array of doubles" ) ; declareProperty ( "Strings" , m_strings , "C-array of strings" ) ; }