CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

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

Definition at line 12 of file MixingWorker.cc.

References LogDebug.

12  {
13  // HepMCProduct does not come as a vector....
14  boost::shared_ptr<Wrapper<HepMCProduct> const> shPtr = getProductByTag<HepMCProduct>(ep, tag_, mcc);
15  if (shPtr) {
16  LogDebug("MixingModule") <<"HepMC pileup objects added, eventNr "<<eventNr << " Tag " << tag_ << std::endl;
17  crFrame_->setPileupPtr(shPtr);
18  crFrame_->addPileups(*shPtr->product());
19  }
20  }
#define LogDebug(id)
template<>
void MixingWorker< HepMCProduct >::addPileups ( const EventPrincipal &  ep,
ModuleCallingContext const *  ,
unsigned int  eventNr 
)
template<>
void MixingWorker< HepMCProduct >::addSignals ( const Event e)

Definition at line 23 of file MixingWorker.cc.

References LogDebug.

23  {
24  //HepMC - here the interface is different!!!
25  Handle<HepMCProduct> result_t;
26  bool got = e.getByLabel(tag_,result_t);
27  if (got) {
28  LogDebug("MixingModule") <<" adding HepMCProduct from signal event with "<<tag_;
29  crFrame_->addSignals(result_t.product(),e.id());
30  } else {
31  LogInfo("MixingModule") <<"!!!!!!! Did not get any signal data for HepMCProduct with "<<tag_;
32  }
33  }
#define LogDebug(id)
template<>
bool MixingWorker< HepMCProduct >::checkSignal ( const Event e)

Definition at line 36 of file MixingWorker.cc.

References edmStreamStallGrapher::t.

36  {
37  bool got;
38  InputTag t;
39 
40  Handle<HepMCProduct> result_t;
41  got = e.getByLabel(tag_,result_t);
42  t = InputTag(tag_.label(),tag_.instance());
43 
44  if (got) {
45  LogInfo("MixingModule") <<" Will create a CrossingFrame for HepMCProduct with "
46  << " with InputTag= "<< t.encode();
47  }
48 
49  return got;
50  }