11 #include "GaudiKernel/Service.h"
12 #include "GaudiKernel/ISvcLocator.h"
13 #include "GaudiKernel/ISvcManager.h"
29 m_name(
"INVALID"), p_svcLoc(0), m_sel(0), m_SG(0), p_iter(0),
30 m_ownEvtIterator(false),
31 m_neverLoaded(true), m_ownStore(false),
32 m_used(false), m_hasRing(false), m_iOriginalRing(0)
38 m_name(rhs.m_name), p_svcLoc(rhs.p_svcLoc), m_sel(rhs.m_sel),
39 m_SG(rhs.m_SG), p_iter(rhs.p_iter), m_mergeSvc(rhs.m_mergeSvc), m_ownEvtIterator(rhs.m_ownEvtIterator),
40 m_neverLoaded(rhs.m_neverLoaded), m_ownStore(rhs.m_ownStore),
41 m_used(rhs.m_used), m_hasRing(rhs.m_hasRing), m_iOriginalRing(rhs.m_iOriginalRing)
44 rhs.m_ownEvtIterator=
false;
58 rhs.m_ownEvtIterator=
false;
73 m_name(
name), p_svcLoc(svcLoc), m_sel(
sel), m_SG(0), p_iter(0),
74 m_ownEvtIterator(false),
75 m_neverLoaded(true), m_ownStore(false),
76 m_used(false), m_hasRing(false), m_iOriginalRing(0)
82 const std::string errMsg(
"PileUpStream:: can not create stream");
84 throw std::runtime_error(errMsg);
90 const std::string& selecName):
92 m_name(
name), p_svcLoc(svcLoc), m_sel(0), m_SG(0), p_iter(0),
93 m_ownEvtIterator(false),
94 m_neverLoaded(true), m_ownStore(false),
95 m_used(false), m_hasRing(false), m_iOriginalRing(0)
103 const std::string errMsg(
"PileUpStream: can not create stream");
105 throw std::runtime_error(errMsg);
118 std::string storeName(
name() +
"_SG");
129 SmartIF<StoreGateSvc> pIS(
serviceLocator()->service(
"StoreGateSvc"));
130 rc = (pIS.isValid() &&
136 rc = (
m_SG->sysInitialize()).isSuccess();
143 SmartIF<IAddressProvider> pIAP(
m_sel);
144 if (pIAP.isValid()) {
145 const std::string PPSName(
name() +
"_PPS");
146 SmartIF<IProxyProviderSvc> pPPSvc(
serviceLocator()->service(PPSName));
148 if ( pISM.isValid() &&
149 pISM->declareSvcType(PPSName,
"ProxyProviderSvc").isSuccess() &&
152 pPPSvc->addProvider(pIAP);
153 SmartIF<IAddressProvider> pAthPoolAddProv(
serviceLocator()->service(
"AthenaPoolAddressProviderSvc"));
154 if (pAthPoolAddProv.isValid()) {
155 pPPSvc->addProvider(pAthPoolAddProv);
157 ATH_MSG_WARNING (
"could not add AthenaPoolAddressProviderSvc as AddresssProvider for "<< PPSName );
159 SmartIF<IAddressProvider> pAddrRemap(
serviceLocator()->service(
"AddressRemappingSvc"));
160 if (pAddrRemap.isValid()) {
161 pPPSvc->addProvider(pAddrRemap);
163 ATH_MSG_WARNING (
"could not add AddressRemappingSvc as AddresssProvider for "<< PPSName );
165 m_SG->setProxyProviderSvc(pPPSvc);
181 return (this->
store().clearStore().isSuccess() &&
183 StatusCode::SUCCESS :
192 StatusCode::SUCCESS :
206 IOpaqueAddress* paddr(0);
219 else if (readRecord) {
226 ATH_MSG_INFO (
"nextEventPre(): end of the loop. No more events in the selection" );
231 if (readRecord and xAODEventInfo) {
233 << xAODEventInfo->eventNumber()
234 <<
" run " << xAODEventInfo->runNumber()
235 <<
" into store " << this->store().name() );
238 return xAODEventInfo;
243 else if (readRecord) {
249 ATH_MSG_INFO (
"nextEventPre_Passive(): end of the loop. No more events in the selection" );
259 #ifdef GAUDIKERNEL_STATEMACHINE_H_
260 if (
m_ownStore && Gaudi::StateMachine::INITIALIZED ==
store().FSMState()) {
261 sc = this->
store().sysFinalize();
266 this->
store().release();