#include <DataMixingPileupCopy.h>
Public Member Functions | |
void | addPileupInfo (const edm::EventPrincipal *, unsigned int EventId) |
DataMixingPileupCopy (const edm::ParameterSet &ps) | |
DataMixingPileupCopy () | |
void | putPileupInfo (edm::Event &e) |
virtual | ~DataMixingPileupCopy () |
Private Attributes | |
edm::InputTag | CFPlaybackInputTag_ |
CrossingFramePlaybackInfoExtended | CrossingFramePlaybackStorage_ |
std::string | label_ |
edm::InputTag | PileupInfoInputTag_ |
std::vector< PileupSummaryInfo > | PileupSummaryStorage_ |
Definition at line 34 of file DataMixingPileupCopy.h.
DataMixingPileupCopy::DataMixingPileupCopy | ( | ) |
Definition at line 27 of file DataMixingPileupCopy.cc.
{ }
DataMixingPileupCopy::DataMixingPileupCopy | ( | const edm::ParameterSet & | ps | ) | [explicit] |
standard constructor
Definition at line 30 of file DataMixingPileupCopy.cc.
References CFPlaybackInputTag_, edm::ParameterSet::getParameter(), and PileupInfoInputTag_.
: label_(ps.getParameter<std::string>("Label")) { // Pileup/Playback information PileupInfoInputTag_ = ps.getParameter<edm::InputTag>("PileupInfoInputTag"); CFPlaybackInputTag_ = ps.getParameter<edm::InputTag>("CFPlaybackInputTag"); }
DataMixingPileupCopy::~DataMixingPileupCopy | ( | ) | [virtual] |
void DataMixingPileupCopy::addPileupInfo | ( | const edm::EventPrincipal * | ep, |
unsigned int | EventId | ||
) |
Definition at line 47 of file DataMixingPileupCopy.cc.
References CFPlaybackInputTag_, CrossingFramePlaybackStorage_, edm::EventPrincipal::id(), LogDebug, PileupInfoInputTag_, and PileupSummaryStorage_.
Referenced by edm::DataMixingModule::pileWorker().
{ LogDebug("DataMixingPileupCopy") <<"\n===============> adding pileup Info from event "<<ep->id(); // find PileupSummaryInfo, CFPlayback information, if it's there // Pileup info first boost::shared_ptr<Wrapper< std::vector<PileupSummaryInfo> > const> PileupInfoPTR = getProductByTag<std::vector<PileupSummaryInfo>>(*ep,PileupInfoInputTag_ ); if(PileupInfoPTR ) { PileupSummaryStorage_ = *(PileupInfoPTR->product()) ; LogDebug("DataMixingEMWorker") << "PileupInfo Size: " << PileupSummaryStorage_.size(); } // Playback boost::shared_ptr<Wrapper<CrossingFramePlaybackInfoExtended> const> PlaybackPTR = getProductByTag<CrossingFramePlaybackInfoExtended>(*ep,CFPlaybackInputTag_ ); if(PlaybackPTR ) { CrossingFramePlaybackStorage_ = *(PlaybackPTR->product()) ; } }
void DataMixingPileupCopy::putPileupInfo | ( | edm::Event & | e | ) |
Definition at line 79 of file DataMixingPileupCopy.cc.
References CrossingFramePlaybackStorage_, CrossingFramePlaybackInfoExtended::getEventStartInfo(), PileupSummaryStorage_, and edm::Event::put().
Referenced by edm::DataMixingModule::put().
{ std::auto_ptr<std::vector<PileupSummaryInfo> > PSIVector(new std::vector<PileupSummaryInfo>); std::vector<PileupSummaryInfo>::const_iterator PSiter; for(PSiter = PileupSummaryStorage_.begin(); PSiter != PileupSummaryStorage_.end(); PSiter++){ PSIVector->push_back(*PSiter); } std::vector<std::vector<edm::EventID> > IdVect; CrossingFramePlaybackStorage_.getEventStartInfo(IdVect, 0); std::auto_ptr< CrossingFramePlaybackInfoExtended > CFPlaybackInfo( new CrossingFramePlaybackInfoExtended(0, IdVect.size(), 1 )); CFPlaybackInfo->setEventStartInfo(IdVect, 0); e.put(PSIVector); e.put(CFPlaybackInfo); // clear local storage after this event PileupSummaryStorage_.clear(); }
Definition at line 56 of file DataMixingPileupCopy.h.
Referenced by addPileupInfo(), and DataMixingPileupCopy().
CrossingFramePlaybackInfoExtended edm::DataMixingPileupCopy::CrossingFramePlaybackStorage_ [private] |
Definition at line 59 of file DataMixingPileupCopy.h.
Referenced by addPileupInfo(), and putPileupInfo().
std::string edm::DataMixingPileupCopy::label_ [private] |
Definition at line 66 of file DataMixingPileupCopy.h.
Definition at line 55 of file DataMixingPileupCopy.h.
Referenced by addPileupInfo(), and DataMixingPileupCopy().
std::vector<PileupSummaryInfo> edm::DataMixingPileupCopy::PileupSummaryStorage_ [private] |
Definition at line 61 of file DataMixingPileupCopy.h.
Referenced by addPileupInfo(), and putPileupInfo().