#include <EvFDaqDirector.h>
Public Types | |
enum | FileStatus { noFile, sameFile, newFile, newLumi, runEnded, runAbort } |
Public Member Functions | |
std::string & | baseRunDir () |
std::string & | buBaseRunDir () |
std::string & | buBaseRunOpenDir () |
EvFDaqDirector::FileStatus | contactFileBroker (unsigned int &serverHttpStatus, bool &serverState, uint32_t &serverLS, uint32_t &closedServerLS, std::string &nextFileJson, std::string &nextFileRaw, bool &rawHeader, int maxLS) |
void | createBoLSFile (const uint32_t lumiSection, bool checkIfExists) const |
void | createLumiSectionFiles (const uint32_t lumiSection, const uint32_t currentLumiSection, bool doCreateBoLS, bool doCreateEoLS) |
void | createProcessingNotificationMaybe () const |
void | createRunOpendirMaybe () |
EvFDaqDirector (const edm::ParameterSet &pset, edm::ActivityRegistry ®) | |
std::string | findCurrentRunDir () |
std::string | getBoLSFilePathOnFU (const unsigned int ls) const |
std::vector< std::string > const & | getBUBaseDirs () const |
std::vector< int > const & | getBUBaseDirsNSources () const |
std::string | getDatFilePath (const unsigned int ls, std::string const &stream) const |
std::string | getEoLSFilePathOnBU (const unsigned int ls) const |
std::string | getEoLSFilePathOnFU (const unsigned int ls) const |
std::string | getEoRFileName () const |
std::string | getEoRFilePath () const |
std::string | getEoRFilePathOnFU () const |
std::string | getFFFParamsFilePathOnBU () const |
std::string | getInitFilePath (std::string const &stream) const |
std::string | getInitTempFilePath (std::string const &stream) const |
std::string | getInputJsonFilePath (const unsigned int ls, const unsigned int index) const |
unsigned int | getLumisectionToStart () const |
std::string | getMergedDatChecksumFilePath (const unsigned int ls, std::string const &stream) const |
std::string | getMergedDatFilePath (const unsigned int ls, std::string const &stream) const |
std::string | getMergedProtocolBufferHistogramFilePath (const unsigned int ls, std::string const &stream) const |
std::string | getMergedRootHistogramFilePath (const unsigned int ls, std::string const &stream) const |
FileStatus | getNextFromFileBroker (const unsigned int currentLumiSection, unsigned int &ls, std::string &nextFile, int &rawFd, uint16_t &rawHeaderSize, int32_t &serverEventsInNewFile_, int64_t &fileSize, uint64_t &thisLockWaitTimeUs, bool requireHeader=true) |
std::string | getOpenDatFilePath (const unsigned int ls, std::string const &stream) const |
std::string | getOpenInitFilePath (std::string const &stream) const |
std::string | getOpenInputJsonFilePath (const unsigned int ls, const unsigned int index) const |
std::string | getOpenOutputJsonFilePath (const unsigned int ls, std::string const &stream) const |
std::string | getOpenProtocolBufferHistogramFilePath (const unsigned int ls, std::string const &stream) const |
std::string | getOpenRawFilePath (const unsigned int ls, const unsigned int index) const |
std::string | getOpenRootHistogramFilePath (const unsigned int ls, std::string const &stream) const |
std::string | getOutputJsonFilePath (const unsigned int ls, std::string const &stream) const |
std::string | getProtocolBufferHistogramFilePath (const unsigned int ls, std::string const &stream) const |
std::string | getRawFilePath (const unsigned int ls, const unsigned int index) const |
std::string | getRootHistogramFilePath (const unsigned int ls, std::string const &stream) const |
unsigned int | getRunNumber () const |
std::string | getRunOpenDirPath () const |
unsigned int | getStartLumisectionFromEnv () const |
std::string | getStreamDestinations (std::string const &) const |
std::string | getStreamMergeType (std::string const &, MergeType defaultType) const |
int | grabNextJsonFile (std::string const &jsonSourcePath, std::string const &rawSourcePath, int64_t &fileSizeFromJson, bool &fileFound) |
int | grabNextJsonFileAndUnlock (std::filesystem::path const &jsonSourcePath) |
int | grabNextJsonFromRaw (std::string const &rawSourcePath, int &rawFd, uint16_t &rawHeaderSize, int64_t &fileSizeFromHeader, bool &fileFound, uint32_t serverLS, bool closeFile, bool requireHeader=true) |
void | initRun () |
bool | inputThrottled () |
bool | isSingleStreamThread () |
void | lockFULocal () |
void | lockFULocal2 () |
void | lockInitLock () |
bool | lumisectionDiscarded (unsigned int ls) |
unsigned int | numConcurrentLumis () const |
bool | outputAdler32Recheck () const |
void | overrideRunNumber (unsigned int run) |
void | postEndRun (edm::GlobalContext const &globalContext) |
void | preallocate (edm::service::SystemBounds const &bounds) |
void | preBeginRun (edm::GlobalContext const &globalContext) |
void | preGlobalEndLumi (edm::GlobalContext const &globalContext) |
bool | rawFileHasHeader (std::string const &rawSourcePath, uint16_t &rawHeaderSize) |
int | readLastLSEntry (std::string const &file) |
void | removeFile (std::string) |
std::string const & | runString () const |
void | setDeleteTracking (std::mutex *fileDeleteLock, std::list< std::pair< int, std::unique_ptr< InputFile >>> *filesToDelete) |
void | setFMS (evf::FastMonitoringService *fms) |
void | tryInitializeFuLockFile () |
void | unlockFULocal () |
void | unlockFULocal2 () |
void | unlockInitLock () |
FileStatus | updateFuLock (unsigned int &ls, std::string &nextFile, uint32_t &fsize, uint16_t &rawHeaderSize, uint64_t &lockWaitTime, bool &setExceptionState) |
bool | useFileBroker () const |
~EvFDaqDirector () | |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
static struct flock | make_flock (short type, short whence, off_t start, off_t len, pid_t pid) |
static int | parseFRDFileHeader (std::string const &rawSourcePath, int &rawFd, uint16_t &rawHeaderSize, uint16_t &rawDataType, uint32_t &lsFromHeader, int32_t &eventsFromHeader, int64_t &fileSizeFromHeader, bool requireHeader, bool retry, bool closeFile) |
Private Member Functions | |
bool | bumpFile (unsigned int &ls, unsigned int &index, std::string &nextFile, uint32_t &fsize, uint16_t &rawHeaderSize, int maxLS, bool &setExceptionState) |
std::string | eolsFileName (const unsigned int ls) const |
std::string | eorFileName () const |
int | getNFilesFromEoLS (std::string BUEoLSFile) |
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 |
void | openFULockfileStream (bool create) |
std::string | outputFileNameStem (const unsigned int ls, std::string const &stream) const |
Static Private Member Functions | |
static bool | checkFileRead (char *buf, int infile, std::size_t buf_sz, std::string const &path) |
Private Attributes | |
std::string | base_dir_ |
std::string | bu_base_dir_ |
std::vector< std::string > | bu_base_dirs_all_ |
std::vector< int > | bu_base_dirs_nSources_ |
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_ |
bool | directorBU_ |
DirManager | dirManager_ |
std::string | discard_ls_filestem_ |
jsoncollector::DataPointDefinition * | dpd_ |
std::unique_ptr< boost::asio::ip::tcp::resolver::iterator > | endpoint_iterator_ |
unsigned int | eolsNFilesIndex_ = 1 |
std::string | fileBrokerHost_ |
bool | fileBrokerHostFromCfg_ |
bool | fileBrokerKeepAlive_ |
std::string | fileBrokerPort_ |
bool | fileBrokerUseLocalLock_ |
std::mutex * | fileDeleteLockPtr_ = nullptr |
std::list< std::pair< int, std::unique_ptr< InputFile > > > * | filesToDeletePtr_ = nullptr |
evf::FastMonitoringService * | fms_ = nullptr |
int | fu_readwritelock_fd_ |
struct flock | fu_rw_flk |
struct flock | fu_rw_fulk |
FILE * | fu_rw_lock_stream |
int | fulocal_rwlock_fd2_ |
int | fulocal_rwlock_fd_ |
std::string | fulockfile_ |
unsigned int | fuLockPollInterval_ |
std::string | hltSourceDirectory_ |
std::string | hostname_ |
pthread_mutex_t | init_lock_ = PTHREAD_MUTEX_INITIALIZER |
std::string | input_throttled_file_ |
boost::asio::io_service | io_service_ |
unsigned int | nConcurrentLumis_ = 0 |
unsigned int | nStreams_ = 0 |
unsigned int | nThreads_ = 0 |
bool | outputAdler32Recheck_ |
std::string | pid_ |
unsigned long | previousFileSize_ |
std::unique_ptr< boost::asio::ip::tcp::resolver::query > | query_ |
bool | readEolsDefinition_ = true |
std::unique_ptr< boost::asio::ip::tcp::resolver > | resolver_ |
unsigned int | run_ |
std::string | run_dir_ |
std::string | run_nstring_ |
std::string | run_string_ |
std::unique_ptr< boost::asio::ip::tcp::socket > | socket_ |
unsigned int | startFromLS_ = 1 |
unsigned int | stop_ls_override_ = 0 |
std::string | stopFilePath_ |
std::string | stopFilePathPid_ |
bool | useFileBroker_ |
Static Private Attributes | |
static const std::vector< std::string > | MergeTypeNames_ = {"", "DAT", "PB", "JSNDATA"} |
Definition at line 61 of file EvFDaqDirector.h.
Enumerator | |
---|---|
noFile | |
sameFile | |
newFile | |
newLumi | |
runEnded | |
runAbort |
Definition at line 63 of file EvFDaqDirector.h.
|
explicit |
Definition at line 39 of file EvFDaqDirector.cc.
References base_dir_, bu_base_dirs_all_, bu_base_dirs_nSources_, visDQMUpload::buf, discard_ls_filestem_, endpoint_iterator_, cppFunctionSkipper::exception, Exception, fileBrokerHost_, fileBrokerHostFromCfg_, fileBrokerPort_, fileBrokerUseLocalLock_, fuLockPollInterval_, hostname_, mps_fire::i, recoMuon::in, input_throttled_file_, io_service_, pid_, postEndRun(), preallocate(), preBeginRun(), preGlobalEndLumi(), query_, resolver_, run_, run_dir_, run_nstring_, run_string_, socket_, contentValuesCheck::ss, startFromLS_, edm_modernize_messagelogger::stat, AlCaHLTBitMon_QueryRunRegistry::string, useFileBroker_, edm::ActivityRegistry::watchPostGlobalEndRun(), edm::ActivityRegistry::watchPreallocate(), edm::ActivityRegistry::watchPreGlobalBeginRun(), and edm::ActivityRegistry::watchPreGlobalEndLumi().
evf::EvFDaqDirector::~EvFDaqDirector | ( | ) |
Definition at line 352 of file EvFDaqDirector.cc.
References fulocal_rwlock_fd2_, fulocal_rwlock_fd_, socket_, unlockFULocal(), and unlockFULocal2().
|
inline |
Definition at line 75 of file EvFDaqDirector.h.
References run_dir_.
Referenced by grabNextJsonFile(), grabNextJsonFileAndUnlock(), and grabNextJsonFromRaw().
|
inline |
Definition at line 76 of file EvFDaqDirector.h.
References bu_run_dir_.
Referenced by DAQSource::readSupervisor().
|
inline |
|
private |
Definition at line 830 of file EvFDaqDirector.cc.
References evf::FastMonitoringService::accumulateFileSize(), visDQMUpload::buf, fms_, getEoLSFilePathOnBU(), getInputJsonFilePath(), getNFilesFromEoLS(), getRawFilePath(), eostools::ls(), previousFileSize_, rawFileHasHeader(), contentValuesCheck::ss, edm_modernize_messagelogger::stat, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by updateFuLock().
|
staticprivate |
Definition at line 1122 of file EvFDaqDirector.cc.
References visDQMUpload::buf, timingPdfMaker::infile, castor_dqm_sourceclient_file_cfg::path, and fileinputsource_cfi::read.
Referenced by parseFRDFileHeader(), and rawFileHasHeader().
EvFDaqDirector::FileStatus evf::EvFDaqDirector::contactFileBroker | ( | unsigned int & | serverHttpStatus, |
bool & | serverState, | ||
uint32_t & | serverLS, | ||
uint32_t & | closedServerLS, | ||
std::string & | nextFileJson, | ||
std::string & | nextFileRaw, | ||
bool & | rawHeader, | ||
int | maxLS | ||
) |
Definition at line 1542 of file EvFDaqDirector.cc.
References cms::cuda::assert(), bu_run_dir_, GlobalPosition_Frontier_DevDB_cff::connect, MillePedeFileConverter_cfg::e, endpoint_iterator_, cppFunctionSkipper::exception, fileBrokerHost_, fileBrokerKeepAlive_, RecoTauValidation_cfi::header, SiStripPI::max, newFile, noFile, castor_dqm_sourceclient_file_cfg::path, pid_, fileinputsource_cfi::read, run_nstring_, runEnded, socket_, AlCaHLTBitMon_QueryRunRegistry::string, and writeEcalDQMStatus::write.
Referenced by getNextFromFileBroker().
void evf::EvFDaqDirector::createBoLSFile | ( | const uint32_t | lumiSection, |
bool | checkIfExists | ||
) | const |
Definition at line 982 of file EvFDaqDirector.cc.
References visDQMUpload::buf, getBoLSFilePathOnFU(), edm_modernize_messagelogger::stat, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by createLumiSectionFiles(), and FedRawDataInputSource::maybeOpenNewLumiSection().
void evf::EvFDaqDirector::createLumiSectionFiles | ( | const uint32_t | lumiSection, |
const uint32_t | currentLumiSection, | ||
bool | doCreateBoLS, | ||
bool | doCreateEoLS | ||
) |
Definition at line 992 of file EvFDaqDirector.cc.
References visDQMUpload::buf, createBoLSFile(), newFWLiteAna::found, getEoLSFilePathOnFU(), edm_modernize_messagelogger::stat, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getNextFromFileBroker().
void evf::EvFDaqDirector::createProcessingNotificationMaybe | ( | ) | const |
Definition at line 1997 of file EvFDaqDirector.cc.
References run_dir_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by FedRawDataInputSource::checkNext(), and DAQSource::checkNext().
void evf::EvFDaqDirector::createRunOpendirMaybe | ( | ) |
Definition at line 1958 of file EvFDaqDirector.cc.
References getRunOpenDirPath(), LogDebug, and castor_dqm_sourceclient_file_cfg::path.
Referenced by initRun().
|
private |
|
private |
|
static |
Definition at line 379 of file EvFDaqDirector.cc.
References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.
|
inline |
Definition at line 80 of file EvFDaqDirector.h.
References dirManager_, evf::DirManager::findRunDir(), and run_.
std::string evf::EvFDaqDirector::getBoLSFilePathOnFU | ( | const unsigned int | ls | ) | const |
Definition at line 535 of file EvFDaqDirector.cc.
References fffnaming::bolsFileName(), eostools::ls(), run_, and run_dir_.
Referenced by createBoLSFile().
|
inline |
Definition at line 194 of file EvFDaqDirector.h.
References bu_base_dirs_all_.
Referenced by DAQSource::DAQSource().
|
inline |
Definition at line 195 of file EvFDaqDirector.h.
References bu_base_dirs_nSources_.
Referenced by DAQSource::DAQSource().
std::string evf::EvFDaqDirector::getDatFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 464 of file EvFDaqDirector.cc.
References eostools::ls(), run_, run_dir_, cms::cuda::stream, and fffnaming::streamerDataFileNameWithPid().
std::string evf::EvFDaqDirector::getEoLSFilePathOnBU | ( | const unsigned int | ls | ) | const |
Definition at line 527 of file EvFDaqDirector.cc.
References bu_run_dir_, fffnaming::eolsFileName(), eostools::ls(), and run_.
Referenced by bumpFile(), and FedRawDataInputSource::checkNext().
std::string evf::EvFDaqDirector::getEoLSFilePathOnFU | ( | const unsigned int | ls | ) | const |
Definition at line 531 of file EvFDaqDirector.cc.
References fffnaming::eolsFileName(), eostools::ls(), run_, and run_dir_.
Referenced by FedRawDataInputSource::checkNext(), createLumiSectionFiles(), FedRawDataInputSource::maybeOpenNewLumiSection(), and updateFuLock().
std::string evf::EvFDaqDirector::getEoRFileName | ( | ) | const |
Definition at line 541 of file EvFDaqDirector.cc.
References fffnaming::eorFileName(), and run_.
Referenced by DAQSource::readSupervisor().
std::string evf::EvFDaqDirector::getEoRFilePath | ( | ) | const |
Definition at line 539 of file EvFDaqDirector.cc.
References bu_run_dir_, fffnaming::eorFileName(), and run_.
Referenced by updateFuLock().
std::string evf::EvFDaqDirector::getEoRFilePathOnFU | ( | ) | const |
Definition at line 543 of file EvFDaqDirector.cc.
References fffnaming::eorFileName(), run_, and run_dir_.
Referenced by FedRawDataInputSource::checkNext(), and DAQSource::checkNext().
std::string evf::EvFDaqDirector::getFFFParamsFilePathOnBU | ( | ) | const |
std::string evf::EvFDaqDirector::getInitFilePath | ( | std::string const & | stream | ) | const |
Definition at line 492 of file EvFDaqDirector.cc.
References fffnaming::initFileNameWithPid(), run_, run_dir_, and cms::cuda::stream.
std::string evf::EvFDaqDirector::getInitTempFilePath | ( | std::string const & | stream | ) | const |
Definition at line 496 of file EvFDaqDirector.cc.
References fffnaming::initTempFileNameWithPid(), run_, run_dir_, and cms::cuda::stream.
std::string evf::EvFDaqDirector::getInputJsonFilePath | ( | const unsigned int | ls, |
const unsigned int | index | ||
) | const |
Definition at line 448 of file EvFDaqDirector.cc.
References bu_run_dir_, fffnaming::inputJsonFileName(), eostools::ls(), and run_.
Referenced by bumpFile().
unsigned int evf::EvFDaqDirector::getLumisectionToStart | ( | ) | const |
Definition at line 1982 of file EvFDaqDirector.cc.
References visDQMUpload::buf, reco_skim_cfg_mod::fullpath, run_dir_, run_string_, contentValuesCheck::ss, edm_modernize_messagelogger::stat, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by FedRawDataInputSource::readSupervisor(), and DAQSource::readSupervisor().
std::string evf::EvFDaqDirector::getMergedDatChecksumFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 484 of file EvFDaqDirector.cc.
References hostname_, eostools::ls(), run_, run_dir_, cms::cuda::stream, and fffnaming::streamerDataChecksumFileNameWithInstance().
std::string evf::EvFDaqDirector::getMergedDatFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 480 of file EvFDaqDirector.cc.
References hostname_, eostools::ls(), run_, run_dir_, cms::cuda::stream, and fffnaming::streamerDataFileNameWithInstance().
std::string evf::EvFDaqDirector::getMergedProtocolBufferHistogramFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 510 of file EvFDaqDirector.cc.
References hostname_, eostools::ls(), fffnaming::protocolBufferHistogramFileNameWithInstance(), run_, run_dir_, and cms::cuda::stream.
std::string evf::EvFDaqDirector::getMergedRootHistogramFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 523 of file EvFDaqDirector.cc.
References hostname_, eostools::ls(), fffnaming::rootHistogramFileNameWithInstance(), run_, run_dir_, and cms::cuda::stream.
EvFDaqDirector::FileStatus evf::EvFDaqDirector::getNextFromFileBroker | ( | const unsigned int | currentLumiSection, |
unsigned int & | ls, | ||
std::string & | nextFile, | ||
int & | rawFd, | ||
uint16_t & | rawHeaderSize, | ||
int32_t & | serverEventsInNewFile_, | ||
int64_t & | fileSize, | ||
uint64_t & | thisLockWaitTimeUs, | ||
bool | requireHeader = true |
||
) |
Definition at line 1808 of file EvFDaqDirector.cc.
References cms::cuda::assert(), bu_run_dir_, visDQMUpload::buf, contactFileBroker(), createLumiSectionFiles(), fileBrokerUseLocalLock_, grabNextJsonFile(), grabNextJsonFromRaw(), mps_fire::i, lockFULocal(), lockFULocal2(), eostools::ls(), SiStripPI::max, newFile, noFile, readLastLSEntry(), runEnded, edm_modernize_messagelogger::stat, stop_ls_override_, stopFilePath_, stopFilePathPid_, AlCaHLTBitMon_QueryRunRegistry::string, mitigatedMETSequence_cff::U, unlockFULocal(), and unlockFULocal2().
Referenced by FedRawDataInputSource::readSupervisor(), and DAQSource::readSupervisor().
|
private |
Definition at line 769 of file EvFDaqDirector.cc.
References bu_run_dir_, visDQMUpload::buf, data, spu::def(), Calorimetry_cff::dp, eolsNFilesIndex_, reco_skim_cfg_mod::fullpath, jsoncollector::DataPointDefinition::getNames(), mps_fire::i, readEolsDefinition_, DQM::reader, edm_modernize_messagelogger::stat, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by bumpFile().
std::string evf::EvFDaqDirector::getOpenDatFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 468 of file EvFDaqDirector.cc.
References eostools::ls(), run_, run_dir_, cms::cuda::stream, and fffnaming::streamerDataFileNameWithPid().
std::string evf::EvFDaqDirector::getOpenInitFilePath | ( | std::string const & | stream | ) | const |
Definition at line 488 of file EvFDaqDirector.cc.
References fffnaming::initFileNameWithPid(), run_, run_dir_, and cms::cuda::stream.
std::string evf::EvFDaqDirector::getOpenInputJsonFilePath | ( | const unsigned int | ls, |
const unsigned int | index | ||
) | const |
Definition at line 460 of file EvFDaqDirector.cc.
References bu_run_dir_, fffnaming::inputJsonFileName(), eostools::ls(), and run_.
std::string evf::EvFDaqDirector::getOpenOutputJsonFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 472 of file EvFDaqDirector.cc.
References eostools::ls(), run_, run_dir_, cms::cuda::stream, and fffnaming::streamerJsonFileNameWithPid().
std::string evf::EvFDaqDirector::getOpenProtocolBufferHistogramFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 500 of file EvFDaqDirector.cc.
References eostools::ls(), fffnaming::protocolBufferHistogramFileNameWithPid(), run_, run_dir_, and cms::cuda::stream.
std::string evf::EvFDaqDirector::getOpenRawFilePath | ( | const unsigned int | ls, |
const unsigned int | index | ||
) | const |
Definition at line 456 of file EvFDaqDirector.cc.
References bu_run_dir_, fffnaming::inputRawFileName(), eostools::ls(), and run_.
std::string evf::EvFDaqDirector::getOpenRootHistogramFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 515 of file EvFDaqDirector.cc.
References eostools::ls(), fffnaming::rootHistogramFileNameWithPid(), run_, run_dir_, and cms::cuda::stream.
std::string evf::EvFDaqDirector::getOutputJsonFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 476 of file EvFDaqDirector.cc.
References eostools::ls(), run_, run_dir_, cms::cuda::stream, and fffnaming::streamerJsonFileNameWithPid().
std::string evf::EvFDaqDirector::getProtocolBufferHistogramFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 505 of file EvFDaqDirector.cc.
References eostools::ls(), fffnaming::protocolBufferHistogramFileNameWithPid(), run_, run_dir_, and cms::cuda::stream.
std::string evf::EvFDaqDirector::getRawFilePath | ( | const unsigned int | ls, |
const unsigned int | index | ||
) | const |
Definition at line 452 of file EvFDaqDirector.cc.
References bu_run_dir_, fffnaming::inputRawFileName(), eostools::ls(), and run_.
Referenced by bumpFile().
std::string evf::EvFDaqDirector::getRootHistogramFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 519 of file EvFDaqDirector.cc.
References eostools::ls(), fffnaming::rootHistogramFileNameWithPid(), run_, run_dir_, and cms::cuda::stream.
|
inline |
|
inline |
Definition at line 107 of file EvFDaqDirector.h.
References run_dir_.
Referenced by createRunOpendirMaybe(), and initRun().
|
inline |
Definition at line 180 of file EvFDaqDirector.h.
References startFromLS_.
Referenced by FedRawDataInputSource::readSupervisor(), and DAQSource::readSupervisor().
|
inline |
|
inline |
Definition at line 188 of file EvFDaqDirector.h.
References MergeTypeNames_.
int evf::EvFDaqDirector::grabNextJsonFile | ( | std::string const & | jsonSourcePath, |
std::string const & | rawSourcePath, | ||
int64_t & | fileSizeFromJson, | ||
bool & | fileFound | ||
) |
Definition at line 1267 of file EvFDaqDirector.cc.
References cms::cuda::assert(), baseRunDir(), visDQMUpload::buf, data, Calorimetry_cff::dp, dpd_, MillePedeFileConverter_cfg::e, cppFunctionSkipper::exception, jsoncollector::DataPointDefinition::getNames(), mps_fire::i, timingPdfMaker::infile, LogDebug, timingPdfMaker::outfile, castor_dqm_sourceclient_file_cfg::path, pid_, fileinputsource_cfi::read, DQM::reader, mps_fire::result, contentValuesCheck::ss, edm_modernize_messagelogger::stat, AlCaHLTBitMon_QueryRunRegistry::string, summarizeEdmComparisonLogfiles::success, and writeEcalDQMStatus::write.
Referenced by getNextFromFileBroker().
int evf::EvFDaqDirector::grabNextJsonFileAndUnlock | ( | std::filesystem::path const & | jsonSourcePath | ) |
Definition at line 1450 of file EvFDaqDirector.cc.
References baseRunDir(), filterCSVwithJSON::copy, data, Calorimetry_cff::dp, dpd_, MillePedeFileConverter_cfg::e, cppFunctionSkipper::exception, Exception, jsoncollector::DataPointDefinition::getNames(), mps_fire::i, LogDebug, castor_dqm_sourceclient_file_cfg::path, DQM::reader, MatrixUtil::remove(), contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, summarizeEdmComparisonLogfiles::success, and unlockFULocal().
Referenced by FedRawDataInputSource::readSupervisor().
int evf::EvFDaqDirector::grabNextJsonFromRaw | ( | std::string const & | rawSourcePath, |
int & | rawFd, | ||
uint16_t & | rawHeaderSize, | ||
int64_t & | fileSizeFromHeader, | ||
bool & | fileFound, | ||
uint32_t | serverLS, | ||
bool | closeFile, | ||
bool | requireHeader = true |
||
) |
Definition at line 1175 of file EvFDaqDirector.cc.
References baseRunDir(), LogDebug, timingPdfMaker::outfile, parseFRDFileHeader(), castor_dqm_sourceclient_file_cfg::path, pid_, runTheMatrix::ret, contentValuesCheck::ss, edm_modernize_messagelogger::stat, AlCaHLTBitMon_QueryRunRegistry::string, and writeEcalDQMStatus::write.
Referenced by getNextFromFileBroker(), and FedRawDataInputSource::readSupervisor().
|
private |
void evf::EvFDaqDirector::initRun | ( | ) |
Definition at line 177 of file EvFDaqDirector.cc.
References base_dir_, bu_base_dir_, bu_base_dirs_all_, bu_run_dir_, bu_run_open_dir_, bu_w_lock_stream, bu_writelock_fd_, visDQMUpload::buf, eostools::chmod(), createRunOpendirMaybe(), directorBU_, dpd_, Exception, fu_readwritelock_fd_, fu_rw_lock_stream, fulocal_rwlock_fd2_, fulocal_rwlock_fd_, fulockfile_, getRunOpenDirPath(), hltSourceDirectory_, mps_fire::i, init_lock_, svgfig::load(), eostools::mkdir(), openFULockfileStream(), pid_, run_dir_, run_string_, edm::shutdown_flag, edm_modernize_messagelogger::stat, stopFilePath_, stopFilePathPid_, AlCaHLTBitMon_QueryRunRegistry::string, tryInitializeFuLockFile(), and useFileBroker_.
Referenced by preallocate().
|
private |
bool evf::EvFDaqDirector::inputThrottled | ( | ) |
Definition at line 2011 of file EvFDaqDirector.cc.
References visDQMUpload::buf, input_throttled_file_, and edm_modernize_messagelogger::stat.
Referenced by FedRawDataInputSource::readSupervisor(), and DAQSource::readSupervisor().
|
inline |
Definition at line 122 of file EvFDaqDirector.h.
References nStreams_, and nThreads_.
Referenced by DAQSource::getNextDataBlock(), and FedRawDataInputSource::getNextEvent().
void evf::EvFDaqDirector::lockFULocal | ( | ) |
Definition at line 962 of file EvFDaqDirector.cc.
References fulocal_rwlock_fd_.
Referenced by getNextFromFileBroker(), and updateFuLock().
void evf::EvFDaqDirector::lockFULocal2 | ( | ) |
Definition at line 972 of file EvFDaqDirector.cc.
References fulocal_rwlock_fd2_.
Referenced by FedRawDataInputSource::checkNext(), getNextFromFileBroker(), and FedRawDataInputSource::maybeOpenNewLumiSection().
void evf::EvFDaqDirector::lockInitLock | ( | ) |
bool evf::EvFDaqDirector::lumisectionDiscarded | ( | unsigned int | ls | ) |
Definition at line 2016 of file EvFDaqDirector.cc.
References visDQMUpload::buf, discard_ls_filestem_, eostools::ls(), edm_modernize_messagelogger::stat, and to_string().
Referenced by FedRawDataInputSource::readSupervisor(), and DAQSource::readSupervisor().
|
static |
|
private |
|
inline |
Definition at line 123 of file EvFDaqDirector.h.
References nConcurrentLumis_.
Referenced by FedRawDataInputSource::readSupervisor(), and DAQSource::readSupervisor().
|
private |
Definition at line 939 of file EvFDaqDirector.cc.
References eostools::chmod(), beamerCreator::create(), fu_readwritelock_fd_, fu_rw_lock_stream, fulockfile_, and LogDebug.
Referenced by initRun().
|
inline |
Definition at line 108 of file EvFDaqDirector.h.
References outputAdler32Recheck_.
|
private |
|
inline |
Definition at line 73 of file EvFDaqDirector.h.
References writedatasetfile::run, and run_.
Referenced by DAQSource::DAQSource().
|
static |
Definition at line 1014 of file EvFDaqDirector.cc.
References checkFileRead(), FRDFileHeaderContent_v2::dataType_, FRDFileHeaderContent_v1::eventCount_, FRDFileHeaderContent_v2::eventCount_, FRDFileHeaderContent_v1::fileSize_, FRDFileHeaderContent_v2::fileSize_, getFRDFileHeaderVersion(), FRDFileHeaderContent_v1::headerSize_, FRDFileHeaderContent_v2::headerSize_, FRDFileHeaderIdentifier::id_, timingPdfMaker::infile, FRDFileHeaderContent_v1::lumiSection_, FRDFileHeaderContent_v2::lumiSection_, and FRDFileHeaderIdentifier::version_.
Referenced by grabNextJsonFromRaw(), FedRawDataInputSource::readSupervisor(), and DAQSource::readSupervisor().
void evf::EvFDaqDirector::postEndRun | ( | edm::GlobalContext const & | globalContext | ) |
Definition at line 421 of file EvFDaqDirector.cc.
References bu_readlock_fd_, bu_run_dir_, bu_writelock_fd_, directorBU_, corrVsCorr::filename, removeFile(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by EvFDaqDirector().
void evf::EvFDaqDirector::preallocate | ( | edm::service::SystemBounds const & | bounds | ) |
Definition at line 371 of file EvFDaqDirector.cc.
References initRun(), nConcurrentLumis_, nStreams_, and nThreads_.
Referenced by EvFDaqDirector().
void evf::EvFDaqDirector::preBeginRun | ( | edm::GlobalContext const & | globalContext | ) |
Definition at line 411 of file EvFDaqDirector.cc.
References dirManager_, evf::DirManager::findHighestRunDir(), and run_dir_.
Referenced by EvFDaqDirector().
void evf::EvFDaqDirector::preGlobalEndLumi | ( | edm::GlobalContext const & | globalContext | ) |
Definition at line 430 of file EvFDaqDirector.cc.
References fileDeleteLockPtr_, filesToDeletePtr_, fms_, evf::FastMonitoringService::isExceptionOnData(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, eostools::ls(), edm::LuminosityBlockID::luminosityBlock(), and edm::GlobalContext::luminosityBlockID().
Referenced by EvFDaqDirector().
bool evf::EvFDaqDirector::rawFileHasHeader | ( | std::string const & | rawSourcePath, |
uint16_t & | rawHeaderSize | ||
) |
Definition at line 1139 of file EvFDaqDirector.cc.
References checkFileRead(), getFRDFileHeaderVersion(), FRDFileHeaderContent_v1::headerSize_, FRDFileHeaderContent_v2::headerSize_, FRDFileHeaderIdentifier::id_, timingPdfMaker::infile, and FRDFileHeaderIdentifier::version_.
Referenced by bumpFile().
int evf::EvFDaqDirector::readLastLSEntry | ( | std::string const & | file | ) |
Definition at line 1968 of file EvFDaqDirector.cc.
References Json::Value::asInt(), geometryDiff::file, Json::Value::get(), DQM::reader, and runTheMatrix::ret.
Referenced by getNextFromFileBroker(), and updateFuLock().
void evf::EvFDaqDirector::removeFile | ( | std::string | filename | ) |
Definition at line 547 of file EvFDaqDirector.cc.
References corrVsCorr::filename.
Referenced by postEndRun().
|
inline |
Definition at line 74 of file EvFDaqDirector.h.
References run_string_.
Referenced by DAQSource::DAQSource().
|
inline |
Definition at line 181 of file EvFDaqDirector.h.
References fileDeleteLockPtr_, and filesToDeletePtr_.
Referenced by DAQSource::DAQSource(), and FedRawDataInputSource::FedRawDataInputSource().
|
inline |
Definition at line 121 of file EvFDaqDirector.h.
References fms_.
Referenced by DAQSource::DAQSource(), and FedRawDataInputSource::FedRawDataInputSource().
void evf::EvFDaqDirector::tryInitializeFuLockFile | ( | ) |
Definition at line 929 of file EvFDaqDirector.cc.
References fu_rw_lock_stream, and getHLTprescales::readIndex().
Referenced by initRun().
void evf::EvFDaqDirector::unlockFULocal | ( | ) |
Definition at line 967 of file EvFDaqDirector.cc.
References fulocal_rwlock_fd_.
Referenced by getNextFromFileBroker(), grabNextJsonFileAndUnlock(), FedRawDataInputSource::readSupervisor(), and ~EvFDaqDirector().
void evf::EvFDaqDirector::unlockFULocal2 | ( | ) |
Definition at line 977 of file EvFDaqDirector.cc.
References fulocal_rwlock_fd2_.
Referenced by FedRawDataInputSource::checkNext(), getNextFromFileBroker(), FedRawDataInputSource::maybeOpenNewLumiSection(), and ~EvFDaqDirector().
void evf::EvFDaqDirector::unlockInitLock | ( | ) |
EvFDaqDirector::FileStatus evf::EvFDaqDirector::updateFuLock | ( | unsigned int & | ls, |
std::string & | nextFile, | ||
uint32_t & | fsize, | ||
uint16_t & | rawHeaderSize, | ||
uint64_t & | lockWaitTime, | ||
bool & | setExceptionState | ||
) |
Definition at line 554 of file EvFDaqDirector.cc.
References bu_run_dir_, visDQMUpload::buf, bumpFile(), RPCNoise_example::check, fu_readwritelock_fd_, fu_rw_flk, fu_rw_fulk, fulockfile_, fuLockPollInterval_, getEoLSFilePathOnFU(), getEoRFilePath(), lockFULocal(), LogDebug, eostools::ls(), newFile, noFile, getHLTprescales::readIndex(), readLastLSEntry(), runAbort, runEnded, edm_modernize_messagelogger::stat, stop_ls_override_, stopFilePath_, and stopFilePathPid_.
Referenced by FedRawDataInputSource::readSupervisor().
|
inline |
Definition at line 78 of file EvFDaqDirector.h.
References useFileBroker_.
Referenced by FedRawDataInputSource::FedRawDataInputSource().
|
private |
Definition at line 215 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and initRun().
|
private |
Definition at line 216 of file EvFDaqDirector.h.
Referenced by initRun().
|
private |
Definition at line 217 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), getBUBaseDirs(), and initRun().
|
private |
Definition at line 218 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and getBUBaseDirsNSources().
|
private |
Definition at line 259 of file EvFDaqDirector.h.
|
private |
Definition at line 261 of file EvFDaqDirector.h.
|
private |
Definition at line 249 of file EvFDaqDirector.h.
|
private |
Definition at line 242 of file EvFDaqDirector.h.
Referenced by postEndRun().
|
private |
Definition at line 238 of file EvFDaqDirector.h.
Referenced by buBaseRunDir(), contactFileBroker(), getEoLSFilePathOnBU(), getEoRFilePath(), getFFFParamsFilePathOnBU(), getInputJsonFilePath(), getNextFromFileBroker(), getNFilesFromEoLS(), getOpenInputJsonFilePath(), getOpenRawFilePath(), getRawFilePath(), initRun(), postEndRun(), and updateFuLock().
|
private |
Definition at line 239 of file EvFDaqDirector.h.
Referenced by buBaseRunOpenDir(), and initRun().
|
private |
Definition at line 252 of file EvFDaqDirector.h.
|
private |
Definition at line 258 of file EvFDaqDirector.h.
|
private |
Definition at line 260 of file EvFDaqDirector.h.
|
private |
Definition at line 248 of file EvFDaqDirector.h.
Referenced by initRun().
|
private |
Definition at line 251 of file EvFDaqDirector.h.
|
private |
Definition at line 243 of file EvFDaqDirector.h.
Referenced by initRun(), and postEndRun().
|
private |
Definition at line 228 of file EvFDaqDirector.h.
Referenced by initRun(), and postEndRun().
|
private |
Definition at line 254 of file EvFDaqDirector.h.
Referenced by findCurrentRunDir(), and preBeginRun().
|
private |
Definition at line 295 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and lumisectionDiscarded().
|
private |
Definition at line 286 of file EvFDaqDirector.h.
Referenced by grabNextJsonFile(), grabNextJsonFileAndUnlock(), and initRun().
|
private |
Definition at line 291 of file EvFDaqDirector.h.
Referenced by contactFileBroker(), and EvFDaqDirector().
|
private |
Definition at line 277 of file EvFDaqDirector.h.
Referenced by getNFilesFromEoLS().
|
private |
Definition at line 222 of file EvFDaqDirector.h.
Referenced by contactFileBroker(), and EvFDaqDirector().
|
private |
Definition at line 221 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector().
|
private |
Definition at line 224 of file EvFDaqDirector.h.
Referenced by contactFileBroker().
|
private |
Definition at line 223 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector().
|
private |
Definition at line 225 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and getNextFromFileBroker().
|
private |
Definition at line 267 of file EvFDaqDirector.h.
Referenced by preGlobalEndLumi(), and setDeleteTracking().
|
private |
Definition at line 268 of file EvFDaqDirector.h.
Referenced by preGlobalEndLumi(), and setDeleteTracking().
|
private |
Definition at line 265 of file EvFDaqDirector.h.
Referenced by bumpFile(), preGlobalEndLumi(), and setFMS().
|
private |
Definition at line 244 of file EvFDaqDirector.h.
Referenced by initRun(), openFULockfileStream(), and updateFuLock().
|
private |
Definition at line 262 of file EvFDaqDirector.h.
Referenced by updateFuLock().
|
private |
Definition at line 263 of file EvFDaqDirector.h.
Referenced by updateFuLock().
|
private |
Definition at line 250 of file EvFDaqDirector.h.
Referenced by initRun(), openFULockfileStream(), and tryInitializeFuLockFile().
|
private |
Definition at line 246 of file EvFDaqDirector.h.
Referenced by initRun(), lockFULocal2(), unlockFULocal2(), and ~EvFDaqDirector().
|
private |
Definition at line 245 of file EvFDaqDirector.h.
Referenced by initRun(), lockFULocal(), unlockFULocal(), and ~EvFDaqDirector().
|
private |
Definition at line 240 of file EvFDaqDirector.h.
Referenced by initRun(), openFULockfileStream(), and updateFuLock().
|
private |
Definition at line 226 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and updateFuLock().
|
private |
Definition at line 229 of file EvFDaqDirector.h.
Referenced by initRun().
|
private |
Definition at line 233 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), getMergedDatChecksumFilePath(), getMergedDatFilePath(), getMergedProtocolBufferHistogramFilePath(), and getMergedRootHistogramFilePath().
|
private |
Definition at line 270 of file EvFDaqDirector.h.
Referenced by initRun(), lockInitLock(), and unlockInitLock().
|
private |
Definition at line 294 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and inputThrottled().
|
private |
Definition at line 288 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector().
|
staticprivate |
Definition at line 283 of file EvFDaqDirector.h.
Referenced by getStreamMergeType().
|
private |
Definition at line 274 of file EvFDaqDirector.h.
Referenced by numConcurrentLumis(), and preallocate().
|
private |
Definition at line 272 of file EvFDaqDirector.h.
Referenced by isSingleStreamThread(), and preallocate().
|
private |
Definition at line 273 of file EvFDaqDirector.h.
Referenced by isSingleStreamThread(), and preallocate().
|
private |
Definition at line 227 of file EvFDaqDirector.h.
Referenced by outputAdler32Recheck().
|
private |
Definition at line 236 of file EvFDaqDirector.h.
Referenced by contactFileBroker(), EvFDaqDirector(), grabNextJsonFile(), grabNextJsonFromRaw(), and initRun().
|
private |
Definition at line 256 of file EvFDaqDirector.h.
Referenced by bumpFile().
|
private |
Definition at line 290 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector().
|
private |
Definition at line 276 of file EvFDaqDirector.h.
Referenced by getNFilesFromEoLS().
|
private |
Definition at line 289 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector().
|
private |
Definition at line 219 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), findCurrentRunDir(), getBoLSFilePathOnFU(), getDatFilePath(), getEoLSFilePathOnBU(), getEoLSFilePathOnFU(), getEoRFileName(), getEoRFilePath(), getEoRFilePathOnFU(), getInitFilePath(), getInitTempFilePath(), getInputJsonFilePath(), getMergedDatChecksumFilePath(), getMergedDatFilePath(), getMergedProtocolBufferHistogramFilePath(), getMergedRootHistogramFilePath(), getOpenDatFilePath(), getOpenInitFilePath(), getOpenInputJsonFilePath(), getOpenOutputJsonFilePath(), getOpenProtocolBufferHistogramFilePath(), getOpenRawFilePath(), getOpenRootHistogramFilePath(), getOutputJsonFilePath(), getProtocolBufferHistogramFilePath(), getRawFilePath(), getRootHistogramFilePath(), getRunNumber(), and overrideRunNumber().
|
private |
Definition at line 237 of file EvFDaqDirector.h.
Referenced by baseRunDir(), createProcessingNotificationMaybe(), EvFDaqDirector(), getBoLSFilePathOnFU(), getDatFilePath(), getEoLSFilePathOnFU(), getEoRFilePathOnFU(), getInitFilePath(), getInitTempFilePath(), getLumisectionToStart(), getMergedDatChecksumFilePath(), getMergedDatFilePath(), getMergedProtocolBufferHistogramFilePath(), getMergedRootHistogramFilePath(), getOpenDatFilePath(), getOpenInitFilePath(), getOpenOutputJsonFilePath(), getOpenProtocolBufferHistogramFilePath(), getOpenRootHistogramFilePath(), getOutputJsonFilePath(), getProtocolBufferHistogramFilePath(), getRootHistogramFilePath(), getRunOpenDirPath(), initRun(), and preBeginRun().
|
private |
Definition at line 235 of file EvFDaqDirector.h.
Referenced by contactFileBroker(), and EvFDaqDirector().
|
private |
Definition at line 234 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), getLumisectionToStart(), initRun(), and runString().
|
private |
Definition at line 292 of file EvFDaqDirector.h.
Referenced by contactFileBroker(), EvFDaqDirector(), and ~EvFDaqDirector().
|
private |
Definition at line 231 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and getStartLumisectionFromEnv().
|
private |
Definition at line 280 of file EvFDaqDirector.h.
Referenced by getNextFromFileBroker(), and updateFuLock().
|
private |
Definition at line 278 of file EvFDaqDirector.h.
Referenced by getNextFromFileBroker(), initRun(), and updateFuLock().
|
private |
Definition at line 279 of file EvFDaqDirector.h.
Referenced by getNextFromFileBroker(), initRun(), and updateFuLock().
|
private |
Definition at line 220 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), initRun(), and useFileBroker().