CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/FWCore/ParameterSet/src/ParameterDescriptionCases.cc

Go to the documentation of this file.
00001 
00002 #include "FWCore/ParameterSet/interface/ParameterDescriptionCases.h"
00003 
00004 
00005 namespace edm {
00006 
00007   std::auto_ptr<ParameterDescriptionCases<bool> >
00008   operator||(std::auto_ptr<ParameterDescriptionCases<bool> > left,
00009              std::auto_ptr<ParameterDescriptionCases<bool> > right) {
00010 
00011     std::auto_ptr<std::map<bool, edm::value_ptr<ParameterDescriptionNode> > > rightCases = right->caseMap();
00012     for (std::map<bool, edm::value_ptr<ParameterDescriptionNode> >::const_iterator iter = rightCases->begin(),
00013                                                                                    iEnd = rightCases->end();
00014          iter != iEnd; ++iter) {
00015       bool caseValue = iter->first;
00016       std::auto_ptr<ParameterDescriptionNode> node(iter->second->clone());
00017       left->insert(caseValue, node);
00018     }
00019     return left;
00020   }
00021 
00022   std::auto_ptr<ParameterDescriptionCases<int> >
00023   operator||(std::auto_ptr<ParameterDescriptionCases<int> > left,
00024              std::auto_ptr<ParameterDescriptionCases<int> > right) {
00025 
00026     std::auto_ptr<std::map<int, edm::value_ptr<ParameterDescriptionNode> > > rightCases = right->caseMap();
00027     for (std::map<int, edm::value_ptr<ParameterDescriptionNode> >::const_iterator iter = rightCases->begin(),
00028                                                                                   iEnd = rightCases->end();
00029          iter != iEnd; ++iter) {
00030       int caseValue = iter->first;
00031       std::auto_ptr<ParameterDescriptionNode> node(iter->second->clone());
00032       left->insert(caseValue, node);
00033     }
00034     return left;
00035   }
00036 
00037   std::auto_ptr<ParameterDescriptionCases<std::string> >
00038   operator||(std::auto_ptr<ParameterDescriptionCases<std::string> > left,
00039              std::auto_ptr<ParameterDescriptionCases<std::string> > right) {
00040 
00041     std::auto_ptr<std::map<std::string, edm::value_ptr<ParameterDescriptionNode> > > rightCases = right->caseMap();
00042     for (std::map<std::string, edm::value_ptr<ParameterDescriptionNode> >::const_iterator iter = rightCases->begin(),
00043                                                                                 iEnd = rightCases->end();
00044          iter != iEnd; ++iter) {
00045       std::string caseValue = iter->first;
00046       std::auto_ptr<ParameterDescriptionNode> node(iter->second->clone());
00047       left->insert(caseValue, node);
00048     }
00049     return left;
00050   }
00051 }