Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:01:16

0001 #ifndef UtilAlgos_SingleObjectRefSelector_h
0002 #define UtilAlgos_SingleObjectRefSelector_h
0003 /* \class SingleObjectRefSelector
0004  *
0005  * \author Luca Lista, INFN
0006  */
0007 #include "FWCore/Framework/interface/ConsumesCollector.h"
0008 #include "CommonTools/UtilAlgos/interface/ObjectSelector.h"
0009 #include "CommonTools/UtilAlgos/interface/StoreContainerTrait.h"
0010 #include "CommonTools/UtilAlgos/interface/SelectionAdderTrait.h"
0011 #include "CommonTools/UtilAlgos/interface/SingleElementCollectionRefSelector.h"
0012 #include "DataFormats/Common/interface/View.h"
0013 
0014 template <typename InputType,
0015           typename Selector,
0016           typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<edm::View<InputType>>::type,
0017           typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type,
0018           typename PostProcessor = ::helper::NullPostProcessor<OutputCollection>,
0019           typename StoreManager = typename ::helper::StoreManagerTrait<OutputCollection, edm::stream::EDFilter<>>::type,
0020           typename Base = typename ::helper::StoreManagerTrait<OutputCollection, edm::stream::EDFilter<>>::base,
0021           typename RefAdder = typename ::helper::SelectionAdderTrait<edm::View<InputType>, StoreContainer>::type>
0022 class SingleObjectRefSelector
0023     : public ObjectSelector<
0024           SingleElementCollectionRefSelector<InputType, Selector, OutputCollection, StoreContainer, RefAdder>,
0025           OutputCollection,
0026           NonNullNumberSelector,
0027           PostProcessor,
0028           StoreManager,
0029           Base> {
0030 public:
0031   explicit SingleObjectRefSelector(const edm::ParameterSet& cfg)
0032       : ObjectSelector<
0033             SingleElementCollectionRefSelector<InputType, Selector, OutputCollection, StoreContainer, RefAdder>,
0034             OutputCollection,
0035             NonNullNumberSelector,
0036             PostProcessor>(cfg) {}
0037   ~SingleObjectRefSelector() override {}
0038 };
0039 
0040 #endif