CMS 3D CMS Logo

L1TriggerKeyDummyProdExt.cc
Go to the documentation of this file.
2 
4  //the following line is needed to tell the framework what
5  // data is being produced
6 
7  // Label should be empty, "SubsystemKeysOnly" or any subsystem label expected
8  // by L1TriggerKeyOnlineProd.
9  std::string label = iConfig.getParameter<std::string>("label");
10  setWhatProduced(this, label);
11 
12  //now do what ever other initialization is needed
13  m_key.setTSCKey(iConfig.getParameter<std::string>("tscKey"));
18 
19  if (label != "SubsystemKeysOnly") {
20  typedef std::vector<edm::ParameterSet> ObjectKeys;
21  ObjectKeys keys = iConfig.getParameter<ObjectKeys>("objectKeys");
22 
23  for (ObjectKeys::const_iterator it = keys.begin(); it != keys.end(); ++it) {
24  // Replace ?s with spaces.
25  std::string key = it->getParameter<std::string>("key");
26  replace(key.begin(), key.end(), '?', ' ');
27 
28  m_key.add(it->getParameter<std::string>("record"), it->getParameter<std::string>("type"), key);
29  }
30  }
31 }
32 
34  // do anything here that needs to be done at desctruction time
35  // (e.g. close files, deallocate resources etc.)
36 }
37 
38 //
39 // member functions
40 //
41 
42 // ------------ method called to produce the data ------------
44  return std::make_unique<L1TriggerKeyExt>(m_key);
45 }
46 
47 //define this as a plug-in
48 //DEFINE_FWK_EVENTSETUP_MODULE(L1TriggerKeyDummyProdExt);
L1TriggerKeyExt::kuGMT
Definition: L1TriggerKeyExt.h:27
L1TriggerKeyDummyProdExt::ReturnType
std::unique_ptr< L1TriggerKeyExt > ReturnType
Definition: L1TriggerKeyDummyProdExt.h:19
L1TriggerKeyExt::kBMTF
Definition: L1TriggerKeyExt.h:27
L1TriggerKeyExt::add
void add(const std::string &record, const std::string &type, const std::string &key)
Definition: L1TriggerKeyExt.h:42
L1TriggerKeyExtRcd
Definition: L1TriggerKeyExtRcd.h:8
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
L1TriggerKeyDummyProdExt::L1TriggerKeyDummyProdExt
L1TriggerKeyDummyProdExt(const edm::ParameterSet &)
Definition: L1TriggerKeyDummyProdExt.cc:3
L1TriggerKeyExt::setSubsystemKey
void setSubsystemKey(L1Subsystems subsystem, const std::string &key)
Definition: L1TriggerKeyExt.h:54
L1TriggerKeyDummyProdExt.h
relativeConstraints.keys
keys
Definition: relativeConstraints.py:89
L1TriggerKeyExt::kCALO
Definition: L1TriggerKeyExt.h:27
L1TriggerKeyDummyProdExt::m_key
L1TriggerKeyExt m_key
Definition: L1TriggerKeyDummyProdExt.h:25
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
L1TriggerKeyExt::kuGT
Definition: L1TriggerKeyExt.h:27
L1TriggerKeyDummyProdExt::produce
ReturnType produce(const L1TriggerKeyExtRcd &)
Definition: L1TriggerKeyDummyProdExt.cc:43
crabWrapper.key
key
Definition: crabWrapper.py:19
label
const char * label
Definition: PFTauDecayModeTools.cc:11
L1TriggerKeyDummyProdExt::~L1TriggerKeyDummyProdExt
~L1TriggerKeyDummyProdExt() override
Definition: L1TriggerKeyDummyProdExt.cc:33
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444
L1TriggerKeyExt::setTSCKey
void setTSCKey(const std::string &tscKey)
Definition: L1TriggerKeyExt.h:52