CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/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     theModifierCounter(0) {};
00029 
00031   virtual ~MisalignmentScenarioBuilder() {};
00032 
00034   virtual void applyScenario( const edm::ParameterSet& scenario ) = 0;
00035 
00036 protected: // Methods
00037 
00039   void decodeMovements_(const edm::ParameterSet &pSet, const std::vector<Alignable*> &alignables);
00040   
00042   void decodeMovements_(const edm::ParameterSet& pSet, const std::vector<Alignable*> &alignables,
00043                         const std::string &levelName);
00044 
00046   void applyMovements_( Alignable* alignable, const edm::ParameterSet& pSet );
00047   
00049   void mergeParameters_( edm::ParameterSet& localSet, const edm::ParameterSet& globalSet ) const;
00050 
00052   void propagateParameters_( const edm::ParameterSet& pSet, const std::string& globalName,
00053                              edm::ParameterSet& subSet ) const;
00054 
00057   edm::ParameterSet getParameterSet_( const std::string& name, const edm::ParameterSet& pSet ) const;
00058 
00062   edm::ParameterSet getParameterSet_( const std::string& levelName, int iComponent, 
00063                                       const edm::ParameterSet& pSet ) const;
00064 
00065 
00067   bool hasParameter_( const std::string& name, const edm::ParameterSet& pSet ) const;
00068 
00070   void printParameters_( const edm::ParameterSet& pSet, const bool showPsets = false ) const;
00071 
00073   virtual bool isTopLevel_(const std::string& parameterSetName) const;
00074 
00077   virtual bool possiblyPartOf(const std::string &subStruct, const std::string &largeStruct) const;
00078 
00080   const std::string rootName_( const std::string& parameterSetName ) const;
00081   
00082 
00083 protected: // Members
00084 
00085   edm::ParameterSet theScenario;           
00086   AlignableModifier theModifier;           
00087   
00088   AlignableObjectId theAlignableObjectId;  
00089   
00090   int theModifierCounter;                  
00091 
00092   mutable std::string indent_;             
00093 };
00094 
00095 
00096 
00097 #endif