CMS 3D CMS Logo

L1TriggerKeyExtViewer.cc
Go to the documentation of this file.
4 
7 
10 
12 private:
14 
15 public:
16  void analyze(const edm::Event&, const edm::EventSetup&) override;
17 
19  : edm::EDAnalyzer(), label(pset.getParameter<std::string>("label")) {}
20 
21  ~L1TriggerKeyExtViewer(void) override {}
22 };
23 
24 #include <iostream>
25 using namespace std;
26 
29  evSetup.get<L1TriggerKeyExtRcd>().get(label, handle1);
30  std::shared_ptr<L1TriggerKeyExt> ptr1(new L1TriggerKeyExt(*(handle1.product())));
31 
32  cout << "L1TriggerKeyExt: parent key = " << ptr1->tscKey() << endl;
33 
34  cout << " uGT key: " << ptr1->subsystemKey(L1TriggerKeyExt::kuGT) << endl;
35  cout << " uGMT key: " << ptr1->subsystemKey(L1TriggerKeyExt::kuGMT) << endl;
36  cout << " CALO key: " << ptr1->subsystemKey(L1TriggerKeyExt::kCALO) << endl;
37  cout << " BMTF key: " << ptr1->subsystemKey(L1TriggerKeyExt::kBMTF) << endl;
38  cout << " OMTF key: " << ptr1->subsystemKey(L1TriggerKeyExt::kOMTF) << endl;
39  cout << " EMTF key: " << ptr1->subsystemKey(L1TriggerKeyExt::kEMTF) << endl;
40  cout << " TWINMUX key: " << ptr1->subsystemKey(L1TriggerKeyExt::kTWINMUX) << endl;
41 
42  cout << "Records: " << endl;
43 
44  L1TriggerKeyExt::RecordToKey::const_iterator itr = ptr1->recordToKeyMap().begin();
45  L1TriggerKeyExt::RecordToKey::const_iterator end = ptr1->recordToKeyMap().end();
46 
47  for (; itr != end; ++itr) {
48  std::string recordType = itr->first;
49  std::string objectKey = itr->second;
50  std::string recordName(recordType, 0, recordType.find_first_of('@'));
51  cout << " record " << recordName << " key: " << itr->second << endl;
52  }
53 
54  cout << dec << endl;
55 }
56 
60 
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
char const * label
int iEvent
Definition: GenABIO.cc:224
T const * product() const
Definition: ESHandle.h:86
T get() const
Definition: EventSetup.h:82
void analyze(const edm::Event &, const edm::EventSetup &) override
L1TriggerKeyExtViewer(const edm::ParameterSet &pset)
HLT enums.
~L1TriggerKeyExtViewer(void) override