CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/Alignment/CommonAlignment/interface/MisalignmentScenarioBuilder.h

Go to the documentation of this file.
00001 #ifndef Alignment_CommonAlignment_MisalignmentScenarioBuilder_h
00002 #define Alignment_CommonAlignment_MisalignmentScenarioBuilder_h
00003 
00011 
00012 #include <vector>
00013 
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 
00016 #include "Alignment/CommonAlignment/interface/AlignableModifier.h"
00017 #include "Alignment/CommonAlignment/interface/AlignableObjectId.h"
00018 
00020 
00021 class MisalignmentScenarioBuilder
00022 {
00023 
00024 public:
00025  
00027   MisalignmentScenarioBuilder( ) {};
00028 
00030   virtual ~MisalignmentScenarioBuilder() {};
00031 
00033   virtual void applyScenario( const edm::ParameterSet& scenario ) = 0;
00034 
00035 protected: // Methods
00036 
00038   void decodeMovements_(const edm::ParameterSet &pSet, const std::vector<Alignable*> &alignables);
00039   
00041   void decodeMovements_(const edm::ParameterSet& pSet, const std::vector<Alignable*> &alignables,
00042                         const std::string &levelName);
00043 
00045   void applyMovements_( Alignable* alignable, const edm::ParameterSet& pSet );
00046   
00048   void mergeParameters_( edm::ParameterSet& localSet, const edm::ParameterSet& globalSet ) const;
00049 
00051   void propagateParameters_( const edm::ParameterSet& pSet, const std::string& globalName,
00052                              edm::ParameterSet& subSet ) const;
00053 
00056   edm::ParameterSet getParameterSet_( const std::string& name, const edm::ParameterSet& pSet ) const;
00057 
00061   edm::ParameterSet getParameterSet_( const std::string& levelName, int iComponent, 
00062                                       const edm::ParameterSet& pSet ) const;
00063 
00064 
00066   bool hasParameter_( const std::string& name, const edm::ParameterSet& pSet ) const;
00067 
00069   void printParameters_( const edm::ParameterSet& pSet, const bool showPsets = false ) const;
00070 
00072   virtual bool isTopLevel_(const std::string& parameterSetName) const;
00073 
00076   virtual bool possiblyPartOf(const std::string &subStruct, const std::string &largeStruct) const;
00077 
00079   const std::string rootName_( const std::string& parameterSetName ) const;
00080   
00081 
00082 protected: // Members
00083 
00084   edm::ParameterSet theScenario;           
00085   AlignableModifier theModifier;           
00086   
00087   AlignableObjectId theAlignableObjectId;  
00088   
00089   int theModifierCounter;                  
00090 
00091   mutable std::string indent_;             
00092 };
00093 
00094 
00095 
00096 #endif