CMS 3D CMS Logo

Public Member Functions

MixingWorker Class Reference

#include <MixingWorker.h>

List of all members.

Public Member Functions

template<>
void addPileups (const EventPrincipal &ep, unsigned int eventNr)
template<>
void addPileups (const EventPrincipal &ep, 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,
unsigned int  eventNr 
)

Definition at line 12 of file MixingWorker.cc.

References LogDebug.

                                                                                           {
    // HepMCProduct does not come as a vector....
    boost::shared_ptr<Wrapper<HepMCProduct> const> shPtr = getProductByTag<HepMCProduct>(ep, tag_);
    if (shPtr) {
      LogDebug("MixingModule") <<"HepMC pileup objects  added, eventNr "<<eventNr << " Tag " << tag_ << std::endl;
      crFrame_->setPileupPtr(shPtr);
      crFrame_->addPileups(*shPtr->product());
    }
  }
template<>
void MixingWorker< HepMCProduct >::addPileups ( const EventPrincipal &  ep,
unsigned int  eventNr 
)
template<>
void MixingWorker< HepMCProduct >::addSignals ( const Event e)

Definition at line 23 of file MixingWorker.cc.

References LogDebug.

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

Definition at line 36 of file MixingWorker.cc.

References lumiQTWidget::t.

                                                             {   
          bool got;
          InputTag t;
          
          Handle<HepMCProduct> result_t;
          got = e.getByLabel(tag_,result_t);
          t = InputTag(tag_.label(),tag_.instance());
          
          if (got) {
               LogInfo("MixingModule") <<" Will create a CrossingFrame for HepMCProduct with "
                                       << " with InputTag= "<< t.encode();
          }
                                       
          return got;
  }