Classes | |
struct | ptrComp |
Typedefs | |
typedef boost::posix_time::time_duration | Duration_t |
typedef boost::posix_time::ptime | TimePoint_t |
Functions | |
std::string | asctimeUTC (TimePoint_t) |
void | checkDirectory (const std::string &) |
std::string | dateStamp (TimePoint_t) |
double | durationToSeconds (Duration_t const &) |
TimePoint_t | getCurrentTime () |
std::string | getIdentifier (xdaq::ApplicationDescriptor *) |
void | getStdVector (xdata::Vector< xdata::String > &, std::vector< std::string > &) |
void | getXdataVector (const std::vector< std::string > &, xdata::Vector< xdata::String > &) |
long | secondsSinceEpoch (TimePoint_t const &) |
Duration_t | secondsToDuration (double const &seconds) |
void | sleep (Duration_t) |
void | sleepUntil (TimePoint_t) |
std::string | timeStamp (TimePoint_t) |
std::string | timeStampUTC (TimePoint_t) |
typedef boost::posix_time::time_duration stor::utils::Duration_t |
typedef boost::posix_time::ptime stor::utils::TimePoint_t |
std::string stor::utils::asctimeUTC | ( | TimePoint_t | theTime | ) |
Converts a TimePoint_t into a string containing the time in UTC formatted as "Www Mmm dd hh:mm:ss yyyy"
Definition at line 49 of file Utils.cc.
References plotBeamSpotDB::ptm.
void stor::utils::checkDirectory | ( | const std::string & | path | ) |
Throws a stor::exception::NoSuchDirectory when the directory does not exist
Definition at line 80 of file Utils.cc.
References lumiQueryAPI::msg, and python.entryComment::results.
Referenced by stor::FileHandler::checkDirectories(), and stor::DbFileHandler::openFile().
std::string stor::utils::dateStamp | ( | TimePoint_t | theTime | ) |
Converts a TimePoint_t into a string containing only the date. Note: the string formatting is used for file db log file name
Definition at line 60 of file Utils.cc.
References plotBeamSpotDB::ptm.
Referenced by stor::DbFileHandler::openFile().
|
inline |
Convert a boost::posix_time::time_duration into fractional seconds with a resolution of milliseconds.
Definition at line 147 of file Utils.h.
Referenced by stor::ThroughputMonitorCollection::addDiskWriterIdleSample(), stor::ThroughputMonitorCollection::addDQMEventProcessorIdleSample(), stor::ThroughputMonitorCollection::addFragmentProcessorIdleSample(), smproxy::SMPSWebPageHelper::addRowForEventServer(), stor::ThroughputMonitorCollection::calcBusyPercentage(), stor::MonitoredQuantity::calculateStatistics(), stor::ThroughputMonitorCollection::do_updateInfoSpaceItems(), stor::RegistrationInfoBase::getPSet(), stor::ThroughputMonitorCollection::getRateAndBandwidth(), stor::RegistrationInfoBase::lastContactSecondsAgo(), stor::Configuration::setupDiskWritingInfoSpaceParams(), smproxy::Configuration::setupQueueConfigurationInfoSpaceParams(), stor::Configuration::setupWorkerThreadInfoSpaceParams(), and stor::ThroughputMonitorCollection::smoothIdleTimesHelper().
|
inline |
Returns the current point in time.
Definition at line 158 of file Utils.h.
Referenced by stor::DQMTopLevelFolder::addDQMEvent(), stor::QueueCollection< T >::addEvent(), stor::detail::ChainData::addFirstFragment(), stor::MonitoredQuantity::addSample(), stor::detail::ChainData::addToChain(), smproxy::StatisticsReporter::calculateStatistics(), stor::StatisticsReporter::calculateStatistics(), stor::DiskWriter::checkForFileTimeOuts(), smproxy::DataManager::checkForStaleConsumers(), stor::EventDistributor::checkForStaleConsumers(), stor::RegistrationInfoBase::consumerContact(), stor::ExpirableQueue< T, Policy >::deqNowait(), stor::FragmentStore::getStaleEvent(), smproxy::StatisticsReporter::monitorAction(), stor::StatisticsReporter::monitorAction(), stor::DQMEventProcessor::processNextDQMEvent(), stor::FragmentProcessor::processOneFragment(), stor::FragmentProcessor::processOneFragmentIfPossible(), smproxy::StatisticsReporter::reset(), stor::StatisticsReporter::reset(), stor::detail::ChainData::resetStaleWindowStartTime(), smproxy::StatisticsReporter::startWorkLoop(), stor::StatisticsReporter::startWorkLoop(), stor::EventDistributor::tagCompleteEventForQueues(), stor::DbFileHandler::write(), stor::FileHandler::writeEvent(), stor::EventFileHandler::writeHeader(), and stor::DiskWriter::writeNextEvent().
std::string stor::utils::getIdentifier | ( | xdaq::ApplicationDescriptor * | appDesc | ) |
Returns an identifier string composed of class name and instance
Definition at line 72 of file Utils.cc.
Referenced by stor::DQMEventProcessor::startWorkLoop(), stor::FragmentProcessor::startWorkLoop(), stor::DiskWriter::startWorkLoop(), smproxy::StatisticsReporter::startWorkLoop(), and stor::StatisticsReporter::startWorkLoop().
void stor::utils::getStdVector | ( | xdata::Vector< xdata::String > & | x, |
std::vector< std::string > & | s | ||
) |
Conversions between std::vector<std::string> and xdata::Vector<xdata::String>
Definition at line 105 of file Utils.cc.
Referenced by smproxy::Configuration::updateLocalDataRetrieverData(), and stor::Configuration::updateLocalDiskWritingData().
void stor::utils::getXdataVector | ( | const std::vector< std::string > & | v, |
xdata::Vector< xdata::String > & | x | ||
) |
Definition at line 119 of file Utils.cc.
Referenced by smproxy::Configuration::setupDataRetrieverInfoSpaceParams(), and stor::Configuration::setupDiskWritingInfoSpaceParams().
|
inline |
Return the number of seconds since the unix epoch 1-1-1970
Definition at line 152 of file Utils.h.
Referenced by stor::DbFileHandler::addReportHeader(), stor::FileHandler::insertFileInDatabase(), and stor::FileHandler::updateDatabase().
|
inline |
Convert a fractional second count into a boost::posix_time::time_duration type with a resolution of milliseconds.
Definition at line 140 of file Utils.h.
References seconds().
Referenced by stor::RegistrationInfoBase::RegistrationInfoBase(), stor::ThroughputMonitorCollection::smoothIdleTimesHelper(), stor::Configuration::updateLocalDiskWritingData(), smproxy::Configuration::updateLocalQueueConfigurationData(), and stor::Configuration::updateLocalWorkerThreadData().
|
inline |
Sleep for at least the given duration. Note that the underlying system will round the interval up to an integer multiple of the system's sleep resolution.
Definition at line 163 of file Utils.h.
Referenced by evf::ExceptionGenerator::analyze(), EcalBarrelMonitorDbModule::analyze(), EcalEndcapMonitorDbModule::analyze(), HLXMonitor::analyze(), HLXMonitor::beginJob(), smproxy::DataManager::checkForStaleConsumers(), RFIOFile::close(), evf::FUResourceQueue::discard(), evf::FUResourceQueue::discardWhileHalting(), evf::rb_statemachine::Halting::do_stateAction(), evf::FUEventProcessor::doEndRunInEDM(), smproxy::DQMArchiver::doIt(), stor::ResourceMonitorCollection::doStatFs(), evf::rb_statemachine::Stopping::emergencyStop(), evf::FUEventProcessor::enableClassic(), evf::FUEventProcessor::enableCommon(), evf::FUEventProcessor::enableMPEPSlave(), evf::FUEventProcessor::enabling(), cond::ExportIOVUtilities::execute(), cond::AlignSplitIOV::execute(), evf::iDie::fsmCallback(), pos::PixelConfigFile::getConfig(), stor::EventServerProxy< RegInfo >::getInitMsgFromEventServer(), WatcherStreamFileReader::getInputFile(), evf::RawCache::getMsgToWrite(), evf::FUEventProcessor::handleSignalSlave(), HcalSimHitStudy::HcalSimHitStudy(), evf::rb_statemachine::CommandQueue::lock(), dqm_interfaces.DQMcommunicator::ls_url(), evf::BU::monitoring(), evf::FWEPWrapper::monitoring(), evf::rb_statemachine::SharedResources::monitoring(), LmfSource::openFile(), RFIOFile::prefetch(), stor::FragmentProcessor::processOneFragmentIfPossible(), evf::Vulture::prowling(), evf::FUShmClient::readNext(), evf::FUEventProcessor::receivingAndMonitor(), evf::FUShmBuffer::releaseSharedMemory(), RFIOFile::reopen(), RFIOFile::retryRead(), evf::FUResourceQueue::sendData(), evf::FUResourceQueue::sendDataWhileHalting(), evf::FUResourceQueue::sendDqm(), evf::FUResourceQueue::sendDqmWhileHalting(), SimHitsValidationHcal::SimHitsValidationHcal(), sleepUntil(), evf::BU::stopping(), evf::FUEventProcessor::subWeb(), evf::FUEventProcessor::summarize(), evf::FUEventProcessor::supervisor(), ora::OraDatabaseSchema::testDropPermission(), evf::rb_statemachine::SharedResources::watching(), and ZdcSimHitStudy::ZdcSimHitStudy().
|
inline |
Sleep until at least the given TimePoint_t.
Definition at line 168 of file Utils.h.
References sleep().
Referenced by smproxy::StatisticsReporter::monitorAction(), and stor::StatisticsReporter::monitorAction().
std::string stor::utils::timeStamp | ( | TimePoint_t | theTime | ) |
Converts a TimePoint_t into a string. Note: the string formatting is used by the file summary catalog and may or may not depend on the actual formatting
Definition at line 23 of file Utils.cc.
References plotBeamSpotDB::ptm.
Referenced by MatacqTBDataFormatter::printData(), MatacqDataFormatter::printData(), evf::FUShmBuffer::setEvtTimeStamp(), MatacqRawEvent::setRawData(), and SiPixelPerformanceSummary::setTimeStamp().
std::string stor::utils::timeStampUTC | ( | TimePoint_t | theTime | ) |
Converts a TimePoint_t into a string containg only the time in UTC.
Definition at line 38 of file Utils.cc.
References plotBeamSpotDB::ptm.
Referenced by stor::SMWebPageHelper::addRowForThroughputStatistics().