#include <ToDqm.h>
Public Member Functions | |
void | digest (const std::string &flashListName, const std::string &originator, const std::string &tag, xdata::Table *table) throw (xmas2dqm::wse::exception::Exception ) |
void | free_memory () |
Static Public Member Functions | |
static ToDqm * | instance () |
Public Attributes | |
toolbox::BSem | BSem_ |
xdata::Bag < xmas2dqm::wse::FlashlistElements > | flashlistMonitor_ |
pthread_mutex_t | LASmutex_ |
pthread_cond_t | less_ |
std::queue< xdata::Table * > | MemoryTable_ |
pthread_cond_t | more_ |
std::queue < xdata::Table::Reference > | QTable_ |
xdata::String | runNumber_ |
Private Member Functions | |
ToDqm () | |
~ToDqm () | |
Private Attributes | |
int | messageCount_ |
Static Private Attributes | |
static ToDqm * | instance_ = 0 |
xmas2dqm::wse::ToDqm::ToDqm | ( | ) | [private] |
xmas2dqm::wse::ToDqm::~ToDqm | ( | ) | [private] |
Definition at line 21 of file ToDqm.cc.
{ //The implementation has detected an attempt to destroy the object referenced by mutex while //it is locked or referenced (for example, while being used in a pthread_cond_timedwait() or pthread_cond_wait()) by another thread. //pthread_mutex_unlock(&mymutex_); //pthread_mutex_destroy(&mymutex_); }
void xmas2dqm::wse::ToDqm::digest | ( | const std::string & | flashListName, |
const std::string & | originator, | ||
const std::string & | tag, | ||
xdata::Table * | table | ||
) | throw (xmas2dqm::wse::exception::Exception ) |
Definition at line 33 of file ToDqm.cc.
References gather_cfg::cout, and i.
{ std::cout << "inside digest...." << std::endl; std::map<std::string, std::string, std::less<std::string> >::iterator i; //std::cout<< "ToDQM->digest : before BSem_.take();" << std::endl; //BSem_.take(); //acquire the mutex - protect access to the queue //pthread_mutex_lock(&mymutex_); //check if the queue is full and wait (a signal that informs that an element has been poped) // until there is 'space' in the queue //while (QTable_.size() >= Qsize_max) //{ //pthread_cond_wait(&less_, &mymutex_); //} //push new element to the queue of LAS data //QTable_.push(table); MemoryTable_.push(table); //MemoryTable_.push(mtable); //std::cout << "ToDQM->digest : Queue size = " << QTable_.size() << std::endl; //std::cout<< "ToDQM->digest : before BSem_.give();" << std::endl; //signal that a new element has been inserted //pthread_cond_signal(&more_); //allow access to the queue //pthread_mutex_unlock(&mymutex_); //BSem_.give(); messageCount_++; }
void xmas2dqm::wse::ToDqm::free_memory | ( | ) |
Definition at line 80 of file ToDqm.cc.
References gather_cfg::cout, and groupFilesInBlocks::temp.
{ std::cout << "free_memory: before MemoryTable.front()" << std::endl; xdata::Table * temp = MemoryTable_.front(); delete temp; //MemoryTable_.front()->xdata::Table::~Table() ; //MemoryTable_.front()->clear(); std::cout << "free_memory: before MemoryTable.pop()" << std::endl; MemoryTable_.pop(); std::cout << "free_memory: returning...." << std::endl; }
xmas2dqm::wse::ToDqm * xmas2dqm::wse::ToDqm::instance | ( | ) | [static] |
Definition at line 6 of file ToDqm.cc.
References instance_, and ToDqm().
Referenced by xmas2dqm::wse::XmasToDQM::actionPerformed(), XmasToDQMSource::analyze(), xmas2dqm::wse::XmasToDQM::getEXDR_LAS(), xmas2dqm::wse::XmasToDQM::LASReadoutWorkLoop(), and xmas2dqm::wse::XmasToDQM::XmasToDQM().
{ if(instance_ == 0) instance_ = new xmas2dqm::wse::ToDqm(); return instance_; }
toolbox::BSem xmas2dqm::wse::ToDqm::BSem_ |
xmas2dqm::wse::ToDqm * xmas2dqm::wse::ToDqm::instance_ = 0 [static, private] |
Definition at line 87 of file ToDqm.h.
Referenced by instance().
pthread_mutex_t xmas2dqm::wse::ToDqm::LASmutex_ |
pthread_cond_t xmas2dqm::wse::ToDqm::less_ |
std::queue<xdata::Table *> xmas2dqm::wse::ToDqm::MemoryTable_ |
int xmas2dqm::wse::ToDqm::messageCount_ [private] |
pthread_cond_t xmas2dqm::wse::ToDqm::more_ |
std::queue<xdata::Table::Reference> xmas2dqm::wse::ToDqm::QTable_ |
xdata::String xmas2dqm::wse::ToDqm::runNumber_ |