|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #include "GaudiKernel/ConcurrencyFlags.h"
23 declareProperty(
"NSlots",
m_nSlots,
"number of event slots");
37 Gaudi::Concurrency::ConcurrencyFlags::setNumProcs(numProcs);
49 return StatusCode::SUCCESS;
60 rc=
m_slots[slotIndex].pEvtStore->clearStore();
61 if (rc.isSuccess())
debug() <<
"cleared store " << slotIndex <<
endmsg;
63 if (!rc.isSuccess())
error() <<
"could not clear store " << slotIndex <<
endmsg;
74 if(FSMState() == Gaudi::StateMachine::INITIALIZED) {
75 fatal() <<
"Too late to change the number of slots!" <<
endmsg;
76 return StatusCode::FAILURE;
81 Gaudi::Concurrency::ConcurrencyFlags::setNumConcEvents( slots );
82 return StatusCode::SUCCESS;
100 error() <<
"No slots available for event number " << evtNumber <<
endmsg;
101 return std::string::npos;
103 std::scoped_lock lock{
m_mutex};
106 error() <<
"Attempt to allocate an event slot for an event that is still active: event number " << evtNumber <<
endmsg;
107 return std::string::npos;
111 <<
" allocated to event number "<< evtNumber <<
endmsg;
116 error() <<
"No slots available for event number " << evtNumber <<
endmsg;
117 return std::string::npos;
127 std::scoped_lock lock{
m_mutex};
129 debug() <<
"Slot " << slotIndex <<
" is already free" <<
endmsg;
132 m_slots[slotIndex].eventNumber = -1;
136 return StatusCode::SUCCESS;
139 return StatusCode::FAILURE;
153 return std::string::npos;
163 std::string
key =
id.key();
164 key.erase(0,
key.find(
'+')+1);
166 if (
id.clid() == 0) {
170 std::string
cl =
id.fullKey();
171 cl.erase(
cl.find(
'/'),
cl.length());
185 fatal() <<
"Unable to initialize base class" <<
endmsg;
186 return StatusCode::FAILURE;
190 fatal() <<
"Unable to get hive event store" <<
endmsg;
191 return StatusCode::FAILURE;
199 std::ostringstream oss;
202 child->initialize().isSuccess() &&
203 0 != (pSG =
dynamic_cast<SGImplSvc*
>(child)) )
208 fatal() <<
"Unable to clone event store " << oss.str() <<
endmsg;
209 return StatusCode::FAILURE;
214 Gaudi::Concurrency::ConcurrencyFlags::setNumConcEvents(
m_nSlots );
225 CHECK(
s.pEvtStore->finalize() );
226 s.pEvtStore->release();
229 return StatusCode::SUCCESS;
240 slot.pEvtStore->mergeStringPool (*
m_hiveStore->currentStore());
242 return StatusCode::SUCCESS;
virtual StatusCode initialize() override
virtual size_t getPartitionNumber(int eventnumber) const override
Get the slot number corresponding to a given event.
static void setSlot(SG::HiveEventSlot *pSlot)
set the hive event slot pointer: used by the event loop mgrs
ServiceHandle< StoreGateSvc > m_hiveStore
virtual StatusCode finalize() override
std::vector< SG::HiveEventSlot > m_slots
std::atomic< size_t > m_freeSlots
virtual bool exists(const DataObjID &) override
Check if a data object exists in store.
::StatusCode StatusCode
StatusCode definition for legacy code.
HiveMgrSvc(const std::string &name, ISvcLocator *svc)
Standard Service Constructor. sets active store to default event store.
#define CHECK(...)
Evaluate an expression and check for errors.
defines an enum used by address providers to decide what kind of StoreGateSvc they are providing addr...
virtual StatusCode start() override
AthROOTErrorHandlerSvc * svc
virtual StatusCode selectStore(size_t slotIndex) override
Activate an given 'slot' for all subsequent calls within the same thread id.
virtual size_t allocateStore(int evtnumber) override
Allocate a store slot for new event.
Helpers for checking error return status codes and reporting errors.
virtual StatusCode freeStore(size_t slotIndex) override
Free a store slot.
static void setNumProcs(size_t numProcs)
Set number of concurrent processes.
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
virtual size_t getNumberOfStores() const override
Get the number of 'slots'.
virtual StatusCode setNumberOfStores(size_t slots) override
Set the number of 'slots'.
__thread HiveEventSlot * s_current(0)
virtual StatusCode clearStore(size_t slotIndex) override
Clear a given 'slot'.
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
virtual size_t freeSlots() override
Get free slots number.