ICP  1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
EventStoreCard Class Reference

#include <event_store.h>

Inheritance diagram for EventStoreCard:
Inheritance graph

Public Member Functions

boost::signals2::connection addGoodEventCallback (const EventCallbackSlotType &slot)
 
boost::signals2::connection addAllEventCallback (const EventCallbackSlotType &slot)
 
boost::signals2::connection addGoodFrameCallback (const FrameCallbackSlotType &slot)
 
boost::signals2::connection addAllFrameCallback (const FrameCallbackSlotType &slot)
 
boost::signals2::connection addNoFrameCallback (const NoFrameCallbackSlotType &slot)
 
void flushEvents (DAEstatus &status)
 
void checkAndHistogramEvents ()
 
void run ()
 
void stop (bool immediate)
 request stop after processing finished More...
 
 EventStoreCard (EventStore *es, DAEEventSource *dc)
 
bool endHeaderSeen () const
 
void setOutputFileName (int run_number, bool new_run, DAEstatus &status)
 
void clearOutputFile (DAEstatus &status)
 
int eventSourceID () const
 
std::string getFileName ()
 
void closeFiles ()
 
uint64_t numRawEvents ()
 
uint64_t numGoodEvents ()
 
uint64_t nNewEventWords (DAEstatus &status)
 
void invokeNoFrameCallbacks (NoFrameCallbackMode mode)
 
 ~EventStoreCard ()
 

Static Public Member Functions

static std::string fileNameForDC (int run_number, int dc_number)
 
static std::string infoFileNameForDC (int run_number, int dc_number)
 
static void getInfoFileData (const std::string &file_name, InfoFileData &info)
 

Private Member Functions

void updateFilePosition (DAEstatus &status)
 
bool fixFrameHeader (DAEEventHeader &head)
 
void fixBadFrameHeader (DAEEventHeader &head)
 
virtual std::string loggingPrefix () const
 
 EventStoreCard ()
 
void operator= (const EventStoreCard &)
 
 EventStoreCard (const EventStoreCard &)
 

Private Attributes

InfoFileData m_data
 
bool m_keep_going
 
bool m_immediate_stop
 
int m_run_number
 
Poco::ThreadPool m_threads
 
EventStorem_store
 
DAEEventSourcem_dc
 
isisU32_tm_buffer
 buffer containing new events from detector card More...
 
uint32_t m_len_buffer
 number of words in m_buffer More...
 
SplitFile m_file
 
std::string m_file_name
 
std::string m_info_file_name
 
EventCallbackType m_good_event_callbacks
 
EventCallbackType m_all_event_callbacks
 
FrameCallbackType m_good_frame_callbacks
 
FrameCallbackType m_all_frame_callbacks
 
NoFrameCallbackType m_no_frame_callbacks
 

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 ()
 
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
 

Detailed Description

Definition at line 160 of file event_store.h.

Constructor & Destructor Documentation

EventStoreCard::EventStoreCard ( EventStore es,
DAEEventSource dc 
)
EventStoreCard::~EventStoreCard ( )

Definition at line 740 of file event_store.cpp.

References closeFiles(), and LOGSTR_DEBUG.

EventStoreCard::EventStoreCard ( )
inlineprivate

Definition at line 227 of file event_store.h.

EventStoreCard::EventStoreCard ( const EventStoreCard )
inlineprivate

Definition at line 229 of file event_store.h.

Member Function Documentation

boost::signals2::connection EventStoreCard::addAllEventCallback ( const EventCallbackSlotType slot)

Definition at line 764 of file event_store.cpp.

References LOGSTR_DEBUG, and m_good_event_callbacks.

Referenced by EventStore::addAllEventCallback().

boost::signals2::connection EventStoreCard::addAllFrameCallback ( const FrameCallbackSlotType slot)

Definition at line 776 of file event_store.cpp.

References LOGSTR_DEBUG, and m_all_frame_callbacks.

Referenced by EventStore::addAllFrameCallback().

boost::signals2::connection EventStoreCard::addGoodEventCallback ( const EventCallbackSlotType slot)

Definition at line 758 of file event_store.cpp.

References LOGSTR_DEBUG, and m_good_event_callbacks.

Referenced by EventStore::addGoodEventCallback().

boost::signals2::connection EventStoreCard::addGoodFrameCallback ( const FrameCallbackSlotType slot)

Definition at line 770 of file event_store.cpp.

References LOGSTR_DEBUG, and m_good_frame_callbacks.

Referenced by EventStore::addGoodFrameCallback().

boost::signals2::connection EventStoreCard::addNoFrameCallback ( const NoFrameCallbackSlotType slot)

Definition at line 782 of file event_store.cpp.

References LOGSTR_DEBUG, and m_no_frame_callbacks.

Referenced by EventStore::addNoFrameCallback().

void EventStoreCard::checkAndHistogramEvents ( )
void EventStoreCard::clearOutputFile ( DAEstatus status)
void EventStoreCard::closeFiles ( )
bool EventStoreCard::endHeaderSeen ( ) const
inline

Definition at line 182 of file event_store.h.

References InfoFileData::end_header_present, and m_data.

Referenced by EventStore::endHeaderSeen().

int EventStoreCard::eventSourceID ( ) const
inline
std::string EventStoreCard::fileNameForDC ( int  run_number,
int  dc_number 
)
static

