Go to the documentation of this file.00001 #ifndef FWCore_ParameterSet_ORGroupDescription_h
00002 #define FWCore_ParameterSet_ORGroupDescription_h
00003
00004 #include "FWCore/ParameterSet/interface/ParameterDescriptionNode.h"
00005
00006 #include "FWCore/Utilities/interface/value_ptr.h"
00007
00008 #include <memory>
00009 #include <iosfwd>
00010 #include <set>
00011 #include <string>
00012
00013 namespace edm {
00014
00015 class ParameterSet;
00016 class DocFormatHelper;
00017
00018 class ORGroupDescription : public ParameterDescriptionNode {
00019 public:
00020 ORGroupDescription(ParameterDescriptionNode const& node_left,
00021 ParameterDescriptionNode const& node_right);
00022
00023 ORGroupDescription(std::auto_ptr<ParameterDescriptionNode> node_left,
00024 ParameterDescriptionNode const& node_right);
00025
00026 ORGroupDescription(ParameterDescriptionNode const& node_left,
00027 std::auto_ptr<ParameterDescriptionNode> node_right);
00028
00029 ORGroupDescription(std::auto_ptr<ParameterDescriptionNode> node_left,
00030 std::auto_ptr<ParameterDescriptionNode> node_right);
00031
00032 virtual ParameterDescriptionNode* clone() const {
00033 return new ORGroupDescription(*this);
00034 }
00035
00036 private:
00037
00038 virtual void checkAndGetLabelsAndTypes_(std::set<std::string> & usedLabels,
00039 std::set<ParameterTypes> & parameterTypes,
00040 std::set<ParameterTypes> & wildcardTypes) const;
00041
00042 virtual void validate_(ParameterSet & pset,
00043 std::set<std::string> & validatedLabels,
00044 bool optional) const;
00045
00046 virtual void writeCfi_(std::ostream & os,
00047 bool & startWithComma,
00048 int indentation,
00049 bool & wroteSomething) const;
00050
00051 virtual void print_(std::ostream & os,
00052 bool optional,
00053 bool writeToCfi,
00054 DocFormatHelper & dfh);
00055
00056 virtual bool hasNestedContent_() {
00057 return true;
00058 }
00059
00060 virtual void printNestedContent_(std::ostream & os,
00061 bool optional,
00062 DocFormatHelper & dfh);
00063
00064 virtual bool exists_(ParameterSet const& pset) const;
00065
00066 virtual bool partiallyExists_(ParameterSet const& pset) const;
00067
00068 virtual int howManyXORSubNodesExist_(ParameterSet const& pset) const;
00069
00070 void throwIfDuplicateLabels(std::set<std::string> const& labelsLeft,
00071 std::set<std::string> const& labelsRight) const;
00072
00073 void throwIfDuplicateTypes(std::set<ParameterTypes> const& types1,
00074 std::set<ParameterTypes> const& types2) const;
00075
00076 edm::value_ptr<ParameterDescriptionNode> node_left_;
00077 edm::value_ptr<ParameterDescriptionNode> node_right_;
00078 };
00079 }
00080 #endif