CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MisalignmentScenarioBuilder.h
Go to the documentation of this file.
1 #ifndef Alignment_CommonAlignment_MisalignmentScenarioBuilder_h
2 #define Alignment_CommonAlignment_MisalignmentScenarioBuilder_h
3 
11 
12 #include <vector>
13 
15 
18 
20 
22 {
23 
24 public:
25 
28  theModifierCounter(0) {};
29 
32 
34  virtual void applyScenario( const edm::ParameterSet& scenario ) = 0;
35 
36 protected: // Methods
37 
39  void decodeMovements_(const edm::ParameterSet &pSet, const std::vector<Alignable*> &alignables);
40 
42  void decodeMovements_(const edm::ParameterSet& pSet, const std::vector<Alignable*> &alignables,
43  const std::string &levelName);
44 
46  void applyMovements_( Alignable* alignable, const edm::ParameterSet& pSet );
47 
49  void mergeParameters_( edm::ParameterSet& localSet, const edm::ParameterSet& globalSet ) const;
50 
52  void propagateParameters_( const edm::ParameterSet& pSet, const std::string& globalName,
53  edm::ParameterSet& subSet ) const;
54 
57  edm::ParameterSet getParameterSet_( const std::string& name, const edm::ParameterSet& pSet ) const;
58 
62  edm::ParameterSet getParameterSet_( const std::string& levelName, int iComponent,
63  const edm::ParameterSet& pSet ) const;
64 
65 
67  bool hasParameter_( const std::string& name, const edm::ParameterSet& pSet ) const;
68 
70  void printParameters_( const edm::ParameterSet& pSet, const bool showPsets = false ) const;
71 
73  virtual bool isTopLevel_(const std::string& parameterSetName) const;
74 
77  virtual bool possiblyPartOf(const std::string &subStruct, const std::string &largeStruct) const;
78 
80  const std::string rootName_( const std::string& parameterSetName ) const;
81 
82 
83 protected: // Members
84 
87 
89 
91 
92  mutable std::string indent_;
93 };
94 
95 
96 
97 #endif
edm::ParameterSet theScenario
Misalignment scenario to apply (from config file)
virtual bool possiblyPartOf(const std::string &subStruct, const std::string &largeStruct) const
virtual void applyScenario(const edm::ParameterSet &scenario)=0
Apply misalignment scenario to the tracker (sub-system specific)
void printParameters_(const edm::ParameterSet &pSet, const bool showPsets=false) const
Print all parameters and values for given set.
const std::string rootName_(const std::string &parameterSetName) const
Get root name of a parameter set (e.g. &#39;Rod&#39; in &#39;Rods&#39; or &#39;Rod1&#39;)
AlignableObjectId theAlignableObjectId
Type to name converter.
void propagateParameters_(const edm::ParameterSet &pSet, const std::string &globalName, edm::ParameterSet &subSet) const
Propagate global parameters to sub-parameters.
Allows conversion between type and name, and vice-versa.
virtual bool isTopLevel_(const std::string &parameterSetName) const
Check if given parameter is for a top-level structure.
const char * levelName(LogLevel)
Definition: fwLog.cc:35
void decodeMovements_(const edm::ParameterSet &pSet, const std::vector< Alignable * > &alignables)
Decode movements defined in given parameter set for given set of alignables.
virtual ~MisalignmentScenarioBuilder()
Destructor.
AlignableModifier theModifier
Helper class for random movements.
Base class to build a scenario from configuration and apply to either tracker or muon.
std::string indent_
Depth in hierarchy.
void applyMovements_(Alignable *alignable, const edm::ParameterSet &pSet)
Apply movements given by parameter set to given alignable.
MisalignmentScenarioBuilder()
Default constructor.
void mergeParameters_(edm::ParameterSet &localSet, const edm::ParameterSet &globalSet) const
Merge two sets of parameters into one (the first argument)
int theModifierCounter
Counter for applied modification.
bool hasParameter_(const std::string &name, const edm::ParameterSet &pSet) const
Check if given parameter exists in parameter set.
edm::ParameterSet getParameterSet_(const std::string &name, const edm::ParameterSet &pSet) const