Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:08

0001 // -*- C++ -*-
0002 //
0003 // Package:     Framework
0004 // Class  :     edmodule_mightGet_config
0005 //
0006 // Implementation:
0007 //     [Notes on implementation]
0008 //
0009 // Original Author:  Chris Jones
0010 //         Created:  Thu Feb  2 14:26:42 CST 2012
0011 //
0012 
0013 // system include files
0014 
0015 // user include files
0016 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0017 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0018 #include "FWCore/Framework/src/edmodule_mightGet_config.h"
0019 
0020 //
0021 // constants, enums and typedefs
0022 //
0023 
0024 //
0025 // static data member definitions
0026 //
0027 
0028 static const std::string kMightGet("mightGet");
0029 static const char* const kComment =
0030     "List contains the branch names for the EDProducts which might be requested by the module.\n"
0031     "The format for identifying the EDProduct is the same as the one used for OutputModules, "
0032     "except no wild cards are allowed. E.g.\n"
0033     "Foos_foomodule_whichFoo_RECO";
0034 
0035 namespace edm {
0036   void edmodule_mightGet_config(ConfigurationDescriptions& iDesc) {
0037     //NOTE: by not giving a default, we are intentionally not having 'mightGet' added
0038     // to any cfi files. This was done intentionally to avoid problems with HLT. If requested,
0039     // the appropriate default would be an empty vector.
0040     if (iDesc.defaultDescription()) {
0041       if (iDesc.defaultDescription()->isLabelUnused(kMightGet)) {
0042         iDesc.defaultDescription()->addOptionalUntracked<std::vector<std::string> >(kMightGet)->setComment(kComment);
0043       }
0044     }
0045     for (auto& v : iDesc) {
0046       if (v.second.isLabelUnused(kMightGet)) {
0047         v.second.addOptionalUntracked<std::vector<std::string> >(kMightGet)->setComment(kComment);
0048       }
0049     }
0050   }
0051 }  // namespace edm