#include <EvFDaqDirector.h>
Public Member Functions | |
std::string & | baseDir () |
std::string & | buBaseDir () |
std::string & | buBaseOpenDir () |
EvFDaqDirector (const edm::ParameterSet &pset, edm::ActivityRegistry ®) | |
std::string | findCurrentRunDir () |
unsigned int | findHighestRun () |
std::string | findHighestRunDir () |
std::string | findHighestRunDirStem () |
std::string & | fuBaseDir () |
std::string | getEoLSFilePathOnBU (const unsigned int ls) const |
std::string | getEoLSFilePathOnFU (const unsigned int ls) const |
std::string | getEoRFilePath () const |
std::string | getInitFilePath (std::string const &stream) const |
std::string | getJumpFilePath () const |
unsigned int | getJumpIndex () const |
unsigned int | getJumpLS () const |
std::string | getMergedDatFilePath (const unsigned int ls, std::string const &stream) const |
std::string | getOpenDatFilePath (const unsigned int ls, std::string const &stream) const |
std::string | getOpenRawFilePath (const unsigned int ls, const unsigned int index) const |
std::string | getOutputJsonFilePath (const unsigned int ls, std::string const &stream) const |
std::string | getPathForFU () const |
std::string | getRawFilePath (const unsigned int ls, const unsigned int index) const |
unsigned int | getRunNumber () const |
bool | getTestModeNoBuilderUnit () |
FILE * | maybeCreateAndLockFileHeadForStream (unsigned int ls, std::string &stream) |
std::string & | monitorBaseDir () |
void | postEndRun (edm::Run const &run, edm::EventSetup const &es) |
void | preBeginRun (edm::RunID const &id, edm::Timestamp const &ts) |
int | readBuLock () |
void | removeFile (unsigned int ls, unsigned int index) |
void | removeFile (std::string) |
std::string & | smBaseDir () |
void | tryInitializeFuLockFile () |
void | unlockAndCloseMergeStream () |
void | updateBuLock (unsigned int ls) |
bool | updateFuLock (unsigned int &ls, std::string &nextFile, bool &eorSeen) |
void | writeDiskAndThrottleStat (double, int, int) |
void | writeLsStatisticsBU (unsigned int, unsigned int, unsigned long long, long long) |
void | writeLsStatisticsFU (unsigned int ls, unsigned int events, timeval completion_time) |
~EvFDaqDirector () | |
Private Member Functions | |
bool | bulock () |
bool | bumpFile (unsigned int &ls, unsigned int &index, std::string &nextFile) |
bool | createOutputDirectory () |
std::string | eolsFileName (const unsigned int ls) const |
std::string | eorFileName () const |
bool | findHighestActiveLS (unsigned int &startingLS) const |
bool | fulock () |
std::string | initFileName (std::string const &stream) const |
std::string | inputFileNameStem (const unsigned int ls, const unsigned int index) const |
std::string | mergedFileNameStem (const unsigned int ls, std::string const &stream) const |
bool | mkFuRunDir () |
void | openFULockfileStream (std::string &fuLockFilePath, bool create) |
std::string | outputFileNameStem (const unsigned int ls, std::string const &stream) const |
Private Attributes | |
std::string | base_dir_ |
std::string | bu_base_dir_ |
struct flock | bu_r_flk |
struct flock | bu_r_fulk |
FILE * | bu_r_lock_stream |
int | bu_readlock_fd_ |
std::string | bu_run_dir_ |
std::string | bu_run_open_dir_ |
FILE * | bu_t_monitor_stream |
struct flock | bu_w_flk |
struct flock | bu_w_fulk |
FILE * | bu_w_lock_stream |
FILE * | bu_w_monitor_stream |
int | bu_writelock_fd_ |
int | data_readwrite_fd_ |
struct flock | data_rw_flk |
struct flock | data_rw_fulk |
FILE * | data_rw_stream |
bool | directorBu_ |
DirManager | dirManager_ |
int | fu_readwritelock_fd_ |
struct flock | fu_rw_flk |
struct flock | fu_rw_fulk |
FILE * | fu_rw_lock_stream |
std::string | hostname_ |
unsigned int | jumpIndex_ |
unsigned int | jumpLS_ |
std::string | monitor_base_dir_ |
unsigned long | previousFileSize_ |
unsigned int | run_ |
std::string | run_dir_ |
std::string | run_string_ |
std::string | sm_base_dir_ |
bool | testModeNoBuilderUnit_ |
Definition at line 25 of file EvFDaqDirector.h.
|
explicit |
Definition at line 27 of file EvFDaqDirector.cc.
References base_dir_, bu_base_dir_, bu_run_dir_, bu_run_open_dir_, bu_t_monitor_stream, bu_w_lock_stream, bu_w_monitor_stream, bu_writelock_fd_, createOutputDirectory(), directorBu_, edm::hlt::Exception, lut2db_cfg::filename, fu_readwritelock_fd_, fu_rw_lock_stream, hostname_, monitor_base_dir_, openFULockfileStream(), postEndRun(), preBeginRun(), run_, run_dir_, run_string_, AlCaHLTBitMon_QueryRunRegistry::string, tryInitializeFuLockFile(), edm::ActivityRegistry::watchPostEndRun(), and edm::ActivityRegistry::watchPreBeginRun().
|
inline |
Definition at line 30 of file EvFDaqDirector.h.
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 443 of file EvFDaqDirector.cc.
References bu_base_dir_, bu_readlock_fd_, bu_writelock_fd_, gather_cfg::cout, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by readBuLock().
|
private |
Definition at line 505 of file EvFDaqDirector.cc.
References evf::FastMonitoringService::accummulateFileSize(), newFWLiteAna::found, getEoLSFilePathOnBU(), getRawFilePath(), getHLTprescales::index, python.rootplot.utilities::ls(), previousFileSize_, and testModeNoBuilderUnit_.
Referenced by updateFuLock().
|
private |
Definition at line 216 of file EvFDaqDirector.cc.
References edm::hlt::Exception, run_string_, sm_base_dir_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by EvFDaqDirector().
|
private |
Definition at line 661 of file EvFDaqDirector.cc.
Referenced by getEoLSFilePathOnBU(), and getEoLSFilePathOnFU().
|
private |
|
inline |
Definition at line 41 of file EvFDaqDirector.h.
References dirManager_, evf::DirManager::findRunDir(), and run_.
|
private |
|
inline |
Definition at line 43 of file EvFDaqDirector.h.
References dirManager_, and evf::DirManager::findHighestRun().
|
inline |
Definition at line 40 of file EvFDaqDirector.h.
References dirManager_, and evf::DirManager::findHighestRunDir().
Referenced by findHighestRunDirStem().
std::string evf::EvFDaqDirector::findHighestRunDirStem | ( | ) |
Definition at line 568 of file EvFDaqDirector.cc.
References findHighestRunDir(), and getHLTPrescaleColumns::path.
|
inline |
|
private |
Definition at line 456 of file EvFDaqDirector.cc.
References bu_base_dir_, gather_cfg::cout, fu_readwritelock_fd_, and AlCaHLTBitMon_QueryRunRegistry::string.
std::string evf::EvFDaqDirector::getEoLSFilePathOnBU | ( | const unsigned int | ls | ) | const |
Definition at line 277 of file EvFDaqDirector.cc.
References bu_run_dir_, and eolsFileName().
Referenced by bumpFile().
std::string evf::EvFDaqDirector::getEoLSFilePathOnFU | ( | const unsigned int | ls | ) | const |
Definition at line 281 of file EvFDaqDirector.cc.
References eolsFileName(), and run_dir_.
std::string evf::EvFDaqDirector::getEoRFilePath | ( | ) | const |
Definition at line 285 of file EvFDaqDirector.cc.
References bu_run_dir_, and eorFileName().
Referenced by updateFuLock().
std::string evf::EvFDaqDirector::getInitFilePath | ( | std::string const & | stream | ) | const |
Definition at line 273 of file EvFDaqDirector.cc.
References initFileName(), and run_dir_.
|
inline |
Definition at line 68 of file EvFDaqDirector.h.
References bu_run_dir_, inputFileNameStem(), jumpIndex_, and jumpLS_.
|
inline |
|
inline |
std::string evf::EvFDaqDirector::getMergedDatFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 269 of file EvFDaqDirector.cc.
References mergedFileNameStem(), and run_dir_.
Referenced by maybeCreateAndLockFileHeadForStream().
std::string evf::EvFDaqDirector::getOpenDatFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 261 of file EvFDaqDirector.cc.
References outputFileNameStem(), and run_dir_.
std::string evf::EvFDaqDirector::getOpenRawFilePath | ( | const unsigned int | ls, |
const unsigned int | index | ||
) | const |
Definition at line 257 of file EvFDaqDirector.cc.
References bu_run_dir_, and inputFileNameStem().
std::string evf::EvFDaqDirector::getOutputJsonFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 265 of file EvFDaqDirector.cc.
References outputFileNameStem(), and run_dir_.
std::string evf::EvFDaqDirector::getPathForFU | ( | ) | const |
std::string evf::EvFDaqDirector::getRawFilePath | ( | const unsigned int | ls, |
const unsigned int | index | ||
) | const |
Definition at line 253 of file EvFDaqDirector.cc.
References bu_run_dir_, and inputFileNameStem().
Referenced by bumpFile(), and removeFile().
|
inline |
|
inline |
Definition at line 69 of file EvFDaqDirector.h.
References testModeNoBuilderUnit_.
|
private |
Definition at line 652 of file EvFDaqDirector.cc.
References run_string_.
Referenced by getInitFilePath().
|
private |
Definition at line 626 of file EvFDaqDirector.cc.
References getHLTprescales::index, and run_string_.
Referenced by getJumpFilePath(), getOpenRawFilePath(), and getRawFilePath().
FILE * evf::EvFDaqDirector::maybeCreateAndLockFileHeadForStream | ( | unsigned int | ls, |
std::string & | stream | ||
) |
Definition at line 606 of file EvFDaqDirector.cc.
References data_readwrite_fd_, data_rw_flk, data_rw_stream, and getMergedDatFilePath().
|
private |
Definition at line 643 of file EvFDaqDirector.cc.
References hostname_, and run_string_.
Referenced by getMergedDatFilePath().
|
private |
|
inline |
|
private |
Definition at line 588 of file EvFDaqDirector.cc.
References fu_readwritelock_fd_, and fu_rw_lock_stream.
Referenced by EvFDaqDirector().
|
private |
Definition at line 634 of file EvFDaqDirector.cc.
References run_string_.
Referenced by getOpenDatFilePath(), and getOutputJsonFilePath().
void evf::EvFDaqDirector::postEndRun | ( | edm::Run const & | run, |
edm::EventSetup const & | es | ||
) |
Definition at line 183 of file EvFDaqDirector.cc.
References bu_base_dir_, bu_readlock_fd_, bu_writelock_fd_, directorBu_, lut2db_cfg::filename, removeFile(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by EvFDaqDirector().
void evf::EvFDaqDirector::preBeginRun | ( | edm::RunID const & | id, |
edm::Timestamp const & | ts | ||
) |
Definition at line 192 of file EvFDaqDirector.cc.
References dirManager_, edm::hlt::Exception, evf::DirManager::findHighestRunDir(), DTTTrigCorrFirst::run, run_, and run_dir_.
Referenced by EvFDaqDirector().
int evf::EvFDaqDirector::readBuLock | ( | ) |
Definition at line 416 of file EvFDaqDirector.cc.
References bu_base_dir_, bu_r_flk, bu_r_fulk, bu_r_lock_stream, bu_readlock_fd_, bulock(), CastorDataFrameFilter_impl::check(), evf::DirManager::checkDirEmpty(), gather_cfg::cout, dirManager_, and AlCaHLTBitMon_ParallelJobs::p.
void evf::EvFDaqDirector::removeFile | ( | unsigned int | ls, |
unsigned int | index | ||
) |
Definition at line 300 of file EvFDaqDirector.cc.
References getRawFilePath().
Referenced by postEndRun().
void evf::EvFDaqDirector::removeFile | ( | std::string | filename | ) |
|
inline |
void evf::EvFDaqDirector::tryInitializeFuLockFile | ( | ) |
Definition at line 573 of file EvFDaqDirector.cc.
References fu_rw_lock_stream, getHLTprescales::readIndex(), and testModeNoBuilderUnit_.
Referenced by EvFDaqDirector().
void evf::EvFDaqDirector::unlockAndCloseMergeStream | ( | ) |
Definition at line 620 of file EvFDaqDirector.cc.
References data_readwrite_fd_, data_rw_fulk, and data_rw_stream.
void evf::EvFDaqDirector::updateBuLock | ( | unsigned int | ls | ) |
Definition at line 304 of file EvFDaqDirector.cc.
References bu_w_flk, bu_w_fulk, bu_w_lock_stream, bu_writelock_fd_, and CastorDataFrameFilter_impl::check().
bool evf::EvFDaqDirector::updateFuLock | ( | unsigned int & | ls, |
std::string & | nextFile, | ||
bool & | eorSeen | ||
) |
Definition at line 321 of file EvFDaqDirector.cc.
References bu_run_dir_, bumpFile(), CastorDataFrameFilter_impl::check(), fu_readwritelock_fd_, fu_rw_flk, fu_rw_fulk, fu_rw_lock_stream, getEoRFilePath(), jumpIndex_, jumpLS_, O_NONBLOCK, getHLTprescales::readIndex(), AlCaHLTBitMon_QueryRunRegistry::string, testModeNoBuilderUnit_, and TrackValidation_HighPurity_cff::valid.
void evf::EvFDaqDirector::writeDiskAndThrottleStat | ( | double | fraction, |
int | highWater, | ||
int | lowWater | ||
) |
Definition at line 488 of file EvFDaqDirector.cc.
References bu_t_monitor_stream, CastorDataFrameFilter_impl::check(), and gather_cfg::cout.
void evf::EvFDaqDirector::writeLsStatisticsBU | ( | unsigned int | ls, |
unsigned int | events, | ||
unsigned long long | totsize, | ||
long long | lsusec | ||
) |
Definition at line 469 of file EvFDaqDirector.cc.
References bu_w_monitor_stream, CastorDataFrameFilter_impl::check(), and gather_cfg::cout.
|
inline |
Definition at line 62 of file EvFDaqDirector.h.
|
private |
Definition at line 93 of file EvFDaqDirector.h.
Referenced by baseDir(), and EvFDaqDirector().
|
private |
Definition at line 94 of file EvFDaqDirector.h.
Referenced by bulock(), EvFDaqDirector(), fulock(), postEndRun(), and readBuLock().
|
private |
Definition at line 124 of file EvFDaqDirector.h.
Referenced by readBuLock().
|
private |
Definition at line 126 of file EvFDaqDirector.h.
Referenced by readBuLock().
|
private |
Definition at line 112 of file EvFDaqDirector.h.
Referenced by readBuLock().
|
private |
Definition at line 106 of file EvFDaqDirector.h.
Referenced by bulock(), postEndRun(), and readBuLock().
|
private |
Definition at line 103 of file EvFDaqDirector.h.
Referenced by buBaseDir(), EvFDaqDirector(), getEoLSFilePathOnBU(), getEoRFilePath(), getJumpFilePath(), getOpenRawFilePath(), getRawFilePath(), and updateFuLock().
|
private |
Definition at line 104 of file EvFDaqDirector.h.
Referenced by buBaseOpenDir(), and EvFDaqDirector().
|
private |
Definition at line 115 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and writeDiskAndThrottleStat().
|
private |
Definition at line 123 of file EvFDaqDirector.h.
Referenced by updateBuLock().
|
private |
Definition at line 125 of file EvFDaqDirector.h.
Referenced by updateBuLock().
|
private |
Definition at line 111 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and updateBuLock().
|
private |
Definition at line 114 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and writeLsStatisticsBU().
|
private |
Definition at line 107 of file EvFDaqDirector.h.
Referenced by bulock(), EvFDaqDirector(), postEndRun(), and updateBuLock().
|
private |
Definition at line 109 of file EvFDaqDirector.h.
Referenced by maybeCreateAndLockFileHeadForStream(), and unlockAndCloseMergeStream().
|
private |
Definition at line 129 of file EvFDaqDirector.h.
Referenced by maybeCreateAndLockFileHeadForStream().
|
private |
Definition at line 130 of file EvFDaqDirector.h.
Referenced by unlockAndCloseMergeStream().
|
private |
Definition at line 116 of file EvFDaqDirector.h.
Referenced by maybeCreateAndLockFileHeadForStream(), and unlockAndCloseMergeStream().
|
private |
Definition at line 97 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and postEndRun().
|
private |
Definition at line 118 of file EvFDaqDirector.h.
Referenced by findCurrentRunDir(), findHighestRun(), findHighestRunDir(), preBeginRun(), and readBuLock().
|
private |
Definition at line 108 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), fulock(), openFULockfileStream(), and updateFuLock().
|
private |
Definition at line 127 of file EvFDaqDirector.h.
Referenced by updateFuLock().
|
private |
Definition at line 128 of file EvFDaqDirector.h.
Referenced by updateFuLock().
|
private |
Definition at line 113 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), openFULockfileStream(), tryInitializeFuLockFile(), and updateFuLock().
|
private |
Definition at line 100 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and mergedFileNameStem().
|
private |
Definition at line 121 of file EvFDaqDirector.h.
Referenced by getJumpFilePath(), getJumpIndex(), and updateFuLock().
|
private |
Definition at line 121 of file EvFDaqDirector.h.
Referenced by getJumpFilePath(), getJumpLS(), and updateFuLock().
|
private |
Definition at line 96 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and monitorBaseDir().
|
private |
Definition at line 120 of file EvFDaqDirector.h.
Referenced by bumpFile().
|
private |
Definition at line 98 of file EvFDaqDirector.h.
Referenced by eorFileName(), EvFDaqDirector(), findCurrentRunDir(), getRunNumber(), and preBeginRun().
|
private |
Definition at line 102 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), fuBaseDir(), getEoLSFilePathOnFU(), getInitFilePath(), getMergedDatFilePath(), getOpenDatFilePath(), getOutputJsonFilePath(), and preBeginRun().
|
private |
Definition at line 101 of file EvFDaqDirector.h.
Referenced by createOutputDirectory(), EvFDaqDirector(), initFileName(), inputFileNameStem(), mergedFileNameStem(), and outputFileNameStem().
|
private |
Definition at line 95 of file EvFDaqDirector.h.
Referenced by createOutputDirectory(), getPathForFU(), and smBaseDir().
|
private |
Definition at line 92 of file EvFDaqDirector.h.
Referenced by bumpFile(), getTestModeNoBuilderUnit(), tryInitializeFuLockFile(), and updateFuLock().