Definition at line 416 of file event_store.cpp.

References EventStore::baseDir().

Referenced by FileEventSource::FileEventSource(), and setOutputFileName().

void EventStoreCard::fixBadFrameHeader ( DAEEventHeader head)
private
bool EventStoreCard::fixFrameHeader ( DAEEventHeader head)
private

This is a workaround for period card corruption with two crates we just fix the frame number here and fix protons, period, info.bad_frame etc. later return true if fix it, false otherwise

Definition at line 607 of file event_store.cpp.

References DAEEventHeader::frame_number, InfoFileData::last_frame, and m_data.

Referenced by checkAndHistogramEvents().

void EventStoreCard::flushEvents ( DAEstatus status)
std::string EventStoreCard::getFileName ( )
inline

Definition at line 187 of file event_store.h.

References m_file_name.

Referenced by EventStore::findUnusedFileInputSources().

void EventStoreCard::getInfoFileData ( const std::string &  file_name,
InfoFileData info 
)
static

Definition at line 434 of file event_store.cpp.

References atomic_read(), and InfoFileData::newFile().

Referenced by FileEventSource::FileEventSource(), and setOutputFileName().

std::string EventStoreCard::infoFileNameForDC ( int  run_number,
int  dc_number 
)
static

Definition at line 425 of file event_store.cpp.

References EventStore::baseDir().

Referenced by FileEventSource::FileEventSource(), and setOutputFileName().

void EventStoreCard::invokeNoFrameCallbacks ( NoFrameCallbackMode  mode)
virtual std::string EventStoreCard::loggingPrefix ( ) const
inlineprivatevirtual

Reimplemented from ISIS::Base.

Definition at line 225 of file event_store.h.

References eventSourceID().

uint64_t EventStoreCard::nNewEventWords ( DAEstatus status)

Definition at line 577 of file event_store.cpp.

References m_dc, and DAEEventSource::nNewEventWords().

Referenced by EventStore::nNewEventWords().

uint64_t EventStoreCard::numGoodEvents ( )
inline

Definition at line 193 of file event_store.h.

References InfoFileData::good_events, and m_data.

Referenced by EventStore::numGoodEvents().

uint64_t EventStoreCard::numRawEvents ( )
inline

Definition at line 192 of file event_store.h.

References m_data, and InfoFileData::raw_events.

Referenced by EventStore::numRawEvents().

void EventStoreCard::operator= ( const EventStoreCard )
inlineprivate

Definition at line 228 of file event_store.h.

void EventStoreCard::run ( )
void EventStoreCard::setOutputFileName ( int  run_number,
bool  new_run,
DAEstatus status 
)
void EventStoreCard::stop ( bool  immediate)
inline

request stop after processing finished

Definition at line 178 of file event_store.h.

References m_immediate_stop, and m_keep_going.

Referenced by EventStore::stop().

void EventStoreCard::updateFilePosition ( DAEstatus status)
private

Member Data Documentation

EventCallbackType EventStoreCard::m_all_event_callbacks
private

Definition at line 218 of file event_store.h.

Referenced by checkAndHistogramEvents().

FrameCallbackType EventStoreCard::m_all_frame_callbacks
private

Definition at line 220 of file event_store.h.

Referenced by addAllFrameCallback(), and checkAndHistogramEvents().

isisU32_t* EventStoreCard::m_buffer
private

buffer containing new events from detector card

Definition at line 212 of file event_store.h.

Referenced by checkAndHistogramEvents(), flushEvents(), and run().

InfoFileData EventStoreCard::m_data
private
DAEEventSource* EventStoreCard::m_dc
private
SplitFile EventStoreCard::m_file
private
std::string EventStoreCard::m_file_name
private
EventCallbackType EventStoreCard::m_good_event_callbacks
private
FrameCallbackType EventStoreCard::m_good_frame_callbacks
private

Definition at line 219 of file event_store.h.

Referenced by addGoodFrameCallback(), and checkAndHistogramEvents().

bool EventStoreCard::m_immediate_stop
private

Definition at line 201 of file event_store.h.

Referenced by checkAndHistogramEvents(), run(), and stop().

std::string EventStoreCard::m_info_file_name
private

Definition at line 216 of file event_store.h.

Referenced by setOutputFileName(), and updateFilePosition().

bool EventStoreCard::m_keep_going
private

Definition at line 200 of file event_store.h.

Referenced by clearOutputFile(), run(), and stop().

uint32_t EventStoreCard::m_len_buffer
private

number of words in m_buffer

Definition at line 213 of file event_store.h.

Referenced by checkAndHistogramEvents(), flushEvents(), and run().

NoFrameCallbackType EventStoreCard::m_no_frame_callbacks
private

Definition at line 221 of file event_store.h.

Referenced by addNoFrameCallback(), and invokeNoFrameCallbacks().

int EventStoreCard::m_run_number
private

Definition at line 208 of file event_store.h.

Referenced by setOutputFileName().

EventStore* EventStoreCard::m_store
private

Definition at line 210 of file event_store.h.

Referenced by run().

Poco::ThreadPool EventStoreCard::m_threads
private

Definition at line 209 of file event_store.h.

Referenced by run().


The documentation for this class was generated from the following files: