SimGeneral
MixingModule
interface
PileUpEventPrincipal.h
Go to the documentation of this file.
1
#ifndef SimGeneral_MixingModule_PileUpEventPrincipal_h
2
#define SimGeneral_MixingModule_PileUpEventPrincipal_h
3
4
#include <set>
5
#include <string>
6
7
#include "
FWCore/Framework/interface/EventPrincipal.h
"
8
#include "
FWCore/Utilities/interface/InputTag.h
"
9
#include "
FWCore/Utilities/interface/ProductKindOfType.h
"
10
#include "
FWCore/Utilities/interface/TypeID.h
"
11
#include "
DataFormats/Common/interface/BasicHandle.h
"
12
#include "
DataFormats/Common/interface/ConvertHandle.h
"
13
#include "
SimDataFormats/EncodedEventId/interface/EncodedEventId.h
"
14
15
namespace
edm
{
16
class
ModuleCallingContext;
17
}
18
19
class
PileUpEventPrincipal
{
20
public
:
21
PileUpEventPrincipal
(
edm::EventPrincipal
const
&
ep
,
edm::ModuleCallingContext
const
* mcc,
int
bcr)
22
:
principal_
(
ep
),
mcc_
(mcc),
bunchCrossing_
(bcr) {}
23
24
edm::EventPrincipal
const
&
principal
() {
return
principal_
; }
25
26
edm::EventPrincipal
const
&
principal
()
const
{
return
principal_
; }
27
28
edm::ModuleCallingContext
const
*
moduleCallingContext
()
const
{
return
mcc_
; }
29
30
int
bunchCrossing
()
const
{
return
bunchCrossing_
; }
31
32
template
<
typename
T>
33
bool
getByLabel
(
edm::InputTag
const
&
tag
,
edm::Handle<T>
&
result
)
const
{
34
edm::BasicHandle
bh =
principal_
.
getByLabel
(
edm::PRODUCT_TYPE
,
edm::TypeID
(
typeid
(
T
)),
tag
,
nullptr
,
nullptr
,
mcc_
);
35
result
= edm::convert_handle<T>(
std::move
(bh));
36
return
result
.isValid();
37
}
38
39
private
:
40
edm::EventPrincipal
const
&
principal_
;
41
edm::ModuleCallingContext
const
*
mcc_
;
42
int
bunchCrossing_
;
43
};
44
45
#endif
PileUpEventPrincipal::principal
edm::EventPrincipal const & principal() const
Definition:
PileUpEventPrincipal.h:26
edm::PRODUCT_TYPE
Definition:
ProductKindOfType.h:5
SiStripBadComponentsDQMServiceTemplate_cfg.ep
ep
Definition:
SiStripBadComponentsDQMServiceTemplate_cfg.py:86
ConvertHandle.h
mps_fire.result
result
Definition:
mps_fire.py:311
edm::ModuleCallingContext
Definition:
ModuleCallingContext.h:32
edm::Handle
Definition:
AssociativeIterator.h:50
edm::EventPrincipal
Definition:
EventPrincipal.h:48
edm::TypeID
Definition:
TypeID.h:22
PileUpEventPrincipal::bunchCrossing
int bunchCrossing() const
Definition:
PileUpEventPrincipal.h:30
edm::BasicHandle
Definition:
BasicHandle.h:43
PileUpEventPrincipal::principal
edm::EventPrincipal const & principal()
Definition:
PileUpEventPrincipal.h:24
PileUpEventPrincipal::moduleCallingContext
edm::ModuleCallingContext const * moduleCallingContext() const
Definition:
PileUpEventPrincipal.h:28
EventPrincipal.h
PileUpEventPrincipal::principal_
edm::EventPrincipal const & principal_
Definition:
PileUpEventPrincipal.h:40
PileUpEventPrincipal::PileUpEventPrincipal
PileUpEventPrincipal(edm::EventPrincipal const &ep, edm::ModuleCallingContext const *mcc, int bcr)
Definition:
PileUpEventPrincipal.h:21
makeGlobalPositionRcd_cfg.tag
tag
Definition:
makeGlobalPositionRcd_cfg.py:6
edm::Principal::getByLabel
BasicHandle getByLabel(KindOfType kindOfType, TypeID const &typeID, InputTag const &inputTag, EDConsumerBase const *consumes, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
Definition:
Principal.cc:571
ProductKindOfType.h
PileUpEventPrincipal::mcc_
edm::ModuleCallingContext const * mcc_
Definition:
PileUpEventPrincipal.h:41
TypeID.h
BasicHandle.h
PileUpEventPrincipal
Definition:
PileUpEventPrincipal.h:19
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::InputTag
Definition:
InputTag.h:15
InputTag.h
PileUpEventPrincipal::bunchCrossing_
int bunchCrossing_
Definition:
PileUpEventPrincipal.h:42
EncodedEventId.h
T
long double T
Definition:
Basic3DVectorLD.h:48
eostools.move
def move(src, dest)
Definition:
eostools.py:511
PileUpEventPrincipal::getByLabel
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
Definition:
PileUpEventPrincipal.h:33
Generated for CMSSW Reference Manual by
1.8.14