Skip to content

Commit

Permalink
Merge pull request #34912 from smorovic/120X-daq-start-from-ls
Browse files Browse the repository at this point in the history
(DAQ) input source - minimum starting lumisection
  • Loading branch information
cmsbuild authored Aug 17, 2021
2 parents b03f7f6 + 63d0988 commit 191fd1a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions EventFilter/Utilities/interface/EvFDaqDirector.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ namespace evf {
void createProcessingNotificationMaybe() const;
int readLastLSEntry(std::string const& file);
unsigned int getLumisectionToStart() const;
unsigned int getStartLumisectionFromEnv() const { return startFromLS_; }
void setDeleteTracking(std::mutex* fileDeleteLock,
std::list<std::pair<int, std::unique_ptr<InputFile>>>* filesToDelete) {
fileDeleteLockPtr_ = fileDeleteLock;
Expand Down
4 changes: 2 additions & 2 deletions EventFilter/Utilities/src/EvFDaqDirector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ namespace evf {
socket_ = std::make_unique<boost::asio::ip::tcp::socket>(io_service_);
}

char* startFromLSPtr = std::getenv("FFF_STARTFROMLS");
char* startFromLSPtr = std::getenv("FFF_START_LUMISECTION");
if (startFromLSPtr) {
try {
startFromLS_ = boost::lexical_cast<unsigned int>(std::string(startFromLSPtr));
Expand Down Expand Up @@ -1863,7 +1863,7 @@ namespace evf {
std::string fileprefix = run_dir_ + "/" + run_string_ + "_ls";
std::string fullpath;
struct stat buf;
unsigned int lscount = startFromLS_;
unsigned int lscount = 1;
do {
std::stringstream ss;
ss << fileprefix << std::setfill('0') << std::setw(4) << lscount << "_EoLS.jsn";
Expand Down
16 changes: 15 additions & 1 deletion EventFilter/Utilities/src/FedRawDataInputSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,21 @@ void FedRawDataInputSource::readSupervisor() {
} else {
//new file service
if (currentLumiSection == 0 && !alwaysStartFromFirstLS_) {
if (ls < 100) {
if (daqDirector_->getStartLumisectionFromEnv() > 1) {
//start transitions from LS specified by env, continue if not reached
if (ls < daqDirector_->getStartLumisectionFromEnv()) {
//skip file if from earlier LS than specified by env
if (rawFd != -1) {
close(rawFd);
rawFd = -1;
}
status = evf::EvFDaqDirector::noFile;
continue;
} else {
std::unique_ptr<InputFile> inf(new InputFile(evf::EvFDaqDirector::newLumi, ls));
fileQueue_.push(std::move(inf));
}
} else if (ls < 100) {
//look at last LS file on disk to start from that lumisection (only within first 100 LS)
unsigned int lsToStart = daqDirector_->getLumisectionToStart();

Expand Down

0 comments on commit 191fd1a

Please sign in to comment.