|
ICP
1
|
#include <event_store.h>

Classes | |
| struct | EventStoreCardHolder |
| struct | FileEventSourceInfo |
Public Member Functions | |
| EventStore () | |
| isisU32_t * | getBuffer () |
| void | releaseBuffer (isisU32_t *buffer) |
| uint32_t | bufferSize () |
| ~EventStore () | |
| void | addCards (const std::vector< DAEEventSource * > &det_list) |
| void | addCard (DAEEventSource *det_card, bool enable=false) |
| std::list < boost::signals2::connection > | addGoodEventCallback (const EventCallbackSlotType &slot) |
| std::list < boost::signals2::connection > | addAllEventCallback (const EventCallbackSlotType &slot) |
| std::list < boost::signals2::connection > | addGoodFrameCallback (const FrameCallbackSlotType &slot) |
| std::list < boost::signals2::connection > | addAllFrameCallback (const FrameCallbackSlotType &slot) |
| std::list < boost::signals2::connection > | addNoFrameCallback (const NoFrameCallbackSlotType &slot) |
| void | clearCallbacks (const std::list< boost::signals2::connection > &callback_list) |
| void | start () |
| void | stop (bool immediate) |
| bool | endHeaderSeen () |
| uint64_t | nNewEventWords (DAEstatus &status) |
| void | clear () |
| void | setOutputFileName (int run_number, bool new_run, DAEstatus &status) |
| void | addFileInputSource (int run_number, FileEventSourceInfo &info) |
| void | addRawFileInputSource (ISISRAW *iraw, int source_id, time_t run_start) |
| void | setCardStatus (int id, bool enable) |
| void | setCardStatus (bool enable) |
| uint64_t | numRawEvents () |
| uint64_t | numGoodEvents () |
| void | getEventSourceIDs (std::vector< int > &ids) |
| void | getEnabledEventSourceIDs (std::vector< int > &ids) |
| void | closeOutputFile (DAEstatus &status) |
| void | closeAndDeleteOutputFile (int run_number, DAEstatus &status) |
Static Public Member Functions | |
| static const Poco::Path & | baseDir () |
| static Poco::Path | baseRunDir (int run_number) |
| static void | deleteOutputFile (int run_number, DAEstatus &status) |
| static int | maxNumCallbackEvents () |
Private Member Functions | |
| template<typename SLOT > | |
| std::list < boost::signals2::connection > | addCallback (boost::signals2::connection(EventStoreCard::*func)(const SLOT &), const SLOT &slot) |
| void | clearAllCallbacks () |
| void | clearSources () |
| void | clearStores () |
| void | findUnusedFileInputSources (int run_number, std::set< std::string > &files) |
| void | invokeNoFrameCallbacks (NoFrameCallbackMode mode) |
| void | clearOutputFile (DAEstatus &status) |
Static Private Member Functions | |
| static void | findFileInputSources (int run_number, std::set< std::string > &files) |
| static int | eventSourceIDFromFileInputSource (const std::string &file) |
Private Attributes | |
| Poco::MemoryPool | m_mempool |
| Poco::ThreadPool | m_threads |
| std::vector < FileEventSourceBase * > | m_sources |
| std::vector< EventStoreCardHolder > | m_stores |
| std::list < boost::signals2::connection > | m_callbacks |
Static Private Attributes | |
| static const int | m_mempool_size = 32 * 1024 * 1024 |
| static Poco::Path | m_base_dir |
Additional Inherited Members | |
Protected Member Functions inherited from ISIS::Base | |
| Base (const std::string &logger_name="UNKNOWN") | |
| void | setLoggerName (const std::string &logger_name) |
| virtual | ~Base () |
| virtual std::string | loggingPrefix () const |
| void | setThisLoggerLevel (int level) |
Static Protected Member Functions inherited from ISIS::Base | |
| static void | setAllLoggerLevel (int level) |
Protected Attributes inherited from ISIS::Base | |
| Poco::Logger * | m_logger |
| Poco::LogStream * | m_logstr |
| Poco::Mutex | m_logger_lock |
Definition at line 27 of file event_store.h.
| EventStore::EventStore | ( | ) |
Definition at line 7 of file event_store.cpp.
References LOGSTR_DEBUG, m_threads, and ISIS::Base::setLoggerName().
| EventStore::~EventStore | ( | ) |
Definition at line 356 of file event_store.cpp.
References clear(), LOGSTR_DEBUG, and stop().
| std::list< boost::signals2::connection > EventStore::addAllEventCallback | ( | const EventCallbackSlotType & | slot | ) |
Definition at line 350 of file event_store.cpp.
References EventStoreCard::addAllEventCallback(), addCallback(), and LOGSTR_DEBUG.
Referenced by ISISDAE::addAllEventCallback(), EventsToolApp::main(), and NeXusEventWriter::start().
| std::list< boost::signals2::connection > EventStore::addAllFrameCallback | ( | const FrameCallbackSlotType & | slot | ) |
Definition at line 332 of file event_store.cpp.
References EventStoreCard::addAllFrameCallback(), addCallback(), and LOGSTR_DEBUG.
Referenced by ISISDAE::addAllFrameCallback(), EventsToolApp::main(), and NeXusEventWriter::start().
|
private |
Definition at line 316 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, and m_stores.
Referenced by addAllEventCallback(), addAllFrameCallback(), addGoodEventCallback(), addGoodFrameCallback(), and addNoFrameCallback().
| void EventStore::addCard | ( | DAEEventSource * | det_card, |
| bool | enable = false |
||
| ) |
Definition at line 151 of file event_store.cpp.
References DAEEventSource::eventSourceID(), LOGSTR_DEBUG, and m_stores.
Referenced by addCards(), addFileInputSource(), addRawFileInputSource(), and ISISDAE::locateCards().
| void EventStore::addCards | ( | const std::vector< DAEEventSource * > & | det_list | ) |
Definition at line 158 of file event_store.cpp.
References addCard(), and LOGSTR_DEBUG.
| void EventStore::addFileInputSource | ( | int | run_number, |
| FileEventSourceInfo & | info | ||
| ) |
Definition at line 118 of file event_store.cpp.
References EventStore::FileEventSourceInfo::add(), addCard(), eventSourceIDFromFileInputSource(), findFileInputSources(), LOGSTR_DEBUG, LOGSTR_WARNING, m_sources, EventStore::FileEventSourceInfo::raw_frames, FileEventSource::readInfo(), and EventStore::FileEventSourceInfo::zero().
Referenced by ISISinstrumentControl::loadCRPTWithHistogrammedEvents(), EventsToolApp::main(), and NeXusEventWriter::start().
| std::list< boost::signals2::connection > EventStore::addGoodEventCallback | ( | const EventCallbackSlotType & | slot | ) |
Definition at line 344 of file event_store.cpp.
References addCallback(), EventStoreCard::addGoodEventCallback(), and LOGSTR_DEBUG.
Referenced by ISISDAE::addGoodEventCallback(), EventsToolApp::convertRawToEvents(), ISISinstrumentControl::loadCRPTWithHistogrammedEvents(), EventsToolApp::main(), and TCPEventStreamConnection::run().
| std::list< boost::signals2::connection > EventStore::addGoodFrameCallback | ( | const FrameCallbackSlotType & | slot | ) |
Definition at line 326 of file event_store.cpp.
References addCallback(), EventStoreCard::addGoodFrameCallback(), and LOGSTR_DEBUG.
Referenced by ISISDAE::addGoodFrameCallback(), and EventsToolApp::main().
| std::list< boost::signals2::connection > EventStore::addNoFrameCallback | ( | const NoFrameCallbackSlotType & | slot | ) |
Definition at line 338 of file event_store.cpp.
References addCallback(), EventStoreCard::addNoFrameCallback(), and LOGSTR_DEBUG.
Referenced by ISISDAE::addNoFrameCallback(), and NeXusEventWriter::start().
| void EventStore::addRawFileInputSource | ( | ISISRAW * | iraw, |
| int | source_id, | ||
| time_t | run_start | ||
| ) |
Definition at line 143 of file event_store.cpp.
References addCard(), LOGSTR_DEBUG, and m_sources.
Referenced by EventsToolApp::convertRawToEvents().
|
inlinestatic |
Definition at line 109 of file event_store.h.
References m_base_dir.
Referenced by baseRunDir(), EventStoreCard::fileNameForDC(), findFileInputSources(), and EventStoreCard::infoFileNameForDC().
|
inlinestatic |
Definition at line 118 of file event_store.h.
References baseDir().
Referenced by deleteOutputFile().
|
inline |
Definition at line 82 of file event_store.h.
References m_mempool_size.
Referenced by EventStoreCard::run().
| void EventStore::clear | ( | ) |
Definition at line 363 of file event_store.cpp.
References clearAllCallbacks(), clearSources(), and clearStores().
Referenced by NeXusEventWriter::start(), NeXusEventWriter::stop(), and ~EventStore().
|
inlineprivate |
|
inline |
Definition at line 91 of file event_store.h.
Referenced by ISISDAE::clearCallbacks(), and TCPEventStreamConnection::run().
|
private |
Definition at line 228 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, EventStoreCard::clearOutputFile(), LOGSTR_DEBUG, and m_stores.
|
private |
|
private |
Definition at line 379 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, and m_stores.
Referenced by clear().
| void EventStore::closeAndDeleteOutputFile | ( | int | run_number, |
| DAEstatus & | status | ||
| ) |
Definition at line 238 of file event_store.cpp.
References closeOutputFile(), deleteOutputFile(), and stop().
Referenced by ISISDAE::clearCounters(), and ISISDAE::startRun().
| void EventStore::closeOutputFile | ( | DAEstatus & | status | ) |
Definition at line 245 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, EventStoreCard::closeFiles(), m_stores, and stop().
Referenced by closeAndDeleteOutputFile(), and ISISDAE::closeEventFiles().
|
static |
Definition at line 254 of file event_store.cpp.
References DAEstatus::addInfoVa(), baseRunDir(), FAC_DAE, findFileInputSources(), and SplitFile::removeFile().
Referenced by closeAndDeleteOutputFile(), and ISISinstrumentControl::endRunTask().
| bool EventStore::endHeaderSeen | ( | ) |
Definition at line 288 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, EventStore::EventStoreCardHolder::enable, EventStoreCard::endHeaderSeen(), LOGSTR_DEBUG, and m_stores.
Referenced by EventsToolApp::convertRawToEvents(), ISISinstrumentControl::loadCRPTWithHistogrammedEvents(), EventsToolApp::main(), ISISDAE::stopRun(), and NeXusEventWriter::wait().
|
staticprivate |
Definition at line 85 of file event_store.cpp.
Referenced by addFileInputSource().
|
staticprivate |
Definition at line 65 of file event_store.cpp.
References baseDir().
Referenced by addFileInputSource(), deleteOutputFile(), and findUnusedFileInputSources().
|
private |
Definition at line 102 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, findFileInputSources(), EventStoreCard::getFileName(), and m_stores.
Referenced by setOutputFileName().
| isisU32_t * EventStore::getBuffer | ( | ) |
Definition at line 391 of file event_store.cpp.
References m_mempool.
Referenced by EventStoreCard::run().
| void EventStore::getEnabledEventSourceIDs | ( | std::vector< int > & | ids | ) |
Definition at line 43 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, EventStore::EventStoreCardHolder::enable, EventStoreCard::eventSourceID(), and m_stores.
Referenced by ISISDAE::getEnabledEventSourceIDs(), and NeXusEventWriter::start().
| void EventStore::getEventSourceIDs | ( | std::vector< int > & | ids | ) |
Definition at line 34 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, EventStoreCard::eventSourceID(), and m_stores.
Referenced by ISISDAE::getEventSourceIDs().
|
private |
Definition at line 186 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, EventStore::EventStoreCardHolder::enable, EventStoreCard::invokeNoFrameCallbacks(), and m_stores.
|
inlinestatic |
Definition at line 128 of file event_store.h.
References m_mempool_size.
| uint64_t EventStore::nNewEventWords | ( | DAEstatus & | status | ) |
Definition at line 24 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, m_stores, and EventStoreCard::nNewEventWords().
Referenced by ISISDAE::stopRun().
| uint64_t EventStore::numGoodEvents | ( | ) |
Definition at line 55 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, m_stores, and EventStoreCard::numGoodEvents().
| uint64_t EventStore::numRawEvents | ( | ) |
Definition at line 14 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, m_stores, and EventStoreCard::numRawEvents().
| void EventStore::releaseBuffer | ( | isisU32_t * | buffer | ) |
Definition at line 396 of file event_store.cpp.
References m_mempool.
Referenced by EventStoreCard::run().
| void EventStore::setCardStatus | ( | int | id, |
| bool | enable | ||
| ) |
Definition at line 175 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, EventStore::EventStoreCardHolder::enable, EventStoreCard::eventSourceID(), and m_stores.
Referenced by ISISDAE::clearDCEventMode(), setCardStatus(), and ISISDAE::setDCEventMode().
| void EventStore::setCardStatus | ( | bool | enable | ) |
Definition at line 167 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, EventStoreCard::eventSourceID(), m_stores, and setCardStatus().
| void EventStore::setOutputFileName | ( | int | run_number, |
| bool | new_run, | ||
| DAEstatus & | status | ||
| ) |
Definition at line 209 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, findUnusedFileInputSources(), ICPTimer::info(), LOGSTR_DEBUG, m_stores, SplitFile::removeFile(), and EventStoreCard::setOutputFileName().
Referenced by ISISDAE::clearCounters(), EventsToolApp::convertRawToEvents(), and ISISDAE::startRun().
| void EventStore::start | ( | ) |
Definition at line 197 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, EventStore::EventStoreCardHolder::enable, EventStoreCard::eventSourceID(), LOGSTR_DEBUG, m_stores, and m_threads.
Referenced by EventsToolApp::convertRawToEvents(), ISISinstrumentControl::loadCRPTWithHistogrammedEvents(), EventsToolApp::main(), NeXusEventWriter::start(), and ISISDAE::startRun().
| void EventStore::stop | ( | bool | immediate | ) |
Definition at line 278 of file event_store.cpp.
References EventStore::EventStoreCardHolder::card, LOGSTR_DEBUG, m_stores, m_threads, and EventStoreCard::stop().
Referenced by closeAndDeleteOutputFile(), closeOutputFile(), EventsToolApp::convertRawToEvents(), ISISinstrumentControl::loadCRPTWithHistogrammedEvents(), EventsToolApp::main(), NeXusEventWriter::stop(), ISISDAE::stopRun(), NeXusEventWriter::wait(), and ~EventStore().
|
staticprivate |
Definition at line 43 of file event_store.h.
Referenced by baseDir().
|
private |
Definition at line 44 of file event_store.h.
Referenced by clearAllCallbacks().
|
private |
Definition at line 31 of file event_store.h.
Referenced by getBuffer(), and releaseBuffer().
|
staticprivate |
Definition at line 30 of file event_store.h.
Referenced by bufferSize(), and maxNumCallbackEvents().
|
private |
Definition at line 33 of file event_store.h.
Referenced by addFileInputSource(), addRawFileInputSource(), and clearSources().
|
private |
Definition at line 42 of file event_store.h.
Referenced by addCallback(), addCard(), clearOutputFile(), clearStores(), closeOutputFile(), endHeaderSeen(), findUnusedFileInputSources(), getEnabledEventSourceIDs(), getEventSourceIDs(), invokeNoFrameCallbacks(), nNewEventWords(), numGoodEvents(), numRawEvents(), setCardStatus(), setOutputFileName(), start(), and stop().
|
private |
Definition at line 32 of file event_store.h.
Referenced by EventStore(), start(), and stop().
1.8.5