Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-23 03:13:14

0001 #ifndef FWCore_ParameterSet_ORGroupDescription_h
0002 #define FWCore_ParameterSet_ORGroupDescription_h
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterDescriptionNode.h"
0005 
0006 #include "FWCore/Utilities/interface/value_ptr.h"
0007 
0008 #include <memory>
0009 #include <iosfwd>
0010 #include <set>
0011 #include <string>
0012 
0013 namespace edm {
0014 
0015   class ParameterSet;
0016   class DocFormatHelper;
0017 
0018   class ORGroupDescription : public ParameterDescriptionNode {
0019   public:
0020     ORGroupDescription(ParameterDescriptionNode const& node_left, ParameterDescriptionNode const& node_right);
0021 
0022     ORGroupDescription(std::unique_ptr<ParameterDescriptionNode> node_left, ParameterDescriptionNode const& node_right);
0023 
0024     ORGroupDescription(ParameterDescriptionNode const& node_left, std::unique_ptr<ParameterDescriptionNode> node_right);
0025 
0026     ORGroupDescription(std::unique_ptr<ParameterDescriptionNode> node_left,
0027                        std::unique_ptr<ParameterDescriptionNode> node_right);
0028 
0029     ParameterDescriptionNode* clone() const override { return new ORGroupDescription(*this); }
0030 
0031   private:
0032     void checkAndGetLabelsAndTypes_(std::set<std::string>& usedLabels,
0033                                     std::set<ParameterTypes>& parameterTypes,
0034                                     std::set<ParameterTypes>& wildcardTypes) const override;
0035 
0036     void validate_(ParameterSet& pset, std::set<std::string>& validatedLabels, bool optional) const override;
0037 
0038     void writeCfi_(std::ostream& os,
0039                    bool optional,
0040                    bool& startWithComma,
0041                    int indentation,
0042                    CfiOptions&,
0043                    bool& wroteSomething) const override;
0044 
0045     void print_(std::ostream& os, bool optional, bool writeToCfi, DocFormatHelper& dfh) const override;
0046 
0047     bool hasNestedContent_() const override { return true; }
0048 
0049     void printNestedContent_(std::ostream& os, bool optional, DocFormatHelper& dfh) const override;
0050 
0051     bool exists_(ParameterSet const& pset) const override;
0052 
0053     bool partiallyExists_(ParameterSet const& pset) const override;
0054 
0055     int howManyXORSubNodesExist_(ParameterSet const& pset) const override;
0056 
0057     void throwIfDuplicateLabels(std::set<std::string> const& labelsLeft,
0058                                 std::set<std::string> const& labelsRight) const;
0059 
0060     void throwIfDuplicateTypes(std::set<ParameterTypes> const& types1, std::set<ParameterTypes> const& types2) const;
0061 
0062     edm::value_ptr<ParameterDescriptionNode> node_left_;
0063     edm::value_ptr<ParameterDescriptionNode> node_right_;
0064   };
0065 }  // namespace edm
0066 #endif