 |
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef ATHENASERVICES_MIXINGEVENTSELECTOR_H
8 #define ATHENASERVICES_MIXINGEVENTSELECTOR_H
28 #include "GaudiKernel/ServiceHandle.h"
29 #include "GaudiKernel/IEvtSelector.h"
30 #include "GaudiKernel/IConverter.h"
31 #include "GaudiKernel/ToolHandle.h"
32 #include "GaudiKernel/StatusCode.h"
33 #include "Gaudi/Property.h"
37 class MixingEventIterator;
70 :
public extends<AthService, IEvtSelector, IConverter, IAddressProvider>
76 struct Context :
public IEvtSelector::Context {
84 virtual StatusCode next(IEvtSelector::Context& refCtxt)
const override;
86 IOpaqueAddress*&)
const override;
90 virtual StatusCode next(IEvtSelector::Context&,
int)
const override;
106 const EventContext& ctx)
override;
118 virtual SmartIF<IDataProviderSvc>&
dataProvider()
const override;
120 virtual SmartIF<IConversionSvc>&
conversionSvc()
const override;
122 virtual SmartIF<IAddressCreator>&
addressCreator()
const override;
157 "Name of the file recording the last event used and how many were available for each stream. Default is to produce no file."};
160 "List of triggers (streams) to be used. Format is SelectorType/SelectorName:firstEventToUse:lastEventToUse. "
161 "One assumes events are consecutively numbered."};
165 Gaudi::Property<std::vector<unsigned long>>
m_eventNumbers{
this,
"EventNumbers", {},
166 "List of event numbers to be used for output stream. If list empty or not long enough, event numbers are "
167 "assigned consucutively after last one in list."};
170 "StoreGate key for output (merged) event info object. Default is MergedEventInfo"};
173 "IAtRndmGenSvc stream used as engine for our random distributions"};
176 "Collection of selector tools"};
179 "IAtRndmGenSvc controlling the order with which events are takes from streams"};
199 unsigned int firstEvt,
unsigned int lastEvt);
222 const std::string&
name()
const {
280 #endif // ATHENASERVICES_MIXINGEVENTSELECTOR_H
JetConstituentVector::iterator iterator
TriggerList::iterator m_pCurrentTrigger
the current trigger
TriggerList m_trigList
the ingredients
a stream of events read from different selectors.
MixingEventSelector(const std::string &name, ISvcLocator *svc)
std::string toString() const
virtual SmartIF< IConversionSvc > & conversionSvc() const override
ServiceHandle< IAtRndmGenSvc > m_atRndmSvc
virtual long repSvcType() const override
Gaudi::Property< std::string > m_statusFileName
virtual const CLID & objType() const override
virtual StatusCode releaseContext(IEvtSelector::Context *&refCtxt) const override
std::vector< unsigned int > m_rangeEnd
virtual StatusCode setDataProvider(IDataProviderSvc *pService) override
virtual StatusCode last(IEvtSelector::Context &) const override
Gaudi::Property< std::vector< unsigned long > > m_eventNumbers
bool operator==(const Trigger &rhs) const
virtual StatusCode setAddressCreator(IAddressCreator *creator) override
unsigned int todo() const
unsigned int todo() const
IEvtSelector & selector() const
virtual StatusCode next(IEvtSelector::Context &refCtxt) const override
TriggerList::iterator currentTrigger() const
"intelligent" accessor to the above
IEvtSelector * m_pSelector
virtual StatusCode loadAddresses(StoreID::type storeID, IAddressProvider::tadList &tads) override
unsigned long getEventNo() const
setup and lookup m_evtsNotUsedSoFar. Returns next event no
unsigned long m_eventPos
the internal event number
unsigned int read() const
ToolHandleArray< IAthenaSelectorTool > m_helperTools
virtual StatusCode setConversionSvc(IConversionSvc *pService) override
iterator elementInRange(unsigned int)
StatusCode previous() const
The Athena Transient Store API.
virtual StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject) override
Create the transient representation of an object.
std::vector< Trigger >::iterator iterator
void decodeTrigger(std::string triggDescr)
functor that creates a Trigger object and adds it to m_trigList
std::unique_ptr< CLHEP::RandFlat > m_chooseRangeRand
virtual void * identifier() const
Gaudi::Property< std::string > m_randomStreamName
ServiceHandle< StoreGateSvc > m_pEventStore
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual SmartIF< IDataProviderSvc > & dataProvider() const override
bool operator<(const Trigger &rhs) const
virtual StatusCode rewind(IEvtSelector::Context &refCtxt) const override
AthROOTErrorHandlerSvc * svc
TriggerList::iterator setCurrentTrigger() const
choose current trigger at random. Actually modifies state (use mutables)
uint32_t CLID
The Class ID type.
std::vector< Trigger > m_trigs
unsigned int m_firstEvent
virtual StatusCode updateObj(IOpaqueAddress *pAddress, DataObject *refpObject) override
virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress *tad, const EventContext &ctx) override
const_iterator end() const
void setUpTriggerList(Gaudi::Details::PropertyBase &trigList)
TriggerList property call-back.
virtual StatusCode finalize() override
std::string toString() const
IEvtSelector::Context * m_current
virtual StatusCode previous(IEvtSelector::Context &) const override
virtual ~MixingEventSelector()
a selector with an associated frequency
virtual StatusCode fillRepRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
bool add(const Trigger &)
std::vector< Trigger >::const_iterator const_iterator
const std::string & name() const
the list of available selectors with their frequency range
unsigned int toRead() const
virtual StatusCode initialize() override
virtual StatusCode createContext(IEvtSelector::Context *&refpCtxt) const override
virtual StatusCode preLoadAddresses(StoreID::type storeID, IAddressProvider::tadList &tads) override
Trigger(IEvtSelector *pSel, unsigned int firstEvt, unsigned int lastEvt)
std::list< SG::TransientAddress * > tadList
virtual StatusCode createAddress(const IEvtSelector::Context &refCtxt, IOpaqueAddress *&) const override
StatusCode createContext(IEvtSelector::Context *&pCtxt) const
virtual SmartIF< IAddressCreator > & addressCreator() const override
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
bool operator!=(const Trigger &rhs) const
Define macros for attributes used to control the static checker.
const_iterator begin() const
virtual StatusCode updateRep(IOpaqueAddress *pAddress, DataObject *pObject) override
IEvtSelector::Context & currentContext() const
StatusCode createAddress(IOpaqueAddress *&) const
Gaudi::Property< std::string > m_mergedEventInfoKey
virtual StatusCode fillObjRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
bool validTrigger() const
virtual StatusCode updateObjRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
virtual StatusCode resetCriteria(const std::string &cr, IEvtSelector::Context &c) const override
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Gaudi::Property< int > m_outputRunNumber
Gaudi::Property< std::vector< std::string > > m_triggerListProp
virtual StatusCode updateRepRefs(IOpaqueAddress *pAddress, DataObject *pObject) override