Base class to build a scenario from configuration and apply to either tracker or muon. More...
#include <MisalignmentScenarioBuilder.h>
Public Member Functions | |
virtual void | applyScenario (const edm::ParameterSet &scenario)=0 |
Apply misalignment scenario to the tracker (sub-system specific) More... | |
MisalignmentScenarioBuilder () | |
Default constructor. More... | |
virtual | ~MisalignmentScenarioBuilder () |
Destructor. More... | |
Protected Member Functions | |
void | applyMovements_ (Alignable *alignable, const edm::ParameterSet &pSet) |
Apply movements given by parameter set to given alignable. More... | |
void | decodeMovements_ (const edm::ParameterSet &pSet, const std::vector< Alignable * > &alignables) |
Decode movements defined in given parameter set for given set of alignables. More... | |
void | decodeMovements_ (const edm::ParameterSet &pSet, const std::vector< Alignable * > &alignables, const std::string &levelName) |
Decode movements defined in given parameter set for given set of alignables tagged by given name. More... | |
edm::ParameterSet | getParameterSet_ (const std::string &name, const edm::ParameterSet &pSet) const |
edm::ParameterSet | getParameterSet_ (const std::string &levelName, int iComponent, const edm::ParameterSet &pSet) const |
bool | hasParameter_ (const std::string &name, const edm::ParameterSet &pSet) const |
Check if given parameter exists in parameter set. More... | |
virtual bool | isTopLevel_ (const std::string ¶meterSetName) const |
Check if given parameter is for a top-level structure. More... | |
void | mergeParameters_ (edm::ParameterSet &localSet, const edm::ParameterSet &globalSet) const |
Merge two sets of parameters into one (the first argument) More... | |
virtual bool | possiblyPartOf (const std::string &subStruct, const std::string &largeStruct) const |
void | printParameters_ (const edm::ParameterSet &pSet, const bool showPsets=false) const |
Print all parameters and values for given set. More... | |
void | propagateParameters_ (const edm::ParameterSet &pSet, const std::string &globalName, edm::ParameterSet &subSet) const |
Propagate global parameters to sub-parameters. More... | |
const std::string | rootName_ (const std::string ¶meterSetName) const |
Get root name of a parameter set (e.g. 'Rod' in 'Rods' or 'Rod1') More... | |
Protected Attributes | |
std::string | indent_ |
Depth in hierarchy. More... | |
AlignableModifier | theModifier |
Helper class for random movements. More... | |
int | theModifierCounter |
Counter for applied modification. More... | |
edm::ParameterSet | theScenario |
Misalignment scenario to apply (from config file) More... | |
Base class to build a scenario from configuration and apply to either tracker or muon.
Definition at line 21 of file MisalignmentScenarioBuilder.h.
|
inline |
Default constructor.
Definition at line 27 of file MisalignmentScenarioBuilder.h.
|
inlinevirtual |
|
protected |
Apply movements given by parameter set to given alignable.
|
pure virtual |
Apply misalignment scenario to the tracker (sub-system specific)
Implemented in TrackerScenarioBuilder, and MuonScenarioBuilder.
|
protected |
Decode movements defined in given parameter set for given set of alignables.
Definition at line 24 of file MisalignmentScenarioBuilder.cc.
References AlignableObjectId::idToString(), fwlog::levelName(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by MuonScenarioBuilder::applyScenario(), TrackerScenarioBuilder::applyScenario(), and decodeMovements_().
|
protected |
Decode movements defined in given parameter set for given set of alignables tagged by given name.
Definition at line 54 of file MisalignmentScenarioBuilder.cc.
References decodeMovements_(), edm::ParameterSet::empty(), edm::ParameterSet::getParameterNames(), getParameterSet_(), edm::ParameterSet::getParameterSetNames(), indent_, LogDebug, mergeParameters_(), AlignableModifier::modify(), mergeVDriftHistosByStation::name, printParameters_(), propagateParameters_(), theModifier, and theModifierCounter.
|
protected |
Get parameter set corresponding to given name from pSet returns empty parameter set if does not exist)
Definition at line 215 of file MisalignmentScenarioBuilder.cc.
References edm::ParameterSet::getParameter(), hasParameter_(), mergeVDriftHistosByStation::name, and query::result.
Referenced by decodeMovements_(), MuonScenarioBuilder::extractParameters(), and mergeParameters_().
|
protected |
Get parameter set corresponding to given levelName and iComponent from pSet, any parameter set name like <levelName><m>, <levelName><m>_<n>, <levelName><m>_<n>_<o> etc. is accepted for iComponent == m, n or o. (returns empty parameter set if does not exist).
Definition at line 233 of file MisalignmentScenarioBuilder.cc.
References Exception, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), indent_, LogDebug, query::result, and AlCaHLTBitMon_QueryRunRegistry::string.
|
protected |
Check if given parameter exists in parameter set.
Definition at line 290 of file MisalignmentScenarioBuilder.cc.
References spr::find(), edm::ParameterSet::getParameterNames(), mergeVDriftHistosByStation::name, and cscdqm::h::names.
Referenced by MuonScenarioBuilder::applyScenario(), TrackerScenarioBuilder::applyScenario(), and getParameterSet_().
|
protectedvirtual |
Check if given parameter is for a top-level structure.
Reimplemented in TrackerScenarioBuilder.
Definition at line 343 of file MisalignmentScenarioBuilder.cc.
References pyrootRender::root, rootName_(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by propagateParameters_().
|
protected |
Merge two sets of parameters into one (the first argument)
Definition at line 117 of file MisalignmentScenarioBuilder.cc.
References edm::ParameterSet::addParameter(), edm::ParameterSet::copyFrom(), edm::ParameterSet::empty(), edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), getParameterSet_(), and indent_.
Referenced by decodeMovements_(), and propagateParameters_().
|
protectedvirtual |
Check whether structure 'subStruct' could be part of 'largeStruct', defaults to true, but can be overwritten in derived classes to speed up recursive merging.
Reimplemented in TrackerScenarioBuilder.
Definition at line 358 of file MisalignmentScenarioBuilder.cc.
Referenced by propagateParameters_().
|
protected |
Print all parameters and values for given set.
Definition at line 304 of file MisalignmentScenarioBuilder.cc.
References edm::ParameterSet::existsAs(), and edm::ParameterSet::getParameterNames().
Referenced by decodeMovements_().
|
protected |
Propagate global parameters to sub-parameters.
Definition at line 153 of file MisalignmentScenarioBuilder.cc.
References edm::ParameterSet::addParameter(), edm::ParameterSet::copyFrom(), Exception, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), edm::ParameterSet::getParameterSetNames(), indent_, align::invalid, AlignableModifier::isPropagated(), isTopLevel_(), LogDebug, mergeParameters_(), possiblyPartOf(), rootName_(), AlCaHLTBitMon_QueryRunRegistry::string, AlignableObjectId::stringToId(), and theModifier.
Referenced by decodeMovements_().
|
protected |
Get root name of a parameter set (e.g. 'Rod' in 'Rods' or 'Rod1')
Definition at line 367 of file MisalignmentScenarioBuilder.cc.
References LogDebug, query::result, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by TrackerScenarioBuilder::isTopLevel_(), isTopLevel_(), and propagateParameters_().
|
mutableprotected |
Depth in hierarchy.
Definition at line 90 of file MisalignmentScenarioBuilder.h.
Referenced by decodeMovements_(), getParameterSet_(), Mixins.PrintOptions::indent(), Mixins.PrintOptions::indentation(), mergeParameters_(), propagateParameters_(), and Mixins.PrintOptions::unindent().
|
protected |
Helper class for random movements.
Definition at line 86 of file MisalignmentScenarioBuilder.h.
Referenced by MuonScenarioBuilder::applyScenario(), TrackerScenarioBuilder::applyScenario(), decodeMovements_(), and propagateParameters_().
|
protected |
Counter for applied modification.
Definition at line 88 of file MisalignmentScenarioBuilder.h.
Referenced by MuonScenarioBuilder::applyScenario(), TrackerScenarioBuilder::applyScenario(), and decodeMovements_().
|
protected |
Misalignment scenario to apply (from config file)
Definition at line 85 of file MisalignmentScenarioBuilder.h.
Referenced by MuonScenarioBuilder::applyScenario().