src
L1Trigger
L1THGCalUtilities
interface
HGCalTriggerNtupleBase.h
Go to the documentation of this file.
1
#ifndef __L1Trigger_L1THGCalUtilities_HGCalTriggerNtupleBase_h__
2
#define __L1Trigger_L1THGCalUtilities_HGCalTriggerNtupleBase_h__
3
4
#include "
FWCore/Framework/interface/Event.h
"
5
#include "
FWCore/Framework/interface/EventSetup.h
"
6
#include "
FWCore/Framework/interface/ESHandle.h
"
7
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
8
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
9
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
10
#include "TTree.h"
11
12
namespace
HepPDT
{
13
class
ParticleDataTable
;
14
}
15
class
MagneticField
;
16
class
HGCalTriggerGeometryBase
;
17
18
struct
HGCalTriggerNtupleEventSetup
{
19
edm::ESHandle<HepPDT::ParticleDataTable>
pdt
;
20
edm::ESHandle<MagneticField>
magfield
;
21
edm::ESHandle<HGCalTriggerGeometryBase>
geometry
;
22
};
23
24
class
HGCalTriggerNtupleBase
{
25
public
:
26
HGCalTriggerNtupleBase
(
const
edm::ParameterSet
& conf) :
name_
(conf.getParameter<
std
::
string
>(
"NtupleName"
)){};
27
virtual
~HGCalTriggerNtupleBase
(){};
28
const
std::string
&
name
()
const
{
return
name_
; }
29
virtual
void
initialize
(TTree&,
const
edm::ParameterSet
&,
edm::ConsumesCollector
&&) = 0;
30
virtual
void
fill
(
const
edm::Event
&,
const
HGCalTriggerNtupleEventSetup
&) {
31
edm::LogWarning
(
"NotImplemented"
) <<
"Calling ntuplizer fill(edm::Event, HGCalTriggerNtupleEventSetup), but it is "
32
"not implemented in the concrete class '"
33
<<
name
() <<
"'. "
34
<<
"You might want to set 'accessEventSetup_' to true in order to call "
35
"fill(edm::Event, edm::EventSetup) instead."
;
36
}
37
// Kept for backward compatibility: used in L1Trigger/L1CaloTrigger/test
38
virtual
void
fill
(
const
edm::Event
&,
const
edm::EventSetup
&) {
39
edm::LogWarning
(
"NotImplemented"
)
40
<<
"Calling ntuplizer fill(edm::Event, edm::EventSetup), but it is not implemented in the concrete class '"
41
<<
name
() <<
"'. "
42
<<
"You might want to set 'accessEventSetup_' to false in order to call fill(edm::Event, "
43
"HGCalTriggerNtupleEventSetup) instead."
;
44
}
45
bool
accessEventSetup
()
const
{
return
accessEventSetup_
; }
46
47
protected
:
48
virtual
void
clear
() = 0;
49
bool
accessEventSetup_
=
true
;
50
const
std::string
name_
;
51
};
52
53
#include "
FWCore/PluginManager/interface/PluginFactory.h
"
54
typedef
edmplugin::PluginFactory<HGCalTriggerNtupleBase*(const edm::ParameterSet&)>
HGCalTriggerNtupleFactory
;
55
56
#endif
HGCalTriggerGeometryBase
Definition:
HGCalTriggerGeometryBase.h:16
HGCalTriggerNtupleEventSetup
Definition:
HGCalTriggerNtupleBase.h:18
MessageLogger.h
HGCalTriggerNtupleEventSetup::magfield
edm::ESHandle< MagneticField > magfield
Definition:
HGCalTriggerNtupleBase.h:20
ParticleDataTable
HepPDT::ParticleDataTable ParticleDataTable
Definition:
ParticleDataTable.h:8
Event.h
HGCalTriggerNtupleBase
Definition:
HGCalTriggerNtupleBase.h:24
EventSetup.h
MagneticField
Definition:
MagneticField.h:19
std
Definition:
JetResolutionObject.h:76
HGCalTriggerNtupleEventSetup::geometry
edm::ESHandle< HGCalTriggerGeometryBase > geometry
Definition:
HGCalTriggerNtupleBase.h:21
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
ParameterSet.h
HGCalTriggerNtupleBase::fill
virtual void fill(const edm::Event &, const HGCalTriggerNtupleEventSetup &)
Definition:
HGCalTriggerNtupleBase.h:30
HepPDT
Definition:
ParticleManager.h:17
edmplugin::PluginFactory
Definition:
PluginFactory.h:35
edm::ESHandle< HepPDT::ParticleDataTable >
HGCalTriggerNtupleEventSetup::pdt
edm::ESHandle< HepPDT::ParticleDataTable > pdt
Definition:
HGCalTriggerNtupleBase.h:19
ESHandle.h
HGCalTriggerNtupleBase::fill
virtual void fill(const edm::Event &, const edm::EventSetup &)
Definition:
HGCalTriggerNtupleBase.h:38
edm::EventSetup
Definition:
EventSetup.h:59
HGCalTriggerNtupleFactory
edmplugin::PluginFactory< HGCalTriggerNtupleBase *(const edm::ParameterSet &)> HGCalTriggerNtupleFactory
Definition:
HGCalTriggerNtupleBase.h:54
HGCalTriggerNtupleBase::initialize
virtual void initialize(TTree &, const edm::ParameterSet &, edm::ConsumesCollector &&)=0
PluginFactory.h
HGCalTriggerNtupleBase::accessEventSetup
bool accessEventSetup() const
Definition:
HGCalTriggerNtupleBase.h:45
HGCalTriggerNtupleBase::clear
virtual void clear()=0
HGCalTriggerNtupleBase::HGCalTriggerNtupleBase
HGCalTriggerNtupleBase(const edm::ParameterSet &conf)
Definition:
HGCalTriggerNtupleBase.h:26
edm::ParameterSet
Definition:
ParameterSet.h:48
HGCalTriggerNtupleBase::accessEventSetup_
bool accessEventSetup_
Definition:
HGCalTriggerNtupleBase.h:49
HGCalTriggerNtupleBase::name
const std::string & name() const
Definition:
HGCalTriggerNtupleBase.h:28
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition:
MessageLogger.h:122
edm::Event
Definition:
Event.h:73
ConsumesCollector.h
HGCalTriggerNtupleBase::name_
const std::string name_
Definition:
HGCalTriggerNtupleBase.h:50
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
HGCalTriggerNtupleBase::~HGCalTriggerNtupleBase
virtual ~HGCalTriggerNtupleBase()
Definition:
HGCalTriggerNtupleBase.h:27
Generated for CMSSW Reference Manual by
1.8.14