|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   10 #include "GaudiKernel/Service.h" 
   11 #include "GaudiKernel/ISvcLocator.h" 
   12 #include "GaudiKernel/ISvcManager.h" 
   28   m_mergeSvc(
"PileUpMergeSvc", 
m_name)
 
   35   *
this = std::move(rhs);
 
   55     rhs.m_ownEvtIterator=
false;
 
   68   m_mergeSvc(
"PileUpMergeSvc", 
name)
 
   71     const std::string errMsg(
"PileUpStream:: can not create stream");
 
   73     throw std::runtime_error(errMsg);
 
   79                const std::string& selecName):
 
   83   m_mergeSvc(
"PileUpMergeSvc", 
name)
 
   88     const std::string errMsg(
"PileUpStream: can not create stream");
 
   90     throw std::runtime_error(errMsg);
 
  101   std::string storeName(
name() + 
"_SG");
 
  112     SmartIF<StoreGateSvc> pIS(
serviceLocator()->service(
"StoreGateSvc"));
 
  113     rc = (pIS.isValid() &&
 
  119       rc = (
m_SG->sysInitialize()).isSuccess();
 
  126     SmartIF<IAddressProvider> pIAP(
m_sel);
 
  127     if (pIAP.isValid()) {
 
  128       const std::string PPSName(
name() + 
"_PPS");
 
  129       SmartIF<IProxyProviderSvc> pPPSvc(
serviceLocator()->service(PPSName));
 
  131       if ( pISM.isValid() &&
 
  132            pISM->declareSvcType(PPSName, 
"ProxyProviderSvc").isSuccess() &&
 
  135         pPPSvc->addProvider(pIAP);
 
  136         SmartIF<IAddressProvider> pAthPoolAddProv(
serviceLocator()->service(
"AthenaPoolAddressProviderSvc"));
 
  137         if (pAthPoolAddProv.isValid()) {
 
  138           pPPSvc->addProvider(pAthPoolAddProv);
 
  140           ATH_MSG_WARNING ( 
"could not add AthenaPoolAddressProviderSvc as AddresssProvider for "<< PPSName );
 
  142         SmartIF<IAddressProvider> pAddrRemap(
serviceLocator()->service(
"AddressRemappingSvc"));
 
  143         if (pAddrRemap.isValid()) {
 
  144           pPPSvc->addProvider(pAddrRemap);
 
  146           ATH_MSG_WARNING ( 
"could not add AddressRemappingSvc as AddresssProvider for "<< PPSName );
 
  148         m_SG->setProxyProviderSvc(pPPSvc);
 
  164   return (this->
store().clearStore().isSuccess() && 
 
  166     StatusCode::SUCCESS :
 
  175     StatusCode::SUCCESS :
 
  183   IOpaqueAddress* paddr(0);
 
  196    else if (readRecord) {
 
  203       ATH_MSG_INFO ( 
"nextEventPre(): end of the loop. No more events in the selection" );
 
  208    if (readRecord and xAODEventInfo) {
 
  210               <<  xAODEventInfo->eventNumber() 
 
  211               << 
" run " << xAODEventInfo->runNumber()
 
  212               << 
" into store " << this->store().name() );
 
  215    return xAODEventInfo;
 
  220   else if (readRecord) {
 
  226     ATH_MSG_INFO ( 
"nextEventPre_Passive(): end of the loop. No more events in the selection" );
 
  236   if (
m_ownStore && Gaudi::StateMachine::INITIALIZED == 
store().FSMState()) {
 
  237     sc = this->
store().sysFinalize();
 
  239   this->
store().release();
 
  
void setActiveStore()
set ActiveStore
void makeCurrent()
The current store is becoming the active store.
StatusCode nextRecordPre()
increment event iterator before loading store
std::string m_name
Stream name.
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
IEvtSelector & selector()
The Athena Transient Store API.
const xAOD::EventInfo * nextEventPre(bool readRecord=true)
return next Event, load store with next Event
StatusCode finalize()
finalize and release store. To be called on ... finalize()
ISvcLocator * p_svcLoc
ServiceLocator.
bool m_used
has this stream already been used? (for the current event)
bool m_ownStore
is m_SG a store we cloned from the master one?
ServiceHandle< PileUpMergeSvc > m_mergeSvc
PileUpStream & operator=(const PileUpStream &rhs)=delete
bool setupStore()
setup input and overlay selectors and iters
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode loadEventProxies()
load proxies at begin event
unsigned int m_iOriginalRing
original ring in which event was used
Class to provide easy MsgStream access and capabilities.
a triple selector/context/store defines a stream
const std::string & name()
bool nextEventPre_Passive(bool readRecord)
like nextEventPre, but doesn't actually load anything
StatusCode nextRecordPre_Passive()
increment event iterator
bool loadStore()
clear store and load new proxies
bool m_neverLoaded
has an event been loaded into this stream?
ISvcLocator * serviceLocator()
bool m_ownEvtIterator
do we own p_iter?
StatusCode recordAddress(const std::string &skey, CxxUtils::RefCountedPtr< IOpaqueAddress > pAddress, bool clearAddressFlag=true)
Create a proxy object using an IOpaqueAddress and a transient key.
Class describing the basic event information.
StatusCode clone(const IService *parent, const std::string &childName, Service *&child)
given a reference to a parent svc sets a reference to a cloned child
#define ATH_MSG_WARNING(x)
a triple selector/context/store defines a stream
SmartIF< IEvtSelector > m_sel
Selector.
EvtIterator * p_iter
Input Iterators.
SmartIF< StoreGateSvc > m_SG
StoreGateSvc;.