CMS 3D CMS Logo

ProcessDesc.h

Go to the documentation of this file.
00001 #ifndef ParameterSet_ProcessDesc_h
00002 #define ParameterSet_ProcessDesc_h
00003 
00004 #include "boost/shared_ptr.hpp"
00005 #include <vector>
00006 #include "FWCore/ParameterSet/interface/WrapperNode.h"
00007 
00008 namespace edm
00009 {
00010   
00011   typedef boost::shared_ptr<pset::WrapperNode> WrapperNodePtr;
00012   class ScheduleValidator;
00013   class ParameterSet;
00014 
00015   class ProcessDesc
00016   {
00017 
00018   public:
00019     explicit ProcessDesc(const ParameterSet & pset);
00020 
00022     explicit ProcessDesc(const std::string& config);
00023 
00024     ~ProcessDesc();
00025 
00027     boost::shared_ptr<ParameterSet> getProcessPSet() const;
00028 
00030 
00032     std::string  getDependencies(const std::string& modulename);
00033 
00035     boost::shared_ptr<std::vector<ParameterSet> > getServicesPSets() const;
00036 
00037     void addService(const ParameterSet & pset);
00039     void addService(const std::string & service);
00041     void addDefaultService(const std::string & service);
00043     void addServices(std::vector<std::string> const& defaultServices,
00044                      std::vector<std::string> const& forcedServices);
00045 
00046     void setRegistry() const;
00047     void fillPaths();
00048 
00049     //Path and sequence information
00050     typedef std::vector< WrapperNodePtr > PathContainer;
00051     PathContainer pathFragments() const {return pathFragments_;}
00052     void addPathFragment(const WrapperNodePtr & wn) { pathFragments_.push_back(wn);}
00053 
00054 
00056     void record(const std::string & index, const std::string & name);
00057 
00059     void writeBookkeeping(const std::string & index);
00060 
00061   //TODO make this private
00062   private:
00063 
00064     typedef std::vector<std::string> Strs;
00065     typedef std::map<std::string, edm::WrapperNodePtr > SeqMap;
00066     typedef boost::shared_ptr<pset::Node> NodePtr;
00067 
00069     void getNames(const pset::Node* n, Strs& out) const;
00070 
00072     void sequenceSubstitution(NodePtr& node, SeqMap&  sequences);
00073 
00075 
00077     void fillPath(WrapperNodePtr n, Strs& paths);
00078 
00081     Strs findSchedule(Strs & triggerPaths, Strs & endPaths) const;
00082 
00084     void dumpTree(NodePtr& node);
00085 
00087     ScheduleValidator*  validator_;
00088 
00089 
00090     //Path and sequence information
00091     PathContainer pathFragments_;
00092     boost::shared_ptr<ParameterSet> pset_;
00093     boost::shared_ptr<std::vector< ParameterSet> > services_;
00094 
00095     typedef std::map<std::string, std::vector<std::string> > Bookkeeping;
00096     Bookkeeping bookkeeping_;
00097   };
00098 }
00099 
00100 #endif

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