CMS 3D CMS Logo

ScheduleValidator.h

Go to the documentation of this file.
00001 #ifndef FWCore_ParameterSet_ScheduleValidator_h
00002 #define FWCore_ParameterSet_ScheduleValidator_h
00003 
00013 #include <string>
00014 #include <list>
00015 #include <map>
00016 #include <vector>
00017 #include <boost/shared_ptr.hpp>
00018 #include "FWCore/ParameterSet/interface/WrapperNode.h"
00019 #include <FWCore/ParameterSet/interface/ParameterSet.h>
00020 
00021 namespace edm {
00022 
00023   class ParameterSet;
00032   class ScheduleValidator {
00033   public:
00034 
00035     typedef boost::shared_ptr<pset::WrapperNode> WrapperNodePtr ;
00036     typedef std::vector< WrapperNodePtr > PathContainer;
00037     typedef std::list<std::string> DependencyList;
00038     typedef std::map<std::string, DependencyList> Dependencies;
00039 
00041 
00044     ScheduleValidator(const PathContainer& path, 
00045                       const ParameterSet&  processPSet);
00046 
00048 
00049     std::string dependencies(const std::string& modulename) const;
00050 
00052     void validate();
00053 
00054   private:
00056     void removeUnaries(std::string & moduleName);
00057 
00059     void gatherLeafNodes(pset::NodePtr& basenode);
00060    
00062     edm::pset::NodePtr findPathHead(std::string pathName);
00063    
00065     void  findDeps(edm::pset::NodePtr& node, DependencyList& dep);
00066 
00067     void validateDependencies(const std::string & leafName, 
00068                               const pset::NodePtr & leafNode, const DependencyList& deps);
00069     void mergeDependencies(const std::string & leafName, DependencyList& deps);
00070     void validatePaths();
00071 
00073     void validatePath(const std::string & path);
00074 
00075 
00077     PathContainer                      nodes_; 
00079     ParameterSet                       processPSet_;
00080  
00082     std::list<pset::NodePtr>           leaves_;
00084     Dependencies                       dependencies_;
00085  
00086   }; // ScheduleValidator
00087 
00088 
00089 } // edm
00090 
00091 
00092 #endif

Generated on Tue Jun 9 17:36:31 2009 for CMSSW by  doxygen 1.5.4