CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/FWCore/Framework/src/edmodule_mightGet_config.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:     Framework
00004 // Class  :     edmodule_mightGet_config
00005 // 
00006 // Implementation:
00007 //     [Notes on implementation]
00008 //
00009 // Original Author:  Chris Jones
00010 //         Created:  Thu Feb  2 14:26:42 CST 2012
00011 // $Id: edmodule_mightGet_config.cc,v 1.1 2012/02/09 22:12:56 chrjones Exp $
00012 //
00013 
00014 // system include files
00015 
00016 // user include files
00017 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
00018 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
00019 #include "FWCore/Framework/src/edmodule_mightGet_config.h"
00020 
00021 
00022 //
00023 // constants, enums and typedefs
00024 //
00025 
00026 //
00027 // static data member definitions
00028 //
00029 
00030 static const std::string kMightGet("mightGet");
00031 static const char* const kComment=
00032 "List contains the branch names for the EDProducts which might be requested by the module.\n"
00033 "The format for identifying the EDProduct is the same as the one used for OutputModules, "
00034 "except no wild cards are allowed. E.g.\n"
00035 "Foos_foomodule_whichFoo_RECO";
00036 
00037 namespace edm {
00038   void edmodule_mightGet_config(ConfigurationDescriptions& iDesc) {
00039     //NOTE: by not giving a default, we are intentionally not having 'mightGet' added
00040     // to any cfi files. This was done intentionally to avoid problems with HLT. If requested,
00041     // the appropriate default would be an empty vector.
00042     if(iDesc.defaultDescription()) {
00043       if (iDesc.defaultDescription()->isLabelUnused(kMightGet)) {
00044         iDesc.defaultDescription()->addOptionalUntracked<std::vector<std::string> >(kMightGet)
00045         ->setComment(kComment);
00046       }
00047     }
00048     for(auto& v: iDesc) {
00049       if (v.second.isLabelUnused(kMightGet)) {
00050         v.second.addOptionalUntracked<std::vector<std::string> >(kMightGet)->setComment(kComment);
00051       }
00052     }
00053     
00054   }
00055 }