separate token for the view

use a token with correct type for the fall-back case of using a candidate view as an input.

What's the enable_?
If your point is to pick only one at the config step, that's not what the
code was designed to implement.
If thats an issue, current state of use cases is such that the second
branch using a view can be removed completely
 On Aug 30, 2014 8:00 AM, "David Lange" <notifications@github.com> wrote:

> In CommonTools/ParticleFlow/plugins/PFPileUp.cc:
>
> > @@ -19,6 +19,8 @@ PFPileUp::PFPileUp(const edm::ParameterSet& iConfig) {
> >
> >    tokenPFCandidates_
> >      = consumes<PFCollection>(iConfig.getParameter<InputTag>("PFCandidates"));
> > +  tokenPFCandidatesView_
> > +    = mayConsume<PFView>(iConfig.getParameter<InputTag>("PFCandidates"));
>
> @slava77 <https://github.com/slava77> - seems that the proper change here
> is
>
> if (enable_)
> tokenPFCandidates_ = consumes….
> else
> tokenPFCandidatesView_ = consumes …..
>
> [as it is, the first consumes statement is not always right unless I've
> missed something]
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/cms-sw/cmssw/pull/5114/files#r16929566>.
>