#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 () |
void | checkMergeTypePSet (edm::ProcessContext const &pc) |
void | checkTransferSystemPSet (edm::ProcessContext const &pc) |
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::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 | getEoRFilePath () const |
std::string | getEoRFilePathOnFU () const |
std::string | getFFFParamsFilePathOnBU () const |
std::string | getInitFilePath (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) |
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 &stream) const |
std::string | getStreamMergeType (std::string const &stream, MergeType defaultType) |
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) |
void | initRun () |
bool | inputThrottled () |
bool | isSingleStreamThread () |
void | lockFULocal () |
void | lockFULocal2 () |
void | lockInitLock () |
bool | outputAdler32Recheck () const |
void | overrideRunNumber (unsigned int run) |
void | postEndRun (edm::GlobalContext const &globalContext) |
void | preallocate (edm::service::SystemBounds const &bounds) |
void | preBeginJob (edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &) |
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 (unsigned int ls, unsigned int index) |
void | removeFile (std::string) |
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, 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 |
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_ |
bool | directorBU_ |
DirManager | dirManager_ |
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_ |
tbb::concurrent_hash_map < std::string, std::string > | mergeTypeMap_ |
std::string | mergeTypePset_ |
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 |
bool | requireTSPSet_ |
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::string | selectedTransferMode_ |
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_ |
std::shared_ptr< Json::Value > | transferSystemJson_ |
bool | useFileBroker_ |
Static Private Attributes | |
static const std::vector < std::string > | MergeTypeNames_ = {"", "DAT", "PB", "JSNDATA"} |
Definition at line 62 of file EvFDaqDirector.h.
Enumerator | |
---|---|
noFile | |
sameFile | |
newFile | |
newLumi | |
runEnded | |
runAbort |
Definition at line 64 of file EvFDaqDirector.h.
|
explicit |
Definition at line 38 of file EvFDaqDirector.cc.
References endpoint_iterator_, cppFunctionSkipper::exception, fileBrokerHost_, fileBrokerHostFromCfg_, fileBrokerPort_, fileBrokerUseLocalLock_, fuLockPollInterval_, hostname_, recoMuon::in, io_service_, postEndRun(), preallocate(), preBeginJob(), preBeginRun(), preGlobalEndLumi(), query_, resolver_, socket_, startFromLS_, edm_modernize_messagelogger::stat, AlCaHLTBitMon_QueryRunRegistry::string, useFileBroker_, edm::ActivityRegistry::watchPostGlobalEndRun(), edm::ActivityRegistry::watchPreallocate(), edm::ActivityRegistry::watchPreBeginJob(), edm::ActivityRegistry::watchPreGlobalBeginRun(), and edm::ActivityRegistry::watchPreGlobalEndLumi().
evf::EvFDaqDirector::~EvFDaqDirector | ( | ) |
Definition at line 301 of file EvFDaqDirector.cc.
References fulocal_rwlock_fd2_, fulocal_rwlock_fd_, socket_, unlockFULocal(), and unlockFULocal2().
|
inline |
Definition at line 76 of file EvFDaqDirector.h.
References run_dir_.
Referenced by grabNextJsonFile(), grabNextJsonFileAndUnlock(), and grabNextJsonFromRaw().
|
inline |
|
inline |
|
private |
Definition at line 779 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().
void evf::EvFDaqDirector::checkMergeTypePSet | ( | edm::ProcessContext const & | pc | ) |
Definition at line 2019 of file EvFDaqDirector.cc.
References edm::ParameterSet::existsAs(), edm::ParameterSet::getParameterSet(), edm::getParameterSet(), mergeTypeMap_, mergeTypePset_, edm::ProcessContext::parameterSetID(), unpackData-CaloStage2::pname, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by preBeginJob().
void evf::EvFDaqDirector::checkTransferSystemPSet | ( | edm::ProcessContext const & | pc | ) |
Definition at line 1911 of file EvFDaqDirector.cc.
References Json::Value::append(), Json::arrayValue, alignCSCRings::dest, myMessageLogger_cff::destinations, Exception, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), edm::getParameterSet(), universalConfigTemplate::mode, edm::ProcessContext::parameterSetID(), requireTSPSet_, and transferSystemJson_.
Referenced by preBeginJob().
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 1457 of file EvFDaqDirector.cc.
References cms::cuda::assert(), bu_run_dir_, convertSQLitetoXML_cfg::connect, alignCSCRings::e, endpoint_iterator_, cppFunctionSkipper::exception, fileBrokerHost_, fileBrokerKeepAlive_, SiStripPI::max, newFile, noFile, fed_dqm_sourceclient-live_cfg::path, pid_, SiPixelLorentzAngle_cfi::read, uploadConditions::response, run_nstring_, runEnded, uploadConditions::server_version, socket_, AlCaHLTBitMon_QueryRunRegistry::string, and TablePrint::write.
Referenced by getNextFromFileBroker().
void evf::EvFDaqDirector::createBoLSFile | ( | const uint32_t | lumiSection, |
bool | checkIfExists | ||
) | const |
Definition at line 933 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 943 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 2051 of file EvFDaqDirector.cc.
References run_dir_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by FedRawDataInputSource::checkNext().
void evf::EvFDaqDirector::createRunOpendirMaybe | ( | ) |
Definition at line 1872 of file EvFDaqDirector.cc.
References getRunOpenDirPath(), LogDebug, and fed_dqm_sourceclient-live_cfg::path.
Referenced by initRun().
|
private |
|
private |
|
static |
Definition at line 327 of file EvFDaqDirector.cc.
References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), submitPVResolutionJobs::desc, edm::ParameterSetDescription::setComment(), and AlCaHLTBitMon_QueryRunRegistry::string.
|
inline |
Definition at line 81 of file EvFDaqDirector.h.
References dirManager_, evf::DirManager::findRunDir(), and run_.
std::string evf::EvFDaqDirector::getBoLSFilePathOnFU | ( | const unsigned int | ls | ) | const |
Definition at line 484 of file EvFDaqDirector.cc.
References fffnaming::bolsFileName(), run_, and run_dir_.
Referenced by createBoLSFile().
std::string evf::EvFDaqDirector::getDatFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 417 of file EvFDaqDirector.cc.
References run_, run_dir_, and fffnaming::streamerDataFileNameWithPid().
std::string evf::EvFDaqDirector::getEoLSFilePathOnBU | ( | const unsigned int | ls | ) | const |
Definition at line 476 of file EvFDaqDirector.cc.
References bu_run_dir_, fffnaming::eolsFileName(), and run_.
Referenced by bumpFile(), and FedRawDataInputSource::checkNext().
std::string evf::EvFDaqDirector::getEoLSFilePathOnFU | ( | const unsigned int | ls | ) | const |
Definition at line 480 of file EvFDaqDirector.cc.
References fffnaming::eolsFileName(), run_, and run_dir_.
Referenced by FedRawDataInputSource::checkNext(), createLumiSectionFiles(), FedRawDataInputSource::maybeOpenNewLumiSection(), and updateFuLock().
std::string evf::EvFDaqDirector::getEoRFilePath | ( | ) | const |
Definition at line 488 of file EvFDaqDirector.cc.
References bu_run_dir_, fffnaming::eorFileName(), and run_.
Referenced by updateFuLock().
std::string evf::EvFDaqDirector::getEoRFilePathOnFU | ( | ) | const |
Definition at line 490 of file EvFDaqDirector.cc.
References fffnaming::eorFileName(), run_, and run_dir_.
Referenced by FedRawDataInputSource::checkNext().
std::string evf::EvFDaqDirector::getFFFParamsFilePathOnBU | ( | ) | const |
std::string evf::EvFDaqDirector::getInitFilePath | ( | std::string const & | stream | ) | const |
Definition at line 445 of file EvFDaqDirector.cc.
References fffnaming::initFileNameWithPid(), run_, and run_dir_.
Referenced by dqm::DQMFileSaverPB::initRun().
std::string evf::EvFDaqDirector::getInputJsonFilePath | ( | const unsigned int | ls, |
const unsigned int | index | ||
) | const |
Definition at line 401 of file EvFDaqDirector.cc.
References bu_run_dir_, fffnaming::inputJsonFileName(), and run_.
Referenced by bumpFile().
unsigned int evf::EvFDaqDirector::getLumisectionToStart | ( | ) | const |
Definition at line 1896 of file EvFDaqDirector.cc.
References visDQMUpload::buf, das_client::fullpath(), run_dir_, run_string_, contentValuesCheck::ss, edm_modernize_messagelogger::stat, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by FedRawDataInputSource::readSupervisor().
std::string evf::EvFDaqDirector::getMergedDatChecksumFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 437 of file EvFDaqDirector.cc.
References hostname_, run_, run_dir_, and fffnaming::streamerDataChecksumFileNameWithInstance().
std::string evf::EvFDaqDirector::getMergedDatFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 433 of file EvFDaqDirector.cc.
References hostname_, run_, run_dir_, and fffnaming::streamerDataFileNameWithInstance().
std::string evf::EvFDaqDirector::getMergedProtocolBufferHistogramFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 459 of file EvFDaqDirector.cc.
References hostname_, fffnaming::protocolBufferHistogramFileNameWithInstance(), run_, and run_dir_.
std::string evf::EvFDaqDirector::getMergedRootHistogramFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 472 of file EvFDaqDirector.cc.
References hostname_, fffnaming::rootHistogramFileNameWithInstance(), run_, and run_dir_.
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 | ||
) |
Definition at line 1723 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, unlockFULocal(), and unlockFULocal2().
Referenced by FedRawDataInputSource::readSupervisor().
|
private |
Definition at line 718 of file EvFDaqDirector.cc.
References bu_run_dir_, visDQMUpload::buf, data, spu::def(), jsoncollector::DataPoint::deserialize(), eolsNFilesIndex_, das_client::fullpath(), jsoncollector::DataPoint::getData(), jsoncollector::DataPoint::getDefinition(), jsoncollector::DataPointDefinition::getNames(), mps_fire::i, Json::Reader::parse(), 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 421 of file EvFDaqDirector.cc.
References run_, run_dir_, and fffnaming::streamerDataFileNameWithPid().
std::string evf::EvFDaqDirector::getOpenInitFilePath | ( | std::string const & | stream | ) | const |
Definition at line 441 of file EvFDaqDirector.cc.
References fffnaming::initFileNameWithPid(), run_, and run_dir_.
std::string evf::EvFDaqDirector::getOpenInputJsonFilePath | ( | const unsigned int | ls, |
const unsigned int | index | ||
) | const |
Definition at line 413 of file EvFDaqDirector.cc.
References bu_run_dir_, fffnaming::inputJsonFileName(), and run_.
std::string evf::EvFDaqDirector::getOpenOutputJsonFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 425 of file EvFDaqDirector.cc.
References run_, run_dir_, and fffnaming::streamerJsonFileNameWithPid().
std::string evf::EvFDaqDirector::getOpenProtocolBufferHistogramFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 449 of file EvFDaqDirector.cc.
References fffnaming::protocolBufferHistogramFileNameWithPid(), run_, and run_dir_.
std::string evf::EvFDaqDirector::getOpenRawFilePath | ( | const unsigned int | ls, |
const unsigned int | index | ||
) | const |
Definition at line 409 of file EvFDaqDirector.cc.
References bu_run_dir_, fffnaming::inputRawFileName(), and run_.
std::string evf::EvFDaqDirector::getOpenRootHistogramFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 464 of file EvFDaqDirector.cc.
References fffnaming::rootHistogramFileNameWithPid(), run_, and run_dir_.
std::string evf::EvFDaqDirector::getOutputJsonFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 429 of file EvFDaqDirector.cc.
References run_, run_dir_, and fffnaming::streamerJsonFileNameWithPid().
std::string evf::EvFDaqDirector::getProtocolBufferHistogramFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 454 of file EvFDaqDirector.cc.
References fffnaming::protocolBufferHistogramFileNameWithPid(), run_, and run_dir_.
std::string evf::EvFDaqDirector::getRawFilePath | ( | const unsigned int | ls, |
const unsigned int | index | ||
) | const |
Definition at line 405 of file EvFDaqDirector.cc.
References bu_run_dir_, fffnaming::inputRawFileName(), and run_.
Referenced by bumpFile(), and removeFile().
std::string evf::EvFDaqDirector::getRootHistogramFilePath | ( | const unsigned int | ls, |
std::string const & | stream | ||
) | const |
Definition at line 468 of file EvFDaqDirector.cc.
References fffnaming::rootHistogramFileNameWithPid(), run_, and run_dir_.
|
inline |
|
inline |
Definition at line 106 of file EvFDaqDirector.h.
References run_dir_.
Referenced by createRunOpendirMaybe(), and initRun().
|
inline |
Definition at line 176 of file EvFDaqDirector.h.
References startFromLS_.
Referenced by FedRawDataInputSource::readSupervisor().
std::string evf::EvFDaqDirector::getStreamDestinations | ( | std::string const & | stream | ) | const |
Definition at line 1973 of file EvFDaqDirector.cc.
References Json::Value::begin(), Json::Value::end(), Exception, mps_check::msg, requireTSPSet_, runTheMatrix::ret, selectedTransferMode_, cms::cuda::stream, AlCaHLTBitMon_QueryRunRegistry::string, and transferSystemJson_.
std::string evf::EvFDaqDirector::getStreamMergeType | ( | std::string const & | stream, |
MergeType | defaultType | ||
) |
Definition at line 2037 of file EvFDaqDirector.cc.
References mergeTypeMap_, MergeTypeNames_, and AlCaHLTBitMon_QueryRunRegistry::string.
int evf::EvFDaqDirector::grabNextJsonFile | ( | std::string const & | jsonSourcePath, |
std::string const & | rawSourcePath, | ||
int64_t & | fileSizeFromJson, | ||
bool & | fileFound | ||
) |
Definition at line 1182 of file EvFDaqDirector.cc.
References cms::cuda::assert(), baseRunDir(), visDQMUpload::buf, data, jsoncollector::DataPoint::deserialize(), dpd_, alignCSCRings::e, cppFunctionSkipper::exception, jsoncollector::DataPoint::getData(), Json::Reader::getFormatedErrorMessages(), jsoncollector::DataPointDefinition::getNames(), mps_fire::i, timingPdfMaker::infile, LogDebug, timingPdfMaker::outfile, Json::Reader::parse(), fed_dqm_sourceclient-live_cfg::path, pid_, SiPixelLorentzAngle_cfi::read, DQM::reader, mps_fire::result, contentValuesCheck::ss, edm_modernize_messagelogger::stat, AlCaHLTBitMon_QueryRunRegistry::string, summarizeEdmComparisonLogfiles::success, and TablePrint::write.
Referenced by getNextFromFileBroker().
int evf::EvFDaqDirector::grabNextJsonFileAndUnlock | ( | std::filesystem::path const & | jsonSourcePath | ) |
Definition at line 1365 of file EvFDaqDirector.cc.
References baseRunDir(), filterCSVwithJSON::copy, data, jsoncollector::DataPoint::deserialize(), dpd_, alignCSCRings::e, cppFunctionSkipper::exception, Exception, jsoncollector::DataPoint::getData(), Json::Reader::getFormatedErrorMessages(), jsoncollector::DataPointDefinition::getNames(), mps_fire::i, LogDebug, Json::Reader::parse(), fed_dqm_sourceclient-live_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 | ||
) |
Definition at line 1100 of file EvFDaqDirector.cc.
References baseRunDir(), LogDebug, timingPdfMaker::outfile, parseFRDFileHeader(), fed_dqm_sourceclient-live_cfg::path, pid_, runTheMatrix::ret, contentValuesCheck::ss, edm_modernize_messagelogger::stat, AlCaHLTBitMon_QueryRunRegistry::string, and TablePrint::write.
Referenced by getNextFromFileBroker(), and FedRawDataInputSource::readSupervisor().
|
private |
void evf::EvFDaqDirector::initRun | ( | ) |
Definition at line 148 of file EvFDaqDirector.cc.
References base_dir_, bu_base_dir_, 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_, init_lock_, input_throttled_file_, eostools::mkdir(), openFULockfileStream(), pid_, run_, run_dir_, run_nstring_, run_string_, contentValuesCheck::ss, edm_modernize_messagelogger::stat, stopFilePath_, stopFilePathPid_, AlCaHLTBitMon_QueryRunRegistry::string, and tryInitializeFuLockFile().
Referenced by preallocate().
|
private |
bool evf::EvFDaqDirector::inputThrottled | ( | ) |
Definition at line 2065 of file EvFDaqDirector.cc.
References visDQMUpload::buf, input_throttled_file_, and edm_modernize_messagelogger::stat.
Referenced by FedRawDataInputSource::readSupervisor().
|
inline |
Definition at line 122 of file EvFDaqDirector.h.
References nStreams_, and nThreads_.
Referenced by FedRawDataInputSource::getNextEvent().
void evf::EvFDaqDirector::lockFULocal | ( | ) |
Definition at line 913 of file EvFDaqDirector.cc.
References fulocal_rwlock_fd_.
Referenced by getNextFromFileBroker(), and updateFuLock().
void evf::EvFDaqDirector::lockFULocal2 | ( | ) |
Definition at line 923 of file EvFDaqDirector.cc.
References fulocal_rwlock_fd2_.
Referenced by FedRawDataInputSource::checkNext(), getNextFromFileBroker(), and FedRawDataInputSource::maybeOpenNewLumiSection().
void evf::EvFDaqDirector::lockInitLock | ( | ) |
|
static |
|
private |
|
private |
Definition at line 890 of file EvFDaqDirector.cc.
References eostools::chmod(), fu_readwritelock_fd_, fu_rw_lock_stream, fulockfile_, and LogDebug.
Referenced by initRun().
|
inline |
Definition at line 107 of file EvFDaqDirector.h.
References outputAdler32Recheck_.
|
private |
|
inline |
|
static |
Definition at line 965 of file EvFDaqDirector.cc.
References FRDFileHeader_v1::eventCount_, FRDFileHeader_v1::fileSize_, getFRDFileHeaderVersion(), FRDFileHeader_v1::headerSize_, FRDFileHeader_v1::id_, timingPdfMaker::infile, FRDFileHeader_v1::lumiSection_, SiPixelLorentzAngle_cfi::read, and FRDFileHeader_v1::version_.
Referenced by grabNextJsonFromRaw(), and FedRawDataInputSource::readSupervisor().
void evf::EvFDaqDirector::postEndRun | ( | edm::GlobalContext const & | globalContext | ) |
Definition at line 374 of file EvFDaqDirector.cc.
References bu_readlock_fd_, bu_run_dir_, bu_writelock_fd_, directorBU_, lut2db_cfg::filename, removeFile(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by EvFDaqDirector().
void evf::EvFDaqDirector::preallocate | ( | edm::service::SystemBounds const & | bounds | ) |
Definition at line 320 of file EvFDaqDirector.cc.
References initRun(), edm::service::SystemBounds::maxNumberOfStreams(), edm::service::SystemBounds::maxNumberOfThreads(), nStreams_, and nThreads_.
Referenced by EvFDaqDirector().
void evf::EvFDaqDirector::preBeginJob | ( | edm::PathsAndConsumesOfModulesBase const & | , |
edm::ProcessContext const & | pc | ||
) |
Definition at line 359 of file EvFDaqDirector.cc.
References checkMergeTypePSet(), and checkTransferSystemPSet().
Referenced by EvFDaqDirector().
void evf::EvFDaqDirector::preBeginRun | ( | edm::GlobalContext const & | globalContext | ) |
Definition at line 364 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 383 of file EvFDaqDirector.cc.
References fileDeleteLockPtr_, filesToDeletePtr_, 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 1061 of file EvFDaqDirector.cc.
References getFRDFileHeaderVersion(), FRDFileHeader_v1::headerSize_, FRDFileHeader_v1::id_, timingPdfMaker::infile, SiPixelLorentzAngle_cfi::read, and FRDFileHeader_v1::version_.
Referenced by bumpFile().
int evf::EvFDaqDirector::readLastLSEntry | ( | std::string const & | file | ) |
Definition at line 1882 of file EvFDaqDirector.cc.
References Json::Value::asInt(), mergeVDriftHistosByStation::file, Json::Value::get(), Json::Reader::parse(), DQM::reader, and runTheMatrix::ret.
Referenced by getNextFromFileBroker(), and updateFuLock().
void evf::EvFDaqDirector::removeFile | ( | unsigned int | ls, |
unsigned int | index | ||
) |
Definition at line 501 of file EvFDaqDirector.cc.
References getRawFilePath().
Referenced by postEndRun().
void evf::EvFDaqDirector::removeFile | ( | std::string | filename | ) |
Definition at line 494 of file EvFDaqDirector.cc.
|
inline |
Definition at line 177 of file EvFDaqDirector.h.
References fileDeleteLockPtr_, and filesToDeletePtr_.
Referenced by FedRawDataInputSource::FedRawDataInputSource().
|
inline |
Definition at line 121 of file EvFDaqDirector.h.
References fms_.
Referenced by FedRawDataInputSource::FedRawDataInputSource().
void evf::EvFDaqDirector::tryInitializeFuLockFile | ( | ) |
Definition at line 880 of file EvFDaqDirector.cc.
References fu_rw_lock_stream, and getHLTprescales::readIndex().
Referenced by initRun().
void evf::EvFDaqDirector::unlockFULocal | ( | ) |
Definition at line 918 of file EvFDaqDirector.cc.
References fulocal_rwlock_fd_.
Referenced by getNextFromFileBroker(), grabNextJsonFileAndUnlock(), FedRawDataInputSource::readSupervisor(), and ~EvFDaqDirector().
void evf::EvFDaqDirector::unlockFULocal2 | ( | ) |
Definition at line 928 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 503 of file EvFDaqDirector.cc.
References bu_run_dir_, visDQMUpload::buf, bumpFile(), trackerTree::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 79 of file EvFDaqDirector.h.
References useFileBroker_.
Referenced by FedRawDataInputSource::FedRawDataInputSource().
|
private |
Definition at line 206 of file EvFDaqDirector.h.
Referenced by initRun().
|
private |
Definition at line 207 of file EvFDaqDirector.h.
Referenced by initRun().
|
private |
Definition at line 251 of file EvFDaqDirector.h.
|
private |
Definition at line 253 of file EvFDaqDirector.h.
|
private |
Definition at line 241 of file EvFDaqDirector.h.
|
private |
Definition at line 234 of file EvFDaqDirector.h.
Referenced by postEndRun().
|
private |
Definition at line 230 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 231 of file EvFDaqDirector.h.
Referenced by buBaseRunOpenDir(), and initRun().
|
private |
Definition at line 244 of file EvFDaqDirector.h.
|
private |
Definition at line 250 of file EvFDaqDirector.h.
|
private |
Definition at line 252 of file EvFDaqDirector.h.
|
private |
Definition at line 240 of file EvFDaqDirector.h.
Referenced by initRun().
|
private |
Definition at line 243 of file EvFDaqDirector.h.
|
private |
Definition at line 235 of file EvFDaqDirector.h.
Referenced by initRun(), and postEndRun().
|
private |
Definition at line 220 of file EvFDaqDirector.h.
Referenced by initRun(), and postEndRun().
|
private |
Definition at line 246 of file EvFDaqDirector.h.
Referenced by findCurrentRunDir(), and preBeginRun().
|
private |
Definition at line 280 of file EvFDaqDirector.h.
Referenced by grabNextJsonFile(), grabNextJsonFileAndUnlock(), and initRun().
|
private |
Definition at line 285 of file EvFDaqDirector.h.
Referenced by contactFileBroker(), and EvFDaqDirector().
|
private |
Definition at line 268 of file EvFDaqDirector.h.
Referenced by getNFilesFromEoLS().
|
private |
Definition at line 211 of file EvFDaqDirector.h.
Referenced by contactFileBroker(), and EvFDaqDirector().
|
private |
Definition at line 210 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector().
|
private |
Definition at line 213 of file EvFDaqDirector.h.
Referenced by contactFileBroker().
|
private |
Definition at line 212 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector().
|
private |
Definition at line 214 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and getNextFromFileBroker().
|
private |
Definition at line 259 of file EvFDaqDirector.h.
Referenced by preGlobalEndLumi(), and setDeleteTracking().
|
private |
Definition at line 260 of file EvFDaqDirector.h.
Referenced by preGlobalEndLumi(), and setDeleteTracking().
|
private |
Definition at line 257 of file EvFDaqDirector.h.
Referenced by bumpFile(), and setFMS().
|
private |
Definition at line 236 of file EvFDaqDirector.h.
Referenced by initRun(), openFULockfileStream(), and updateFuLock().
|
private |
Definition at line 254 of file EvFDaqDirector.h.
Referenced by updateFuLock().
|
private |
Definition at line 255 of file EvFDaqDirector.h.
Referenced by updateFuLock().
|
private |
Definition at line 242 of file EvFDaqDirector.h.
Referenced by initRun(), openFULockfileStream(), and tryInitializeFuLockFile().
|
private |
Definition at line 238 of file EvFDaqDirector.h.
Referenced by initRun(), lockFULocal2(), unlockFULocal2(), and ~EvFDaqDirector().
|
private |
Definition at line 237 of file EvFDaqDirector.h.
Referenced by initRun(), lockFULocal(), unlockFULocal(), and ~EvFDaqDirector().
|
private |
Definition at line 232 of file EvFDaqDirector.h.
Referenced by initRun(), openFULockfileStream(), and updateFuLock().
|
private |
Definition at line 215 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and updateFuLock().
|
private |
Definition at line 221 of file EvFDaqDirector.h.
Referenced by initRun().
|
private |
Definition at line 225 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), getMergedDatChecksumFilePath(), getMergedDatFilePath(), getMergedProtocolBufferHistogramFilePath(), and getMergedRootHistogramFilePath().
|
private |
Definition at line 262 of file EvFDaqDirector.h.
Referenced by initRun(), lockInitLock(), and unlockInitLock().
|
private |
Definition at line 288 of file EvFDaqDirector.h.
Referenced by initRun(), and inputThrottled().
|
private |
Definition at line 282 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector().
|
private |
Definition at line 274 of file EvFDaqDirector.h.
Referenced by checkMergeTypePSet(), and getStreamMergeType().
|
staticprivate |
Definition at line 277 of file EvFDaqDirector.h.
Referenced by getStreamMergeType().
|
private |
Definition at line 219 of file EvFDaqDirector.h.
Referenced by checkMergeTypePSet().
|
private |
Definition at line 264 of file EvFDaqDirector.h.
Referenced by isSingleStreamThread(), and preallocate().
|
private |
Definition at line 265 of file EvFDaqDirector.h.
Referenced by isSingleStreamThread(), and preallocate().
|
private |
Definition at line 216 of file EvFDaqDirector.h.
Referenced by outputAdler32Recheck().
|
private |
Definition at line 228 of file EvFDaqDirector.h.
Referenced by contactFileBroker(), grabNextJsonFile(), grabNextJsonFromRaw(), and initRun().
|
private |
Definition at line 248 of file EvFDaqDirector.h.
Referenced by bumpFile().
|
private |
Definition at line 284 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector().
|
private |
Definition at line 267 of file EvFDaqDirector.h.
Referenced by getNFilesFromEoLS().
|
private |
Definition at line 217 of file EvFDaqDirector.h.
Referenced by checkTransferSystemPSet(), and getStreamDestinations().
|
private |
Definition at line 283 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector().
|
private |
Definition at line 208 of file EvFDaqDirector.h.
Referenced by findCurrentRunDir(), getBoLSFilePathOnFU(), getDatFilePath(), getEoLSFilePathOnBU(), getEoLSFilePathOnFU(), getEoRFilePath(), getEoRFilePathOnFU(), getInitFilePath(), getInputJsonFilePath(), getMergedDatChecksumFilePath(), getMergedDatFilePath(), getMergedProtocolBufferHistogramFilePath(), getMergedRootHistogramFilePath(), getOpenDatFilePath(), getOpenInitFilePath(), getOpenInputJsonFilePath(), getOpenOutputJsonFilePath(), getOpenProtocolBufferHistogramFilePath(), getOpenRawFilePath(), getOpenRootHistogramFilePath(), getOutputJsonFilePath(), getProtocolBufferHistogramFilePath(), getRawFilePath(), getRootHistogramFilePath(), getRunNumber(), initRun(), and overrideRunNumber().
|
private |
Definition at line 229 of file EvFDaqDirector.h.
Referenced by baseRunDir(), createProcessingNotificationMaybe(), getBoLSFilePathOnFU(), getDatFilePath(), getEoLSFilePathOnFU(), getEoRFilePathOnFU(), getInitFilePath(), getLumisectionToStart(), getMergedDatChecksumFilePath(), getMergedDatFilePath(), getMergedProtocolBufferHistogramFilePath(), getMergedRootHistogramFilePath(), getOpenDatFilePath(), getOpenInitFilePath(), getOpenOutputJsonFilePath(), getOpenProtocolBufferHistogramFilePath(), getOpenRootHistogramFilePath(), getOutputJsonFilePath(), getProtocolBufferHistogramFilePath(), getRootHistogramFilePath(), getRunOpenDirPath(), initRun(), and preBeginRun().
|
private |
Definition at line 227 of file EvFDaqDirector.h.
Referenced by contactFileBroker(), and initRun().
|
private |
Definition at line 226 of file EvFDaqDirector.h.
Referenced by getLumisectionToStart(), and initRun().
|
private |
Definition at line 218 of file EvFDaqDirector.h.
Referenced by getStreamDestinations().
|
private |
Definition at line 286 of file EvFDaqDirector.h.
Referenced by contactFileBroker(), EvFDaqDirector(), and ~EvFDaqDirector().
|
private |
Definition at line 223 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and getStartLumisectionFromEnv().
|
private |
Definition at line 271 of file EvFDaqDirector.h.
Referenced by getNextFromFileBroker(), and updateFuLock().
|
private |
Definition at line 269 of file EvFDaqDirector.h.
Referenced by getNextFromFileBroker(), initRun(), and updateFuLock().
|
private |
Definition at line 270 of file EvFDaqDirector.h.
Referenced by getNextFromFileBroker(), initRun(), and updateFuLock().
|
private |
Definition at line 273 of file EvFDaqDirector.h.
Referenced by checkTransferSystemPSet(), and getStreamDestinations().
|
private |
Definition at line 209 of file EvFDaqDirector.h.
Referenced by EvFDaqDirector(), and useFileBroker().