Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
~L1RCTChannelMaskTester
()
override
{}
46
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&)
override
;
47
};
48
49
void
L1RCTChannelMaskTester::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& evSetup) {
50
//
51
edm::ESHandle<L1RCTChannelMask>
rctChanMask;
52
evSetup.
get
<
L1RCTChannelMaskRcd
>().
get
(rctChanMask);
53
54
rctChanMask->print(
std::cout
);
55
56
if
(
auto
maskRecord = evSetup.
tryToGet
<
L1RCTNoisyChannelMaskRcd
>()) {
57
edm::ESHandle<L1RCTNoisyChannelMask>
rctNoisyChanMask;
58
maskRecord->get(rctNoisyChanMask);
59
60
rctNoisyChanMask->print(
std::cout
);
61
}
else
{
62
std::cout
<<
"\nRecord \""
63
<<
"L1RCTNoisyChannelMaskRcd"
64
<<
"\" does not exist.\n"
65
<< std::endl;
66
}
67
}
68
69
DEFINE_FWK_MODULE
(
L1RCTChannelMaskTester
);
edm::EventSetup::tryToGet
std::optional< T > tryToGet() const
Definition:
EventSetup.h:109
L1RCTChannelMaskTester::L1RCTChannelMaskTester
L1RCTChannelMaskTester(const edm::ParameterSet &)
Definition:
L1RCTChannelMaskTester.cc:44
MessageLogger.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
Event.h
MakerMacros.h
EventSetup.h
ParameterSet.h
L1RCTChannelMaskTester::~L1RCTChannelMaskTester
~L1RCTChannelMaskTester() override
Definition:
L1RCTChannelMaskTester.cc:45
MessageDrop.h
iEvent
int iEvent
Definition:
GenABIO.cc:224
edm::ESHandle
Definition:
DTSurvey.h:22
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:59
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
L1RCTChannelMaskTester::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
L1RCTChannelMaskTester.cc:49
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:88
edm::ParameterSet
Definition:
ParameterSet.h:47
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:144
edm::Event
Definition:
Event.h:73
ModuleDef.h
L1RCTNoisyChannelMaskRcd
Definition:
L1RCTNoisyChannelMaskRcd.h:12
Generated for CMSSW Reference Manual by
1.8.5