CMS 3D CMS Logo

List of all members | Public Member Functions
MixingWorker Class Reference

#include <MixingWorker.h>

Public Member Functions

template<>
void addPileups (const EventPrincipal &ep, ModuleCallingContext const *mcc, unsigned int eventNr)
 
template<>
void addPileups (const EventPrincipal &ep, ModuleCallingContext const *, unsigned int eventNr)
 
template<>
void addSignals (const Event &e)
 
template<>
bool checkSignal (const Event &e)
 

Detailed Description

MixingWorker is an auxiliary class for the MixingModule

Author
Ursula Berthon, LLR Palaiseau
Version
1st Version JMarch 2008

Member Function Documentation

◆ addPileups() [1/2]

template<>
void MixingWorker< HepMCProduct >::addPileups ( const EventPrincipal &  ep,
ModuleCallingContext const *  mcc,
unsigned int  eventNr 
)

Definition at line 12 of file MixingWorker.cc.

References SiStripBadComponentsDQMServiceTemplate_cfg::ep, ProducerED_cfi::InputTag, LogDebug, and makeGlobalPositionRcd_cfg::tag.

14  {
15  // HepMCProduct does not come as a vector....
16  for (InputTag const& tag : allTags_) {
17  std::shared_ptr<Wrapper<HepMCProduct> const> shPtr = getProductByTag<HepMCProduct>(ep, tag, mcc);
18  if (shPtr) {
19  LogDebug("MixingModule") << "HepMC pileup objects added, eventNr " << eventNr << " Tag " << tag << std::endl;
20  crFrame_->setPileupPtr(shPtr);
21  crFrame_->addPileups(*shPtr->product());
22  break;
23  }
24  }
25  }
#define LogDebug(id)

◆ addPileups() [2/2]

template<>
void MixingWorker< HepMCProduct >::addPileups ( const EventPrincipal &  ep,
ModuleCallingContext const *  ,
unsigned int  eventNr 
)

◆ addSignals()

template<>
void MixingWorker< HepMCProduct >::addSignals ( const Event e)

Definition at line 28 of file MixingWorker.cc.

References MillePedeFileConverter_cfg::e, ProducerED_cfi::InputTag, LogDebug, and makeGlobalPositionRcd_cfg::tag.

28  {
29  //HepMC - here the interface is different!!!
30  bool got = false;
32  for (InputTag const& tag : allTags_) {
33  got = e.getByLabel(tag, result_t);
34  if (got) {
35  LogDebug("MixingModule") << "adding HepMCProduct from signal event with " << tag;
36  crFrame_->addSignals(result_t.product(), e.id());
37  break;
38  }
39  }
40  if (!got) {
41  LogInfo("MixingModule") << "!!!!!!! Did not get any signal data for HepMCProduct with " << allTags_[0];
42  }
43  }
Log< level::Info, false > LogInfo
ap_fixed< 16, 8 > result_t
#define LogDebug(id)

◆ checkSignal()

template<>
bool MixingWorker< HepMCProduct >::checkSignal ( const Event e)

Definition at line 46 of file MixingWorker.cc.

References MillePedeFileConverter_cfg::e, ProducerED_cfi::InputTag, submitPVValidationJobs::t, and makeGlobalPositionRcd_cfg::tag.

46  {
47  bool got = false;
49  for (InputTag const& tag : allTags_) {
50  got = e.getByLabel(tag, result_t);
51  if (got) {
52  InputTag t = InputTag(tag.label(), tag.instance());
53  LogInfo("MixingModule") << " Will create a CrossingFrame for HepMCProduct with "
54  << " with InputTag= " << t.encode();
55  break;
56  }
57  }
58  return got;
59  }
Log< level::Info, false > LogInfo
ap_fixed< 16, 8 > result_t