00001 #ifndef UtilAlgos_SingleObjectRefSelector_h
00002 #define UtilAlgos_SingleObjectRefSelector_h
00003
00004
00005
00006
00007 #include "PhysicsTools/UtilAlgos/interface/ObjectSelector.h"
00008 #include "PhysicsTools/UtilAlgos/interface/StoreContainerTrait.h"
00009 #include "PhysicsTools/UtilAlgos/interface/SelectionAdderTrait.h"
00010 #include "PhysicsTools/UtilAlgos/interface/SingleElementCollectionRefSelector.h"
00011 #include "DataFormats/Common/interface/View.h"
00012
00013 template<typename InputType, typename Selector,
00014 typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<edm::View<InputType> >::type,
00015 typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type,
00016 typename PostProcessor = ::helper::NullPostProcessor<OutputCollection>,
00017 typename StoreManager = typename ::helper::StoreManagerTrait<OutputCollection>::type,
00018 typename Base = typename ::helper::StoreManagerTrait<OutputCollection>::base,
00019 typename RefAdder = typename ::helper::SelectionAdderTrait<edm::View<InputType>, StoreContainer>::type>
00020 class SingleObjectRefSelector :
00021 public ObjectSelector<SingleElementCollectionRefSelector<InputType, Selector, OutputCollection, StoreContainer, RefAdder>,
00022 OutputCollection, NonNullNumberSelector, PostProcessor, StoreManager, Base> {
00023 public:
00024 explicit SingleObjectRefSelector(const edm::ParameterSet & cfg) :
00025 ObjectSelector<SingleElementCollectionRefSelector<InputType, Selector, OutputCollection, StoreContainer, RefAdder>,
00026 OutputCollection, NonNullNumberSelector, PostProcessor>( cfg ) { }
00027 virtual ~SingleObjectRefSelector() { }
00028 };
00029
00030 #endif