43 "event list - pairs of Eventnumber RunNumber" } ;
54 setDescription(
"EventSelectorProcessor returns true if given event was specified in EventList" ) ;
63 if( nEvts % 2 != 0 ) {
64 throw Exception(
"EventSelectorProcessor: event list size should be even (list of run / event ids)" ) ;
66 for(
unsigned i=0 ; i <nEvts ; i+=2 ) {
74 auto lcevent = evt->
event<EVENT::LCEvent>() ;
80 auto iter =
_evtSet.find( std::make_pair( lcevent->getEventNumber() , lcevent->getRunNumber() ) ) ;
81 const bool isInList = (iter !=
_evtSet.end() ) ;
83 log<DEBUG>() <<
" processing event: " << lcevent->getEventNumber()
84 <<
" in run: " << lcevent->getRunNumber()
85 <<
" - in event list : " << isInList
std::shared_ptr< T > event() const
Get the underlying event to a specific type.
void processEvent(EventStore *evt)
Process an input event.
std::set< std::pair< int, int > > EventNumberSet
Simple event selector processor.
EventSelectorProcessor()
Constructor.
#define MARLINMT_DECLARE_PROCESSOR(Class)
void setDescription(const std::string &desc)
Set the component description.
void init()
Initialize the processor.
IntVectorParameter _evtList
The event list as a set.
auto at(typename std::vector< T >::size_type idx) const
static void setReturnValue(const Processor *const proc, EventStore *event, bool value)
Set the processor return value.
void printParameters() const
Print the component parameters.