Main Page
Namespaces
Classes
Package Documentation
L1TriggerConfig
RCTConfigProducers
src
L1RCTChannelMaskTester.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: RCTConfigTester
4
// Class: RCTConfigTester
5
//
13
//
14
// Original Author: Sridhara Dasu
15
// Created: Mon Jul 16 23:48:35 CEST 2007
16
//
17
//
18
#include <iostream>
19
// user include files
20
#include "
FWCore/Framework/interface/EDAnalyzer.h
"
21
#include "
FWCore/Framework/interface/Event.h
"
22
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
23
24
#include "
FWCore/Framework/interface/EventSetup.h
"
25
#include "
FWCore/Framework/interface/ESHandle.h
"
26
27
#include "
CondFormats/DataRecord/interface/L1RCTChannelMaskRcd.h
"
28
#include "
CondFormats/L1TObjects/interface/L1RCTChannelMask.h
"
29
#include "
CondFormats/DataRecord/interface/L1RCTNoisyChannelMaskRcd.h
"
30
#include "
CondFormats/L1TObjects/interface/L1RCTNoisyChannelMask.h
"
31
32
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
33
#include "
FWCore/MessageLogger/interface/MessageDrop.h
"
34
35
#include "
FWCore/PluginManager/interface/ModuleDef.h
"
36
#include "
FWCore/Framework/interface/MakerMacros.h
"
37
38
//
39
// class declaration
40
//
41
42
class
L1RCTChannelMaskTester
:
public
edm::EDAnalyzer
{
43
public
:
44
explicit
L1RCTChannelMaskTester
(
const
edm::ParameterSet
&) {
45
}
46
~L1RCTChannelMaskTester
()
override
{
47
}
48
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&)
override
;
49
50
};
51
52
void
L1RCTChannelMaskTester::analyze
(
const
edm::Event
&
iEvent
,
53
const
edm::EventSetup
& evSetup) {
54
55
//
56
edm::ESHandle<L1RCTChannelMask>
rctChanMask;
57
evSetup.
get
<
L1RCTChannelMaskRcd
>().
get
(rctChanMask);
58
59
rctChanMask->
print
(
std::cout
);
60
61
if
(
auto
maskRecord = evSetup.
tryToGet
<
L1RCTNoisyChannelMaskRcd
>()) {
62
edm::ESHandle<L1RCTNoisyChannelMask>
rctNoisyChanMask;
63
maskRecord->get(rctNoisyChanMask);
64
65
rctNoisyChanMask->
print
(
std::cout
);
66
}
else
{
67
std::cout
<<
"\nRecord \""
<<
"L1RCTNoisyChannelMaskRcd"
68
<<
"\" does not exist.\n"
<< std::endl;
69
}
70
71
}
72
73
DEFINE_FWK_MODULE
(
L1RCTChannelMaskTester
);
edm::EventSetup::tryToGet
std::optional< T > tryToGet() const
Definition:
EventSetup.h:92
MessageLogger.h
L1RCTChannelMaskTester::L1RCTChannelMaskTester
L1RCTChannelMaskTester(const edm::ParameterSet &)
Definition:
L1RCTChannelMaskTester.cc:44
Event.h
MakerMacros.h
EventSetup.h
L1RCTChannelMask::print
void print(std::ostream &s) const
Definition:
L1RCTChannelMask.h:13
ParameterSet.h
L1RCTChannelMaskTester::~L1RCTChannelMaskTester
~L1RCTChannelMaskTester() override
Definition:
L1RCTChannelMaskTester.cc:46
MessageDrop.h
iEvent
int iEvent
Definition:
GenABIO.cc:224
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
edm::ESHandle
Definition:
DTSurvey.h:22
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:57
L1RCTNoisyChannelMask.h
edm::EDAnalyzer
Definition:
EDAnalyzer.h:29
EDAnalyzer.h
L1RCTChannelMask.h
L1RCTChannelMaskRcd
Definition:
L1RCTChannelMaskRcd.h:12
L1RCTChannelMaskTester
Definition:
L1RCTChannelMaskTester.cc:42
L1RCTChannelMaskRcd.h
L1RCTNoisyChannelMaskRcd.h
L1RCTNoisyChannelMask::print
void print(std::ostream &s) const
Definition:
L1RCTNoisyChannelMask.h:19
L1RCTChannelMaskTester::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
L1RCTChannelMaskTester.cc:52
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:71
edm::ParameterSet
Definition:
ParameterSet.h:36
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
edm::Event
Definition:
Event.h:71
ModuleDef.h
L1RCTNoisyChannelMaskRcd
Definition:
L1RCTNoisyChannelMaskRcd.h:12
Generated for CMSSW Reference Manual by
1.8.11