Skip to content

Commit

Permalink
Use PutToken
Browse files Browse the repository at this point in the history
  • Loading branch information
makortel committed Jan 30, 2019
1 parent 21b5f56 commit dbf91ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -49,15 +49,14 @@
//---------------------------------------------------------------------------
SiPixelClusterProducer::SiPixelClusterProducer(edm::ParameterSet const& conf)
:
tPutPixelClusters(produces<SiPixelClusterCollectionNew>()),
clusterMode_( conf.getParameter<std::string>("ClusterMode") ),
maxTotalClusters_( conf.getParameter<int32_t>( "maxNumberOfClusters" ) )
{
if ( clusterMode_ == "PixelThresholdReclusterizer" )
tPixelClusters = consumes<SiPixelClusterCollectionNew>( conf.getParameter<edm::InputTag>("src") );
else
tPixelDigi = consumes<edm::DetSetVector<PixelDigi>>( conf.getParameter<edm::InputTag>("src") );
//--- Declare to the EDM what kind of collections we will be making.
produces<SiPixelClusterCollectionNew>();

const auto& payloadType = conf.getParameter<std::string>( "payloadType" );
if (payloadType == "HLT")
Expand Down Expand Up @@ -129,7 +128,7 @@ void SiPixelClusterProducer::fillDescriptions(edm::ConfigurationDescriptions& de

// Step D: write output to file
output->shrink_to_fit();
e.put(std::move(output));
e.put(tPutPixelClusters, std::move(output));

}

Expand Down
Expand Up @@ -72,6 +72,7 @@
private:
edm::EDGetTokenT<SiPixelClusterCollectionNew> tPixelClusters;
edm::EDGetTokenT<edm::DetSetVector<PixelDigi>> tPixelDigi;
edm::EDPutTokenT<SiPixelClusterCollectionNew> tPutPixelClusters;
// TO DO: maybe allow a map of pointers?
std::unique_ptr<SiPixelGainCalibrationServiceBase> theSiPixelGainCalibration_;
const std::string clusterMode_; // user's choice of the clusterizer
Expand Down

0 comments on commit dbf91ad

Please sign in to comment.