CMS 3D CMS Logo

L1TriggerKeyExtViewer.cc
Go to the documentation of this file.
4 
7 
10 
12 private:
15 
16 public:
17  void analyze(const edm::Event&, const edm::EventSetup&) override;
18 
20  : label(pset.getParameter<std::string>("label")), token_{esConsumes()} {}
21 };
22 
23 #include <iostream>
24 using namespace std;
25 
27  L1TriggerKeyExt const& ptr1 = evSetup.getData(token_);
28 
29  cout << "L1TriggerKeyExt: parent key = " << ptr1.tscKey() << endl;
30 
31  cout << " uGT key: " << ptr1.subsystemKey(L1TriggerKeyExt::kuGT) << endl;
32  cout << " uGMT key: " << ptr1.subsystemKey(L1TriggerKeyExt::kuGMT) << endl;
33  cout << " CALO key: " << ptr1.subsystemKey(L1TriggerKeyExt::kCALO) << endl;
34  cout << " BMTF key: " << ptr1.subsystemKey(L1TriggerKeyExt::kBMTF) << endl;
35  cout << " OMTF key: " << ptr1.subsystemKey(L1TriggerKeyExt::kOMTF) << endl;
36  cout << " EMTF key: " << ptr1.subsystemKey(L1TriggerKeyExt::kEMTF) << endl;
37  cout << " TWINMUX key: " << ptr1.subsystemKey(L1TriggerKeyExt::kTWINMUX) << endl;
38 
39  cout << "Records: " << endl;
40 
41  L1TriggerKeyExt::RecordToKey::const_iterator itr = ptr1.recordToKeyMap().begin();
42  L1TriggerKeyExt::RecordToKey::const_iterator end = ptr1.recordToKeyMap().end();
43 
44  for (; itr != end; ++itr) {
45  std::string recordType = itr->first;
46  std::string objectKey = itr->second;
47  std::string recordName(recordType, 0, recordType.find_first_of('@'));
48  cout << " record " << recordName << " key: " << itr->second << endl;
49  }
50 
51  cout << dec << endl;
52 }
53 
57 
const std::string & tscKey() const
const std::string & subsystemKey(L1Subsystems subsystem) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
edm::ESGetToken< L1TriggerKeyExt, L1TriggerKeyExtRcd > token_
const RecordToKey & recordToKeyMap() const
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void analyze(const edm::Event &, const edm::EventSetup &) override
L1TriggerKeyExtViewer(const edm::ParameterSet &pset)