test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
22
PileUpEventPrincipal
(
edm::EventPrincipal
const
& ep,
edm::ModuleCallingContext
const
* mcc,
int
bcr) :
23
principal_
(ep),
mcc_
(mcc),
bunchCrossing_
(bcr) {}
24
25
edm::EventPrincipal
const
&
principal
() {
26
return
principal_
;
27
}
28
29
edm::EventPrincipal
const
&
principal
()
const
{
30
return
principal_
;
31
}
32
33
int
bunchCrossing
()
const
{
34
return
bunchCrossing_
;
35
}
36
37
38
template
<
typename
T>
39
bool
40
getByLabel
(
edm::InputTag
const
&
tag
,
edm::Handle<T>
&
result
)
const
{
41
edm::BasicHandle
bh =
principal_
.
getByLabel
(
edm::PRODUCT_TYPE
,
edm::TypeID
(
typeid
(
T
)), tag,
nullptr
,
nullptr
,
mcc_
);
42
convert_handle
(
std::move
(bh), result);
43
return
result.
isValid
();
44
}
45
46
private
:
47
edm::EventPrincipal
const
&
principal_
;
48
edm::ModuleCallingContext
const
*
mcc_
;
49
int
bunchCrossing_
;
50
};
51
52
#endif
PileUpEventPrincipal::bunchCrossing
int bunchCrossing() const
Definition:
PileUpEventPrincipal.h:33
edm::PRODUCT_TYPE
Definition:
ProductKindOfType.h:5
ConvertHandle.h
edm::ModuleCallingContext
Definition:
ModuleCallingContext.h:30
edm::Handle
Definition:
AssociativeIterator.h:47
edm::EventPrincipal
Definition:
EventPrincipal.h:47
edm::TypeID
Definition:
TypeID.h:22
mps_fire.result
tuple result
Definition:
mps_fire.py:84
edm::BasicHandle
Definition:
BasicHandle.h:44
PileUpEventPrincipal::principal
edm::EventPrincipal const & principal()
Definition:
PileUpEventPrincipal.h:25
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:476
EventPrincipal.h
GlobalPosition_Frontier_DevDB_cff.tag
tuple tag
Definition:
GlobalPosition_Frontier_DevDB_cff.py:11
PileUpEventPrincipal::principal_
edm::EventPrincipal const & principal_
Definition:
PileUpEventPrincipal.h:47
PileUpEventPrincipal::PileUpEventPrincipal
PileUpEventPrincipal(edm::EventPrincipal const &ep, edm::ModuleCallingContext const *mcc, int bcr)
Definition:
PileUpEventPrincipal.h:22
eostools.move
def move
Definition:
eostools.py:510
PileUpEventPrincipal::principal
edm::EventPrincipal const & principal() const
Definition:
PileUpEventPrincipal.h:29
edm::HandleBase::isValid
bool isValid() const
Definition:
HandleBase.h:75
ProductKindOfType.h
edm::convert_handle
void convert_handle(BasicHandle &&bh, Handle< T > &result)
Definition:
ConvertHandle.h:19
PileUpEventPrincipal::mcc_
edm::ModuleCallingContext const * mcc_
Definition:
PileUpEventPrincipal.h:48
TypeID.h
BasicHandle.h
PileUpEventPrincipal
Definition:
PileUpEventPrincipal.h:19
edm::InputTag
Definition:
InputTag.h:15
PileUpEventPrincipal::getByLabel
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
Definition:
PileUpEventPrincipal.h:40
InputTag.h
PileUpEventPrincipal::bunchCrossing_
int bunchCrossing_
Definition:
PileUpEventPrincipal.h:49
EncodedEventId.h
T
long double T
Definition:
Basic3DVectorLD.h:57
Generated for CMSSW Reference Manual by
1.8.5