#include <DiskWriterResources.h>
Public Member Functions | |
DiskWriterResources () | |
bool | isBusy () |
void | requestStreamConfiguration (EvtStrConfigListPtr const, ErrStrConfigListPtr const, DiskWritingParams const &, unsigned int const &runNumber, boost::posix_time::time_duration const &timeoutValue) |
void | requestStreamDestruction () |
void | setBusy (bool isBusyFlag) |
void | streamChangeDone () |
virtual bool | streamChangeOngoing () |
bool | streamChangeRequested (bool &doConfig, EvtStrConfigListPtr &, ErrStrConfigListPtr &, DiskWritingParams &dwParams, unsigned int &runNumber, boost::posix_time::time_duration &timeoutValue) |
virtual void | waitForStreamChange () |
virtual | ~DiskWriterResources () |
Private Attributes | |
bool | configurationIsNeeded_ |
bool | diskWriterIsBusy_ |
bool | fileClosingTestIsNeeded_ |
DiskWritingParams | requestedDiskWritingParams_ |
ErrStrConfigListPtr | requestedErrorStreamConfig_ |
EvtStrConfigListPtr | requestedEventStreamConfig_ |
unsigned int | requestedRunNumber_ |
boost::posix_time::time_duration | requestedTimeout_ |
boost::condition | streamChangeCondition_ |
bool | streamChangeInProgress_ |
bool | streamChangeIsNeeded_ |
boost::mutex | streamChangeMutex_ |
Container class for resources that are needed by the DiskWriter and need to be accessed from multiple threads.
Definition at line 32 of file DiskWriterResources.h.
stor::DiskWriterResources::DiskWriterResources | ( | ) |
Constructs a DiskWriterResources instance.
Definition at line 8 of file DiskWriterResources.cc.
|
inlinevirtual |
bool stor::DiskWriterResources::isBusy | ( | ) |
Tests if the DiskWriter is currently busy..
Definition at line 107 of file DiskWriterResources.cc.
References diskWriterIsBusy_.
Referenced by Vispa.Plugins.EventBrowser.EventBrowserTabController.EventBrowserTabController::navigate().
void stor::DiskWriterResources::requestStreamConfiguration | ( | EvtStrConfigListPtr const | evtStrConfig, |
ErrStrConfigListPtr const | errStrConfig, | ||
DiskWritingParams const & | dwParams, | ||
unsigned int const & | runNumber, | ||
boost::posix_time::time_duration const & | timeoutValue | ||
) |
Requests that the DiskWriter streams be configured with the specified configurations. Also allows new DiskWritingParams, run number and dequeue timeout values to be specified. Existing stream configurations will be discarded.
Definition at line 18 of file DiskWriterResources.cc.
References convertSQLiteXML::runNumber.
void stor::DiskWriterResources::requestStreamDestruction | ( | ) |
Requests that the DiskWriter streams be destroyed. Any pending stream configuraton request will be cancelled.
Definition at line 37 of file DiskWriterResources.cc.
References configurationIsNeeded_, streamChangeIsNeeded_, and streamChangeMutex_.
void stor::DiskWriterResources::setBusy | ( | bool | isBusyFlag | ) |
Sets the DiskWriter "busy" status to the specified state.
Definition at line 101 of file DiskWriterResources.cc.
References diskWriterIsBusy_.
void stor::DiskWriterResources::streamChangeDone | ( | ) |
Indicates that the stream configuration change is done.
Definition at line 91 of file DiskWriterResources.cc.
References streamChangeCondition_, streamChangeInProgress_, and streamChangeMutex_.
|
virtual |
Returns true when a stream configuration change is requested or in progress.
Definition at line 85 of file DiskWriterResources.cc.
References streamChangeInProgress_, streamChangeIsNeeded_, and streamChangeMutex_.
bool stor::DiskWriterResources::streamChangeRequested | ( | bool & | doConfig, |
EvtStrConfigListPtr & | evtStrConfig, | ||
ErrStrConfigListPtr & | errStrConfig, | ||
DiskWritingParams & | dwParams, | ||
unsigned int & | runNumber, | ||
boost::posix_time::time_duration & | timeoutValue | ||
) |
Checks if a request has been made to change the stream configuration in the DiskWriter streams and clears any pending request. Existing streams are purged. If doConfig is true, the supplied new configurations, new run number, and dequeue timeout value should be used to configure a new set of DiskWriter streams.
Definition at line 45 of file DiskWriterResources.cc.
|
virtual |
Waits until a requested stream configuration change has been completed.
Definition at line 76 of file DiskWriterResources.cc.
References streamChangeCondition_, streamChangeInProgress_, streamChangeIsNeeded_, and streamChangeMutex_.
|
private |
Definition at line 111 of file DiskWriterResources.h.
Referenced by requestStreamDestruction().
|
private |
Definition at line 114 of file DiskWriterResources.h.
|
private |
Definition at line 113 of file DiskWriterResources.h.
|
private |
Definition at line 118 of file DiskWriterResources.h.
|
private |
Definition at line 117 of file DiskWriterResources.h.
|
private |
Definition at line 116 of file DiskWriterResources.h.
|
private |
Definition at line 119 of file DiskWriterResources.h.
|
private |
Definition at line 120 of file DiskWriterResources.h.
|
private |
Definition at line 123 of file DiskWriterResources.h.
Referenced by streamChangeDone(), and waitForStreamChange().
|
private |
Definition at line 122 of file DiskWriterResources.h.
Referenced by streamChangeDone(), streamChangeOngoing(), and waitForStreamChange().
|
private |
Definition at line 112 of file DiskWriterResources.h.
Referenced by requestStreamDestruction(), streamChangeOngoing(), and waitForStreamChange().
|
mutableprivate |
Definition at line 125 of file DiskWriterResources.h.
Referenced by requestStreamDestruction(), streamChangeDone(), streamChangeOngoing(), and waitForStreamChange().