CMS 3D CMS Logo

L1TriggerKeyDummyProd.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: L1TriggerKeyDummyProd
4 // Class: L1TriggerKeyDummyProd
5 //
13 //
14 // Original Author: Werner Man-Li Sun
15 // Created: Sat Mar 1 01:08:46 CET 2008
16 // $Id: L1TriggerKeyDummyProd.cc,v 1.3 2008/10/13 01:48:38 wsun Exp $
17 //
18 //
19 
20 // system include files
21 
22 // user include files
24 
25 //
26 // class declaration
27 //
28 
29 //
30 // constants, enums and typedefs
31 //
32 
33 //
34 // static data member definitions
35 //
36 
37 //
38 // constructors and destructor
39 //
41  //the following line is needed to tell the framework what
42  // data is being produced
43 
44  // Label should be empty, "SubsystemKeysOnly" or any subsystem label expected
45  // by L1TriggerKeyOnlineProd.
46  std::string label = iConfig.getParameter<std::string>("label");
47  setWhatProduced(this, label);
48 
49  //now do what ever other initialization is needed
50  m_key.setTSCKey(iConfig.getParameter<std::string>("tscKey"));
59 
60  if (label != "SubsystemKeysOnly") {
61  typedef std::vector<edm::ParameterSet> ObjectKeys;
62  ObjectKeys keys = iConfig.getParameter<ObjectKeys>("objectKeys");
63 
64  for (ObjectKeys::const_iterator it = keys.begin(); it != keys.end(); ++it) {
65  // Replace ?s with spaces.
66  std::string key = it->getParameter<std::string>("key");
67  replace(key.begin(), key.end(), '?', ' ');
68 
69  m_key.add(it->getParameter<std::string>("record"), it->getParameter<std::string>("type"), key);
70  }
71  }
72 }
73 
75  // do anything here that needs to be done at desctruction time
76  // (e.g. close files, deallocate resources etc.)
77 }
78 
79 //
80 // member functions
81 //
82 
83 // ------------ method called to produce the data ------------
85  return std::make_unique<L1TriggerKey>(m_key);
86 }
87 
88 //define this as a plug-in
89 //DEFINE_FWK_EVENTSETUP_MODULE(L1TriggerKeyDummyProd);
L1TriggerKey::kRPC
Definition: L1TriggerKey.h:27
L1TriggerKeyRcd
Definition: L1TriggerKeyRcd.h:30
L1TriggerKey::kGMT
Definition: L1TriggerKey.h:27
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
relativeConstraints.keys
keys
Definition: relativeConstraints.py:89
L1TriggerKeyDummyProd::~L1TriggerKeyDummyProd
~L1TriggerKeyDummyProd() override
Definition: L1TriggerKeyDummyProd.cc:74
L1TriggerKey::kTSP0
Definition: L1TriggerKey.h:27
L1TriggerKeyDummyProd::L1TriggerKeyDummyProd
L1TriggerKeyDummyProd(const edm::ParameterSet &)
Definition: L1TriggerKeyDummyProd.cc:40
L1TriggerKey::kRCT
Definition: L1TriggerKey.h:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TriggerKeyDummyProd.h
L1TriggerKeyDummyProd::produce
ReturnType produce(const L1TriggerKeyRcd &)
Definition: L1TriggerKeyDummyProd.cc:84
edm::ParameterSet
Definition: ParameterSet.h:36
L1TriggerKey::kDTTF
Definition: L1TriggerKey.h:27
L1TriggerKey::kGCT
Definition: L1TriggerKey.h:27
L1TriggerKey::setSubsystemKey
void setSubsystemKey(L1Subsystems subsystem, const std::string &key)
Definition: L1TriggerKey.h:54
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
L1TriggerKey::kGT
Definition: L1TriggerKey.h:27
L1TriggerKeyDummyProd::ReturnType
std::unique_ptr< L1TriggerKey > ReturnType
Definition: L1TriggerKeyDummyProd.h:41
L1TriggerKey::kCSCTF
Definition: L1TriggerKey.h:27
L1TriggerKeyDummyProd::m_key
L1TriggerKey m_key
Definition: L1TriggerKeyDummyProd.h:47
L1TriggerKey::add
void add(const std::string &record, const std::string &type, const std::string &key)
Definition: L1TriggerKey.h:42
crabWrapper.key
key
Definition: crabWrapper.py:19
label
const char * label
Definition: PFTauDecayModeTools.cc:11
L1TriggerKey::setTSCKey
void setTSCKey(const std::string &tscKey)
Definition: L1TriggerKey.h:52
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444