16 #include "boost/bind.hpp"
35 virtual void endJob()
override;
61 cut_(iConfig.existsAs<std::
string>(
"cut") ? iConfig.getParameter<std::
string>(
"cut") :
""),
62 filter_(iConfig.existsAs<bool>(
"filter") ? iConfig.getParameter<bool>(
"filter") :
false),
63 sortDescendingBy_(iConfig.existsAs<std::
string>(
"sortDescendingBy") ? iConfig.getParameter<std::
string>(
"sortDescendingBy") :
""),
64 sortFunction_(sortDescendingBy_.
size()>0 ? sortDescendingBy_ :
"pt"),
65 maxProbes_(iConfig.existsAs<int32_t>(
"maxProbes") ? iConfig.getParameter<int32_t>(
"maxProbes") : -1),
66 probeFiller_(new tnp::BaseTreeFiller(
"probe_tree", iConfig, consumesCollector()))
77 if(!probes.
isValid())
return result;
80 typedef std::pair<reco::CandidateBaseRef, double> Pair;
81 std::vector<Pair> selectedProbes;
82 for (
size_t i = 0;
i < probes->size(); ++
i){
StringObjectFunction< reco::Candidate, true > sortFunction_
The StringObjectFunction itself.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
ProbeTreeProducer(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
int32_t maxProbes_
The number of first probes used to fill the tree.
ParameterSet const & getProcessParameterSetContainingModule(ModuleDescription const &moduleDescription)
virtual void endJob() override
U second(std::pair< T, U > const &p)
virtual bool filter(edm::Event &, const edm::EventSetup &) override
StringCutObjectSelector< reco::Candidate, true > cut_
The selector object.
ModuleDescription const & moduleDescription() const
std::auto_ptr< tnp::BaseTreeFiller > probeFiller_
The object that actually computes variables and fills the tree for the probe.
std::string sortDescendingBy_
Name of the reco::Candidate function used for sorting.
volatile std::atomic< bool > shutdown_flag false
tuple size
Write out results.
bool filter_
Specifies whether this module should filter.
edm::EDGetTokenT< reco::CandidateView > probesToken_
InputTag to the collection of all probes.