CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EvFDaqDirector.cc
Go to the documentation of this file.
10 
16 
17 #include <iostream>
18 #include <sstream>
19 #include <sys/time.h>
20 #include <unistd.h>
21 #include <cstdio>
22 #include <boost/lexical_cast.hpp>
23 #include <boost/filesystem/fstream.hpp>
24 
25 //#define DEBUG
26 
27 using namespace jsoncollector;
28 
29 
30 namespace evf {
31 
32  //for enum MergeType
33  const std::vector<std::string> EvFDaqDirector::MergeTypeNames_ = {"","DAT","PB","JSNDATA"};
34 
35  EvFDaqDirector::EvFDaqDirector(const edm::ParameterSet &pset,
36  edm::ActivityRegistry& reg) :
37  base_dir_(pset.getUntrackedParameter<std::string> ("baseDir", ".")),
38  bu_base_dir_(pset.getUntrackedParameter<std::string> ("buBaseDir", ".")),
39  directorBu_(pset.getUntrackedParameter<bool> ("directorIsBu", false)),
40  run_(pset.getUntrackedParameter<unsigned int> ("runNumber",0)),
41  outputAdler32Recheck_(pset.getUntrackedParameter<bool>("outputAdler32Recheck",false)),
42  requireTSPSet_(pset.getUntrackedParameter<bool>("requireTransfersPSet",false)),
43  selectedTransferMode_(pset.getUntrackedParameter<std::string>("selectedTransferMode","")),
44  hltSourceDirectory_(pset.getUntrackedParameter<std::string>("hltSourceDirectory","")),
45  fuLockPollInterval_(pset.getUntrackedParameter<unsigned int>("fuLockPollInterval",2000)),
46  mergeTypePset_(pset.getUntrackedParameter<std::string>("mergeTypePset","")),
47  hostname_(""),
48  bu_readlock_fd_(-1),
49  bu_writelock_fd_(-1),
50  fu_readwritelock_fd_(-1),
51  fulocal_rwlock_fd_(-1),
52  fulocal_rwlock_fd2_(-1),
53  bu_w_lock_stream(nullptr),
54  bu_r_lock_stream(nullptr),
55  fu_rw_lock_stream(nullptr),
56  dirManager_(base_dir_),
57  previousFileSize_(0),
58  bu_w_flk( make_flock( F_WRLCK, SEEK_SET, 0, 0, 0 )),
59  bu_r_flk( make_flock( F_RDLCK, SEEK_SET, 0, 0, 0 )),
60  bu_w_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, 0 )),
61  bu_r_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, 0 )),
62  fu_rw_flk( make_flock ( F_WRLCK, SEEK_SET, 0, 0, getpid() )),
63  fu_rw_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() ))
64  {
65 
71 
72  //save hostname for later
73  char hostname[33];
74  gethostname(hostname,32);
75  hostname_ = hostname;
76 
77  char * fuLockPollIntervalPtr = getenv("FFF_LOCKPOLLINTERVAL");
78  if (fuLockPollIntervalPtr) {
79  try {
80  fuLockPollInterval_=boost::lexical_cast<unsigned int>(std::string(fuLockPollIntervalPtr));
81  edm::LogInfo("EvFDaqDirector") << "Setting fu lock poll interval by environment string: " << fuLockPollInterval_ << " us";
82  }
83  catch( boost::bad_lexical_cast const& ) {
84  edm::LogWarning("EvFDaqDirector") << "Bad lexical cast in parsing: " << std::string(fuLockPollIntervalPtr);
85  }
86  }
87 
88  }
89 
91  {
92  std::stringstream ss;
93  ss << "run" << std::setfill('0') << std::setw(6) << run_;
94  run_string_ = ss.str();
96 
97  // check if base dir exists or create it accordingly
98  int retval = mkdir(base_dir_.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
99  if (retval != 0 && errno != EEXIST) {
100  throw cms::Exception("DaqDirector") << " Error checking for base dir -: "
101  << base_dir_ << " mkdir error:" << strerror(errno);
102  }
103 
104  //create run dir in base dir
105  umask(0);
106  retval = mkdir(run_dir_.c_str(),
107  S_IRWXU | S_IRWXG | S_IROTH | S_IRWXO | S_IXOTH);
108  if (retval != 0 && errno != EEXIST) {
109  throw cms::Exception("DaqDirector") << " Error creating run dir -: "
110  << run_dir_ << " mkdir error:" << strerror(errno);
111  }
112 
113  //create fu-local.lock in run open dir
114  if (!directorBu_) {
115 
117  std::string fulocal_lock_ = getRunOpenDirPath() +"/fu-local.lock";
118  fulocal_rwlock_fd_ = open(fulocal_lock_.c_str(), O_RDWR | O_CREAT, S_IRWXU | S_IWGRP | S_IRGRP | S_IWOTH | S_IROTH);//O_RDWR?
119  if (fulocal_rwlock_fd_==-1)
120  throw cms::Exception("DaqDirector") << " Error creating/opening a local lock file -: " << fulocal_lock_.c_str() << " : " << strerror(errno);
121  chmod(fulocal_lock_.c_str(),0777);
122  fsync(fulocal_rwlock_fd_);
123  //open second fd for another input source thread
124  fulocal_rwlock_fd2_ = open(fulocal_lock_.c_str(), O_RDWR, S_IRWXU | S_IWGRP | S_IRGRP | S_IWOTH | S_IROTH);//O_RDWR?
125  if (fulocal_rwlock_fd2_==-1)
126  throw cms::Exception("DaqDirector") << " Error opening a local lock file -: " << fulocal_lock_.c_str() << " : " << strerror(errno);
127  }
128 
129  //bu_run_dir: for FU, for which the base dir is local and the BU is remote, it is expected to be there
130  //for BU, it is created at this point
131  if (directorBu_)
132  {
134  std::string bulockfile = bu_run_dir_ + "/bu.lock";
135  fulockfile_ = bu_run_dir_ + "/fu.lock";
136 
137  //make or find bu run dir
138  retval = mkdir(bu_run_dir_.c_str(),
139  S_IRWXU | S_IRWXG | S_IRWXO);
140  if (retval != 0 && errno != EEXIST) {
141  throw cms::Exception("DaqDirector")
142  << " Error creating bu run dir -: " << bu_run_dir_
143  << " mkdir error:" << strerror(errno) << "\n";
144  }
145  bu_run_open_dir_ = bu_run_dir_ + "/open";
146  retval = mkdir(bu_run_open_dir_.c_str(),
147  S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
148  if (retval != 0 && errno != EEXIST) {
149  throw cms::Exception("DaqDirector") << " Error creating bu run open dir -: "
150  << bu_run_open_dir_ << " mkdir error:" << strerror(errno)
151  << "\n";
152  }
153 
154  // the BU director does not need to know about the fu lock
155  bu_writelock_fd_ = open(bulockfile.c_str(),
156  O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU);
157  if (bu_writelock_fd_ == -1)
158  edm::LogWarning("EvFDaqDirector") << "problem with creating filedesc for buwritelock -: "
159  << strerror(errno);
160  else
161  edm::LogInfo("EvFDaqDirector") << "creating filedesc for buwritelock -: "
162  << bu_writelock_fd_;
163  bu_w_lock_stream = fdopen(bu_writelock_fd_, "w");
164  if (bu_w_lock_stream == nullptr)
165  edm::LogWarning("EvFDaqDirector")<< "Error creating write lock stream -: " << strerror(errno);
166 
167  // BU INITIALIZES LOCK FILE
168  // FU LOCK FILE OPEN
169  openFULockfileStream(true);
171  fflush(fu_rw_lock_stream);
172  close(fu_readwritelock_fd_);
173 
174  if (!hltSourceDirectory_.empty())
175  {
176  struct stat buf;
177  if (stat(hltSourceDirectory_.c_str(),&buf)==0) {
178  std::string hltdir=bu_run_dir_+"/hlt";
179  std::string tmphltdir=bu_run_open_dir_+"/hlt";
180  retval = mkdir(tmphltdir.c_str(),S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
181  if (retval != 0 && errno != EEXIST)
182  throw cms::Exception("DaqDirector")
183  << " Error creating bu run dir -: " << hltdir
184  << " mkdir error:" << strerror(errno) << "\n";
185 
186  boost::filesystem::copy_file(hltSourceDirectory_+"/HltConfig.py",tmphltdir+"/HltConfig.py");
187 
188  boost::filesystem::copy_file(hltSourceDirectory_+"/fffParameters.jsn",tmphltdir+"/fffParameters.jsn");
189 
190  boost::filesystem::rename(tmphltdir,hltdir);
191  }
192  else
193  throw cms::Exception("DaqDirector") << " Error looking for HLT configuration -: " << hltSourceDirectory_;
194  }
195  //else{}//no configuration specified
196  }
197  else
198  {
199  // for FU, check if bu base dir exists
200 
201  retval = mkdir(bu_base_dir_.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
202  if (retval != 0 && errno != EEXIST) {
203  throw cms::Exception("DaqDirector") << " Error checking for bu base dir -: "
204  << bu_base_dir_ << " mkdir error:" << strerror(errno) << "\n";
205  }
206 
208  fulockfile_ = bu_run_dir_ + "/fu.lock";
209  openFULockfileStream(false);
210  }
211 
212  pthread_mutex_init(&init_lock_,nullptr);
213 
214  stopFilePath_ = run_dir_+"/CMSSW_STOP";
215  std::stringstream sstp;
216  sstp << stopFilePath_ << "_pid" << getpid();
217  stopFilePathPid_ = sstp.str();
218  }
219 
221  {
222  if (fulocal_rwlock_fd_!=-1) {
223  unlockFULocal();
224  close(fulocal_rwlock_fd_);
225  }
226 
227  if (fulocal_rwlock_fd2_!=-1) {
228  unlockFULocal2();
229  close(fulocal_rwlock_fd2_);
230  }
231 
232  }
233 
234 
236 
237  initRun();
238 
239  nThreads_=bounds.maxNumberOfStreams();
240  nStreams_=bounds.maxNumberOfThreads();
241  }
242 
244  {
246  desc.setComment("Service used for file locking arbitration and for propagating information between other EvF components");
247  desc.addUntracked<std::string> ("baseDir", ".")->setComment("Local base directory for run output");
248  desc.addUntracked<std::string> ("buBaseDir", ".")->setComment("BU base ramdisk directory ");
249  desc.addUntracked<unsigned int> ("runNumber",0)->setComment("Run Number in ramdisk to open");
250  desc.addUntracked<bool>("outputAdler32Recheck",false)->setComment("Check Adler32 of per-process output files while micro-merging");
251  desc.addUntracked<bool>("requireTransfersPSet",false)->setComment("Require complete transferSystem PSet in the process configuration");
252  desc.addUntracked<std::string>("selectedTransferMode","")->setComment("Selected transfer mode (choice in Lvl0 propagated as Python parameter");
253  desc.addUntracked<unsigned int>("fuLockPollInterval",2000)->setComment("Lock polling interval in microseconds for the input directory file lock");
254  desc.addUntracked<std::string>("mergingPset","")->setComment("Name of merging PSet to look for merging type definitions for streams");
255  desc.setAllowAnything();
256  descriptions.add("EvFDaqDirector", desc);
257  }
258 
260  edm::ProcessContext const& pc) {
262  checkMergeTypePSet(pc);
263  }
264 
265  void EvFDaqDirector::preBeginRun(edm::GlobalContext const& globalContext) {
266 
267  //assert(run_ == id.run());
268 
269  // check if the requested run is the latest one - issue a warning if it isn't
271  edm::LogWarning("EvFDaqDirector") << "WARNING - checking run dir -: "
272  << run_dir_ << ". This is not the highest run "
274  }
275  }
276 
277  void EvFDaqDirector::postEndRun(edm::GlobalContext const& globalContext) {
278  close(bu_readlock_fd_);
279  close(bu_writelock_fd_);
280  if (directorBu_) {
281  std::string filename = bu_run_dir_ + "/bu.lock";
282  removeFile(filename);
283  }
284  }
285 
287  {
288  //delete all files belonging to just closed lumi
289  unsigned int ls = globalContext.luminosityBlockID().luminosityBlock();
291  edm::LogWarning("EvFDaqDirector") << " Handles to check for files to delete were not set by the input source...";
292  return;
293  }
294 
295  std::unique_lock<std::mutex> lkw(*fileDeleteLockPtr_);
296  auto it = filesToDeletePtr_->begin();
297  while (it!=filesToDeletePtr_->end()) {
298  if (it->second->lumi_ == ls) {
299  const boost::filesystem::path filePath(it->second->fileName_);
300  LogDebug("EvFDaqDirector") << "Deleting input file -:" << it->second->fileName_;
301  try {
302  //rarely this fails but file gets deleted
303  boost::filesystem::remove(filePath);
304  }
305  catch (const boost::filesystem::filesystem_error& ex)
306  {
307  edm::LogError("EvFDaqDirector") << " - deleteFile BOOST FILESYSTEM ERROR CAUGHT -: " << ex.what() << ". Trying again.";
308  usleep(10000);
309  try {
310  boost::filesystem::remove(filePath);
311  }
312  catch (const boost::filesystem::filesystem_error&) {/*file gets deleted first time but exception is still thrown*/}
313  }
314  catch (std::exception& ex)
315  {
316  edm::LogError("EvFDaqDirector") << " - deleteFile std::exception CAUGHT -: " << ex.what() << ". Trying again.";
317  usleep(10000);
318  try {
319  boost::filesystem::remove(filePath);
320  } catch (std::exception&) {/*file gets deleted first time but exception is still thrown*/}
321  }
322 
323  delete it->second;
324  it = filesToDeletePtr_->erase(it);
325  }
326  else it++;
327  }
328  }
329 
330  std::string EvFDaqDirector::getInputJsonFilePath(const unsigned int ls, const unsigned int index) const {
331  return bu_run_dir_ + "/" + fffnaming::inputJsonFileName(run_,ls,index);
332  }
333 
334  std::string EvFDaqDirector::getRawFilePath(const unsigned int ls, const unsigned int index) const {
335  return bu_run_dir_ + "/" + fffnaming::inputRawFileName(run_,ls,index);
336  }
337 
338  std::string EvFDaqDirector::getOpenRawFilePath(const unsigned int ls, const unsigned int index) const {
339  return bu_run_dir_ + "/open/" + fffnaming::inputRawFileName(run_,ls,index);
340  }
341 
342  std::string EvFDaqDirector::getOpenInputJsonFilePath(const unsigned int ls, const unsigned int index) const {
343  return bu_run_dir_ + "/open/" + fffnaming::inputJsonFileName(run_,ls,index);
344  }
345 
346  std::string EvFDaqDirector::getDatFilePath(const unsigned int ls, std::string const& stream) const {
347  return run_dir_ + "/" + fffnaming::streamerDataFileNameWithPid(run_,ls,stream);
348  }
349 
350  std::string EvFDaqDirector::getOpenDatFilePath(const unsigned int ls, std::string const& stream) const {
351  return run_dir_ + "/open/" + fffnaming::streamerDataFileNameWithPid(run_,ls,stream);
352  }
353 
354  std::string EvFDaqDirector::getOpenOutputJsonFilePath(const unsigned int ls, std::string const& stream) const {
355  return run_dir_ + "/open/" + fffnaming::streamerJsonFileNameWithPid(run_,ls,stream);
356  }
357 
358  std::string EvFDaqDirector::getOutputJsonFilePath(const unsigned int ls, std::string const& stream) const {
359  return run_dir_ + "/" + fffnaming::streamerJsonFileNameWithPid(run_,ls,stream);
360  }
361 
362  std::string EvFDaqDirector::getMergedDatFilePath(const unsigned int ls, std::string const& stream) const {
364  }
365 
366  std::string EvFDaqDirector::getMergedDatChecksumFilePath(const unsigned int ls, std::string const& stream) const {
368  }
369 
371  return run_dir_ + "/open/" + fffnaming::initFileNameWithPid(run_,0,stream);
372  }
373 
375  return run_dir_ + "/" + fffnaming::initFileNameWithPid(run_,0,stream);
376  }
377 
379  return run_dir_ + "/open/" + fffnaming::protocolBufferHistogramFileNameWithPid(run_,ls,stream);
380  }
381 
384  }
385 
388  }
389 
390  std::string EvFDaqDirector::getOpenRootHistogramFilePath(const unsigned int ls, std::string const& stream) const {
391  return run_dir_ + "/open/" + fffnaming::rootHistogramFileNameWithPid(run_,ls,stream);
392  }
393 
394  std::string EvFDaqDirector::getRootHistogramFilePath(const unsigned int ls, std::string const& stream) const {
395  return run_dir_ + "/" + fffnaming::rootHistogramFileNameWithPid(run_,ls,stream);
396  }
397 
400  }
401 
403  return bu_run_dir_ + "/" + fffnaming::eolsFileName(run_,ls);
404  }
405 
407  return run_dir_ + "/" + fffnaming::eolsFileName(run_,ls);
408  }
409 
411  return run_dir_ + "/" + fffnaming::bolsFileName(run_,ls);
412  }
413 
415  return bu_run_dir_ + "/" + fffnaming::eorFileName(run_);
416  }
417 
418 
420  return run_dir_ + "/" + fffnaming::eorFileName(run_);
421  }
422 
424  int retval = remove(filename.c_str());
425  if (retval != 0)
426  edm::LogError("EvFDaqDirector") << "Could not remove used file -: " << filename << ". error = "
427  << strerror(errno);
428  }
429 
430  void EvFDaqDirector::removeFile(unsigned int ls, unsigned int index) {
431  removeFile(getRawFilePath(ls,index));
432  }
433 
434  EvFDaqDirector::FileStatus EvFDaqDirector::updateFuLock(unsigned int& ls, std::string& nextFile, uint32_t& fsize, uint64_t& lockWaitTime) {
435  EvFDaqDirector::FileStatus fileStatus = noFile;
436 
437  int retval = -1;
438  int lock_attempts = 0;
439  long total_lock_attempts = 0;
440 
441  struct stat buf;
442  int stopFileLS = -1;
443  int stopFileCheck = stat(stopFilePath_.c_str(),&buf);
444  int stopFilePidCheck = stat(stopFilePathPid_.c_str(),&buf);
445  if (stopFileCheck==0 || stopFilePidCheck==0) {
446  if (stopFileCheck==0)
447  stopFileLS = readLastLSEntry(stopFilePath_);
448  else
449  stopFileLS = 1;//stop without drain if only pid is stopped
450  if (!stop_ls_override_) {
451  //if lumisection is higher than in stop file, should quit at next from current
452  if (stopFileLS>=0 && (int)ls>=stopFileLS) stopFileLS = stop_ls_override_ = ls;
453  }
454  else stopFileLS = stop_ls_override_;
455  edm::LogWarning("EvFDaqDirector") << "Detected stop request from hltd. Ending run for this process after LS -: " << stopFileLS;
456  //return runEnded;
457  }
458  else //if file was removed before reaching stop condition, reset this
459  stop_ls_override_ = 0;
460 
461  timeval ts_lockbegin;
462  gettimeofday(&ts_lockbegin,nullptr);
463 
464  while (retval==-1) {
465  retval = fcntl(fu_readwritelock_fd_, F_SETLK, &fu_rw_flk);
466  if (retval==-1) usleep(fuLockPollInterval_);
467  else continue;
468 
469  lock_attempts+=fuLockPollInterval_;
470  total_lock_attempts+=fuLockPollInterval_;
471  if (lock_attempts>5000000 || errno==116) {
472  if (errno==116)
473  edm::LogWarning("EvFDaqDirector") << "Stale lock file handle. Checking if run directory and fu.lock file are present" << std::endl;
474  else
475  edm::LogWarning("EvFDaqDirector") << "Unable to obtain a lock for 5 seconds. Checking if run directory and fu.lock file are present -: errno "
476  << errno <<":"<< strerror(errno) << std::endl;
477 
478 
479  if (stat(getEoLSFilePathOnFU(ls).c_str(),&buf)==0) {
480  edm::LogWarning("EvFDaqDirector") << "Detected local EoLS for lumisection "<< ls ;
481  ls++;
482  return noFile;
483  }
484 
485  if (stat(bu_run_dir_.c_str(), &buf)!=0) return runEnded;
486  if (stat(fulockfile_.c_str(), &buf)!=0) return runEnded;
487 
488  lock_attempts=0;
489  }
490  if (total_lock_attempts>5*60000000) {
491  edm::LogError("EvFDaqDirector") << "Unable to obtain a lock for 5 minutes. Stopping polling activity.";
492  return runAbort;
493  }
494  }
495 
496  timeval ts_lockend;
497  gettimeofday(&ts_lockend,nullptr);
498  long deltat = (ts_lockend.tv_usec-ts_lockbegin.tv_usec) + (ts_lockend.tv_sec-ts_lockbegin.tv_sec)*1000000;
499  if (deltat>0.) lockWaitTime=deltat;
500 
501  if(retval!=0) return fileStatus;
502 
503 #ifdef DEBUG
504  timeval ts_lockend;
505  gettimeofday(&ts_lockend,0);
506 #endif
507 
508  //open another lock file FD after the lock using main fd has been acquired
509  int fu_readwritelock_fd2 = open(fulockfile_.c_str(), O_RDWR, S_IRWXU);
510  if (fu_readwritelock_fd2 == -1)
511  edm::LogError("EvFDaqDirector") << "problem with creating filedesc for fuwritelock -: " << fulockfile_
512  << " create. error:" << strerror(errno);
513 
514  FILE * fu_rw_lock_stream2 = fdopen(fu_readwritelock_fd2, "r+");
515 
516  // if the stream is readable
517  if (fu_rw_lock_stream2 != nullptr) {
518  unsigned int readLs, readIndex;
519  int check = 0;
520  // rewind the stream
521  check = fseek(fu_rw_lock_stream2, 0, SEEK_SET);
522  // if rewinded ok
523  if (check == 0) {
524  // read its' values
525  fscanf(fu_rw_lock_stream2, "%u %u", &readLs, &readIndex);
526  edm::LogInfo("EvFDaqDirector") << "Read fu.lock file file -: " << readLs << ":" << readIndex;
527 
528  unsigned int currentLs = readLs;
529  bool bumpedOk = false;
530  //if next lumisection in a lock file is not +1 wrt. source, cycle through the next empty one, unless initial lumi not yet set
531  //no lock file write in this case
532  if (ls && ls+1 < currentLs) ls++;
533  else {
534  // try to bump (look for new index or EoLS file)
535  bumpedOk = bumpFile(readLs, readIndex, nextFile, fsize, stopFileLS);
536  //avoid 2 lumisections jump
537  if (ls && readLs>currentLs && currentLs > ls) {
538  ls++;
539  readLs=currentLs=ls;
540  readIndex=0;
541  bumpedOk=false;
542  //no write to lock file
543  }
544  else {
545  if (ls==0 && readLs>currentLs) {
546  //make sure to intialize always with LS found in the lock file, with possibility of grabbing index file immediately
547  //in this case there is no new file in the same LS
548  readLs=currentLs;
549  readIndex=0;
550  bumpedOk=false;
551  //no write to lock file
552  }
553  //update return LS value
554  ls = readLs;
555  }
556  }
557  if (bumpedOk) {
558  // there is a new index file to grab, lock file needs to be updated
559  check = fseek(fu_rw_lock_stream2, 0, SEEK_SET);
560  if (check == 0) {
561  ftruncate(fu_readwritelock_fd2, 0);
562  // write next index in the file, which is the file the next process should take
563  fprintf(fu_rw_lock_stream2, "%u %u", readLs, readIndex + 1);
564  fflush(fu_rw_lock_stream2);
565  fsync(fu_readwritelock_fd2);
566  fileStatus = newFile;
567  LogDebug("EvFDaqDirector") << "Written to file -: " << readLs << ":" << readIndex + 1;
568  }
569  else {
570  throw cms::Exception("EvFDaqDirector") << "seek on fu read/write lock for updating failed with error " << strerror(errno);
571  }
572  }
573  else if (currentLs < readLs) {
574  //there is no new file in next LS (yet), but lock file can be updated to the next LS
575  check = fseek(fu_rw_lock_stream2, 0, SEEK_SET);
576  if (check == 0) {
577  ftruncate(fu_readwritelock_fd2, 0);
578  // in this case LS was bumped, but no new file. Thus readIndex is 0 (set by bumpFile)
579  fprintf(fu_rw_lock_stream2, "%u %u", readLs, readIndex);
580  fflush(fu_rw_lock_stream2);
581  fsync(fu_readwritelock_fd2);
582  LogDebug("EvFDaqDirector") << "Written to file -: " << readLs << ":" << readIndex;
583  }
584  else {
585  throw cms::Exception("EvFDaqDirector") << "seek on fu read/write lock for updating failed with error " << strerror(errno);
586  }
587  }
588  } else {
589  edm::LogError("EvFDaqDirector") << "seek on fu read/write lock for reading failed with error " << strerror(errno);
590  }
591  } else {
592  edm::LogError("EvFDaqDirector") << "fu read/write lock stream is invalid " << strerror(errno);
593  }
594  fclose(fu_rw_lock_stream2);// = fdopen(fu_readwritelock_fd2, "r+");
595 
596 #ifdef DEBUG
597  timeval ts_preunlock;
598  gettimeofday(&ts_preunlock,0);
599  int locked_period_int = ts_preunlock.tv_sec - ts_lockend.tv_sec;
600  double locked_period=locked_period_int+double(ts_preunlock.tv_usec - ts_lockend.tv_usec)/1000000;
601 #endif
602 
603  //if new json is present, lock file which FedRawDataInputSource will later unlock
604  if (fileStatus==newFile) lockFULocal();
605 
606  //release lock at this point
607  int retvalu=-1;
608  retvalu=fcntl(fu_readwritelock_fd_, F_SETLKW, &fu_rw_fulk);
609  if (retvalu==-1) edm::LogError("EvFDaqDirector") << "Error unlocking the fu.lock " << strerror(errno);
610 
611 #ifdef DEBUG
612  edm::LogDebug("EvFDaqDirector") << "Waited during lock -: " << locked_period << " seconds";
613 #endif
614 
615  if ( fileStatus == noFile ) {
616  struct stat buf;
617  //edm::LogInfo("EvFDaqDirector") << " looking for EoR file: " << getEoRFilePath().c_str();
618  if ( stat(getEoRFilePath().c_str(), &buf) == 0 || stat(bu_run_dir_.c_str(), &buf)!=0)
619  fileStatus = runEnded;
620  if (stopFileLS>=0 && (int)ls > stopFileLS) {
621  edm::LogInfo("EvFDaqDirector") << "Reached maximum lumisection set by hltd";
622  fileStatus = runEnded;
623  }
624  }
625  return fileStatus;
626  }
627 
629 
630  boost::filesystem::ifstream ij(BUEoLSFile);
631  Json::Value deserializeRoot;
633 
634  if (!reader.parse(ij, deserializeRoot)) {
635  edm::LogError("EvFDaqDirector") << "Cannot deserialize input JSON file -:" << BUEoLSFile;
636  return -1;
637  }
638 
640  DataPoint dp;
641  dp.deserialize(deserializeRoot);
642 
643  //read definition
644  if (readEolsDefinition_) {
645  //std::string def = boost::algorithm::trim(dp.getDefinition());
647  if (def.empty()) readEolsDefinition_=false;
648  while (!def.empty()) {
649  std::string fullpath;
650  if (def.find('/')==0)
651  fullpath = def;
652  else
653  fullpath = bu_run_dir_+'/'+def;
654  struct stat buf;
655  if (stat(fullpath.c_str(), &buf) == 0) {
656  DataPointDefinition eolsDpd;
657  std::string defLabel = "legend";
658  DataPointDefinition::getDataPointDefinitionFor(fullpath, &eolsDpd,&defLabel);
659  if (eolsDpd.getNames().empty()) {
660  //try with "data" label if "legend" format is not used
661  eolsDpd = DataPointDefinition();
662  defLabel="data";
663  DataPointDefinition::getDataPointDefinitionFor(fullpath, &eolsDpd,&defLabel);
664  }
665  for (unsigned int i=0;i<eolsDpd.getNames().size();i++)
666  if (eolsDpd.getNames().at(i)=="NFiles")
668  readEolsDefinition_=false;
669  break;
670  }
671  //check if we can still find definition
672  if (def.size()<=1 || def.find('/')==std::string::npos) {
673  readEolsDefinition_=false;
674  break;
675  }
676  def = def.substr(def.find('/')+1);
677  }
678  }
679 
680  if (dp.getData().size()>eolsNFilesIndex_)
681  data = dp.getData()[eolsNFilesIndex_];
682  else {
683  edm::LogError("EvFDaqDirector") << " error reading number of files from BU JSON -: " << BUEoLSFile;
684  return -1;
685  }
686  return boost::lexical_cast<int>(data);
687  }
688 
689  bool EvFDaqDirector::bumpFile(unsigned int& ls, unsigned int& index, std::string& nextFile, uint32_t& fsize, int maxLS) {
690 
691  if (previousFileSize_ != 0) {
692  if (!fms_) {
694  }
696  previousFileSize_ = 0;
697  }
698 
699  //reached limit
700  if (maxLS>=0 && ls > (unsigned int)maxLS) return false;
701 
702  struct stat buf;
703  std::stringstream ss;
704  unsigned int nextIndex = index;
705  nextIndex++;
706 
707  // 1. Check suggested file
708  nextFile = getInputJsonFilePath(ls,index);
709  if (stat(nextFile.c_str(), &buf) == 0) {
710 
711  previousFileSize_ = buf.st_size;
712  fsize = buf.st_size;
713  return true;
714  }
715  // 2. No file -> lumi ended? (and how many?)
716  else {
717  std::string BUEoLSFile = getEoLSFilePathOnBU(ls);
718  bool eolFound = (stat(BUEoLSFile.c_str(), &buf) == 0);
719  while (eolFound) {
720 
721  // recheck that no raw file appeared in the meantime
722  if (stat(nextFile.c_str(), &buf) == 0) {
723  previousFileSize_ = buf.st_size;
724  fsize = buf.st_size;
725  return true;
726  }
727 
728  int indexFilesInLS = getNFilesFromEoLS(BUEoLSFile);
729  if (indexFilesInLS < 0)
730  //parsing failed
731  return false;
732  else {
733  //check index
734  if ((int)index<indexFilesInLS) {
735  //we have 2 files, and check for 1 failed... retry (2 will never be here)
736  edm::LogError("EvFDaqDirector") << "Potential miss of index file in LS -: " << ls << ". Missing "
737  << nextFile << " because " << indexFilesInLS-1 << " is the highest index expected. Will not update fu.lock file";
738  return false;
739  }
740  }
741  // this lumi ended, check for files
742  ++ls;
743  index = 0;
744 
745  //reached limit
746  if (maxLS>=0 && ls > (unsigned int)maxLS) return false;
747 
748  nextFile = getInputJsonFilePath(ls,0);
749  if (stat(nextFile.c_str(), &buf) == 0) {
750  // a new file was found at new lumisection, index 0
751  previousFileSize_ = buf.st_size;
752  fsize = buf.st_size;
753  return true;
754  }
755  else {
756  //change of policy: we need to cycle through each LS
757  return false;
758  }
759  BUEoLSFile = getEoLSFilePathOnBU(ls);
760  eolFound = (stat(BUEoLSFile.c_str(), &buf) == 0);
761  }
762  }
763  // no new file found
764  return false;
765  }
766 
768  if (fu_rw_lock_stream == nullptr)
769  edm::LogError("EvFDaqDirector") << "Error creating fu read/write lock stream "
770  << strerror(errno);
771  else {
772  edm::LogInfo("EvFDaqDirector") << "Initializing FU LOCK FILE";
773  unsigned int readLs = 1, readIndex = 0;
774  fprintf(fu_rw_lock_stream, "%u %u", readLs, readIndex);
775  }
776  }
777 
779  if (create) {
780  fu_readwritelock_fd_ = open(fulockfile_.c_str(), O_RDWR | O_CREAT,
781  S_IRWXU | S_IWGRP | S_IRGRP | S_IWOTH | S_IROTH);
782  chmod(fulockfile_.c_str(),0766);
783  } else {
784  fu_readwritelock_fd_ = open(fulockfile_.c_str(), O_RDWR, S_IRWXU);
785  }
786  if (fu_readwritelock_fd_ == -1)
787  edm::LogError("EvFDaqDirector") << "problem with creating filedesc for fuwritelock -: " << fulockfile_
788  << " create:" << create << " error:" << strerror(errno);
789  else
790  LogDebug("EvFDaqDirector") << "creating filedesc for fureadwritelock -: "
792 
793  fu_rw_lock_stream = fdopen(fu_readwritelock_fd_, "r+");
794  if (fu_rw_lock_stream == nullptr)
795  edm::LogError("EvFDaqDirector") << "problem with opening fuwritelock file stream -: " << strerror(errno);
796 
797  }
798 
800  pthread_mutex_lock(&init_lock_);
801  }
802 
804  pthread_mutex_unlock(&init_lock_);
805  }
806 
808  //fcntl(fulocal_rwlock_fd_, F_SETLKW, &fulocal_rw_flk);
809  flock(fulocal_rwlock_fd_,LOCK_SH);
810  }
811 
813  //fcntl(fulocal_rwlock_fd_, F_SETLKW, &fulocal_rw_fulk);
814  flock(fulocal_rwlock_fd_,LOCK_UN);
815  }
816 
817 
819  //fcntl(fulocal_rwlock_fd2_, F_SETLKW, &fulocal_rw_flk2);
820  flock(fulocal_rwlock_fd2_,LOCK_EX);
821  }
822 
824  //fcntl(fulocal_rwlock_fd2_, F_SETLKW, &fulocal_rw_fulk2);
825  flock(fulocal_rwlock_fd2_,LOCK_UN);
826  }
827 
828 
830  // create open dir if not already there
831 
833  if (!boost::filesystem::is_directory(openPath)) {
834  LogDebug("EvFDaqDirector") << "<open> FU dir not found. Creating... -:" << openPath.string();
835  boost::filesystem::create_directories(openPath);
836  }
837  }
838 
839 
841 
842  boost::filesystem::ifstream ij(file);
843  Json::Value deserializeRoot;
845 
846  if (!reader.parse(ij, deserializeRoot)) {
847  edm::LogError("EvFDaqDirector") << "Cannot deserialize input JSON file -:" << file;
848  return -1;
849  }
850 
851  int ret = deserializeRoot.get("lastLS","").asInt();
852  return ret;
853 
854  }
855 
856  //if transferSystem PSet is present in the menu, we require it to be complete and consistent for all specified streams
858  {
859  if(transferSystemJson_) return;
860 
861  transferSystemJson_.reset(new Json::Value);
863  if (topPset.existsAs<edm::ParameterSet>("transferSystem",true))
864  {
865  const edm::ParameterSet& tsPset(topPset.getParameterSet("transferSystem"));
866 
867  Json::Value destinationsVal(Json::arrayValue);
868  std::vector<std::string> destinations = tsPset.getParameter<std::vector<std::string>>("destinations");
869  for (auto & dest: destinations) destinationsVal.append(dest);
870  (*transferSystemJson_)["destinations"]=destinationsVal;
871 
872  Json::Value modesVal(Json::arrayValue);
873  std::vector<std::string> modes = tsPset.getParameter< std::vector<std::string> >("transferModes");
874  for (auto & mode: modes) modesVal.append(mode);
875  (*transferSystemJson_)["transferModes"]=modesVal;
876 
877  for (auto psKeyItr =tsPset.psetTable().begin();psKeyItr!=tsPset.psetTable().end(); ++ psKeyItr) {
878  if (psKeyItr->first!="destinations" && psKeyItr->first!="transferModes") {
879  const edm::ParameterSet & streamDef = tsPset.getParameterSet(psKeyItr->first);
880  Json::Value streamVal;
881  for (auto & mode : modes) {
882  //validation
883  if (!streamDef.existsAs<std::vector<std::string>>(mode,true))
884  throw cms::Exception("EvFDaqDirector") << " Missing transfer system specification for -:" << psKeyItr->first << " (transferMode " << mode << ")";
885  std::vector<std::string> streamDestinations = streamDef.getParameter<std::vector<std::string>>(mode);
886 
887  Json::Value sDestsValue(Json::arrayValue);
888 
889  if (streamDestinations.empty())
890  throw cms::Exception("EvFDaqDirector") << " Missing transter system destination(s) for -: "<< psKeyItr->first << ", mode:" << mode;
891 
892  for (auto & sdest:streamDestinations) {
893  bool sDestValid=false;
894  sDestsValue.append(sdest);
895  for (auto & dest: destinations) {
896  if (dest==sdest) sDestValid=true;
897  }
898  if (!sDestValid)
899  throw cms::Exception("EvFDaqDirector") << " Invalid transter system destination specified for -: "<< psKeyItr->first << ", mode:" << mode << ", dest:"<<sdest;
900  }
901  streamVal[mode]=sDestsValue;
902  }
903  (*transferSystemJson_)[psKeyItr->first] = streamVal;
904  }
905  }
906  }
907  else {
908  if (requireTSPSet_)
909  throw cms::Exception("EvFDaqDirector") << "transferSystem PSet not found";
910  }
911  }
912 
914  {
915  std::string streamRequestName;
916  if (transferSystemJson_->isMember(stream.c_str()))
917  streamRequestName = stream;
918  else {
919  std::stringstream msg;
920  msg << "Transfer system mode definitions missing for -: " << stream;
921  if (requireTSPSet_)
922  throw cms::Exception("EvFDaqDirector") << msg.str();
923  else {
924  edm::LogWarning("EvFDaqDirector") << msg.str() << " (permissive mode)";
925  return std::string("Failsafe");
926  }
927  }
928  //return empty if strict check parameter is not on
929  if (!requireTSPSet_ && (selectedTransferMode_.empty() || selectedTransferMode_=="null")) {
930  edm::LogWarning("EvFDaqDirector") << "Selected mode string is not provided as DaqDirector parameter."
931  << "Switch on requireTSPSet parameter to enforce this requirement. Setting mode to empty string.";
932  return std::string("Failsafe");
933  }
934  if (requireTSPSet_ && (selectedTransferMode_.empty() || selectedTransferMode_=="null")) {
935  throw cms::Exception("EvFDaqDirector") << "Selected mode string is not provided as DaqDirector parameter.";
936  }
937  //check if stream has properly listed transfer stream
938  if (!transferSystemJson_->get(streamRequestName, "").isMember(selectedTransferMode_.c_str()))
939  {
940  std::stringstream msg;
941  msg << "Selected transfer mode " << selectedTransferMode_ << " is not specified for stream " << streamRequestName;
942  if (requireTSPSet_)
943  throw cms::Exception("EvFDaqDirector") << msg.str();
944  else
945  edm::LogWarning("EvFDaqDirector") << msg.str() << " (permissive mode)";
946  return std::string("Failsafe");
947  }
948  Json::Value destsVec = transferSystemJson_->get(streamRequestName, "").get(selectedTransferMode_,"");
949 
950  //flatten string json::Array into CSV std::string
951  std::string ret;
952  for (Json::Value::iterator it = destsVec.begin(); it!=destsVec.end(); it++)
953  {
954  if (!ret.empty()) ret +=",";
955  ret+=(*it).asString();
956  }
957  return ret;
958  }
959 
961  {
962  if (mergeTypePset_.empty()) return;
963  if(!mergeTypeMap_.empty()) return;
965  if (topPset.existsAs<edm::ParameterSet>(mergeTypePset_,true))
966  {
967  const edm::ParameterSet& tsPset(topPset.getParameterSet(mergeTypePset_));
968  for (std::string pname : tsPset.getParameterNames()) {
969  std::string streamType = tsPset.getParameter<std::string>(pname);
970  tbb::concurrent_hash_map<std::string,std::string>::accessor ac;
971  mergeTypeMap_.insert(ac,pname);
972  ac->second = streamType;
973  ac.release();
974  }
975  }
976  }
977 
979  {
980  tbb::concurrent_hash_map<std::string,std::string>::const_accessor search_ac;
981  if (mergeTypeMap_.find(search_ac,stream))
982  return search_ac->second;
983 
984  edm::LogInfo("EvFDaqDirector") << " No merging type specified for stream " << stream << ". Using default value";
985  std::string defaultName = MergeTypeNames_[defaultType];
986  tbb::concurrent_hash_map<std::string,std::string>::accessor ac;
987  mergeTypeMap_.insert(ac,stream);
988  ac->second = defaultName;
989  ac.release();
990  return defaultName;
991  }
992 
994  std::string proc_flag = run_dir_ + "/processing";
995  int proc_flag_fd = open(proc_flag.c_str(), O_RDWR | O_CREAT, S_IRWXU | S_IWGRP | S_IRGRP | S_IWOTH | S_IROTH);
996  close(proc_flag_fd);
997  }
998 
999  struct flock EvFDaqDirector::make_flock(short type, short whence, off_t start, off_t len, pid_t pid)
1000  {
1001 #ifdef __APPLE__
1002  return {start, len, pid, type, whence};
1003 #else
1004  return {type, whence, start, len, pid};
1005 #endif
1006  }
1007 
1008 }
1009 
#define LogDebug(id)
unsigned int nThreads_
type
Definition: HCALResponse.h:21
unsigned int maxNumberOfThreads() const
Definition: SystemBounds.h:46
T getParameter(std::string const &) const
std::string getStreamDestinations(std::string const &stream) const
Value get(UInt index, const Value &defaultValue) const
std::vector< std::string > & getData()
Definition: DataPoint.h:58
struct flock fu_rw_flk
static struct flock make_flock(short type, short whence, off_t start, off_t len, pid_t pid)
std::string run_string_
std::string protocolBufferHistogramFileNameWithInstance(const unsigned int run, const unsigned int ls, std::string const &stream, std::string const &instance)
std::string bolsFileName(const unsigned int run, const unsigned int ls)
std::string streamerDataChecksumFileNameWithInstance(const unsigned int run, const unsigned int ls, std::string const &stream, std::string const &instance)
std::string getMergedProtocolBufferHistogramFilePath(const unsigned int ls, std::string const &stream) const
void watchPreallocate(Preallocate::slot_type const &iSlot)
const_iterator begin() const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:186
std::list< std::pair< int, InputFile * > > * filesToDeletePtr_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::string fulockfile_
def create(alignables, pedeDump, additionalData, outputFile, config)
std::string getMergedDatChecksumFilePath(const unsigned int ls, std::string const &stream) const
std::shared_ptr< Json::Value > transferSystemJson_
void setAllowAnything()
allow any parameter label/value pairs
void accumulateFileSize(unsigned int lumi, unsigned long fileSize)
void watchPreGlobalEndLumi(PreGlobalEndLumi::slot_type const &iSlot)
std::string getInitFilePath(std::string const &stream) const
std::string getMergedRootHistogramFilePath(const unsigned int ls, std::string const &stream) const
std::string inputRawFileName(const unsigned int run, const unsigned int ls, const unsigned int index)
ParameterSet const & getParameterSet(ParameterSetID const &id)
pthread_mutex_t init_lock_
LuminosityBlockID const & luminosityBlockID() const
Definition: GlobalContext.h:52
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 getOpenInitFilePath(std::string const &stream) const
std::string getOpenRawFilePath(const unsigned int ls, const unsigned int index) const
Value & append(const Value &value)
Append value to array at the end.
void createProcessingNotificationMaybe() const
bool parse(const std::string &document, Value &root, bool collectComments=true)
Read a Value from a JSON document.
Represents a JSON value.
Definition: value.h:111
std::string getEoLSFilePathOnBU(const unsigned int ls) const
#define nullptr
std::string getEoRFilePath() const
unsigned long previousFileSize_
ParameterSetID const & parameterSetID() const
struct flock fu_rw_fulk
unsigned int maxNumberOfStreams() const
Definition: SystemBounds.h:43
std::string hltSourceDirectory_
std::string getOpenProtocolBufferHistogramFilePath(const unsigned int ls, std::string const &stream) const
void setComment(std::string const &value)
std::mutex * fileDeleteLockPtr_
tbb::concurrent_hash_map< std::string, std::string > mergeTypeMap_
std::string mergeTypePset_
std::string streamerDataFileNameWithInstance(const unsigned int run, const unsigned int ls, std::string const &stream, std::string const &instance)
def chmod(path, mode)
Definition: eostools.py:293
std::string getMergedDatFilePath(const unsigned int ls, std::string const &stream) const
std::string getStreamMergeType(std::string const &stream, MergeType defaultType)
FileStatus updateFuLock(unsigned int &ls, std::string &nextFile, uint32_t &fsize, uint64_t &lockWaitTime)
std::string getOpenOutputJsonFilePath(const unsigned int ls, std::string const &stream) const
std::string getOpenRootHistogramFilePath(const unsigned int ls, std::string const &stream) const
std::string getRootHistogramFilePath(const unsigned int ls, std::string const &stream) const
std::string getOpenDatFilePath(const unsigned int ls, std::string const &stream) const
std::string inputJsonFileName(const unsigned int run, const unsigned int ls, const unsigned int index)
std::string stopFilePath_
std::string bu_base_dir_
void removeFile(unsigned int ls, unsigned int index)
unsigned int stop_ls_override_
std::string selectedTransferMode_
std::string streamerJsonFileNameWithPid(const unsigned int run, const unsigned int ls, std::string const &stream)
std::string getOpenInputJsonFilePath(const unsigned int ls, const unsigned int index) const
std::string eorFileName(const unsigned int run)
int readLastLSEntry(std::string const &file)
std::string stopFilePathPid_
unsigned int eolsNFilesIndex_
std::string getDatFilePath(const unsigned int ls, std::string const &stream) const
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
std::string getOutputJsonFilePath(const unsigned int ls, std::string const &stream) const
void openFULockfileStream(bool create)
int getNFilesFromEoLS(std::string BUEoLSFile)
def ls(path, rec=False)
Definition: eostools.py:348
void preBeginRun(edm::GlobalContext const &globalContext)
std::string rootHistogramFileNameWithPid(const unsigned int run, const unsigned int ls, std::string const &stream)
Int asInt() const
std::string initFileNameWithPid(const unsigned int run, const unsigned int ls, std::string const &stream)
unsigned long long uint64_t
Definition: Time.h:15
void checkMergeTypePSet(edm::ProcessContext const &pc)
ParameterSet const & getParameterSet(std::string const &) const
void preGlobalEndLumi(edm::GlobalContext const &globalContext)
auto dp
Definition: deltaR.h:22
void deserialize(Json::Value &root) override
Definition: DataPoint.cc:56
void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const &iSlot)
LuminosityBlockNumber_t luminosityBlock() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::string & getDefinition()
Definition: DataPoint.h:59
def remove(d, key, TELL=False)
Definition: MatrixUtil.py:210
tuple msg
Definition: mps_check.py:277
evf::FastMonitoringService * fms_
void watchPreBeginJob(PreBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
std::string bu_run_dir_
std::string rootHistogramFileNameWithInstance(const unsigned int run, const unsigned int ls, std::string const &stream, std::string const &instance)
def mkdir(path)
Definition: eostools.py:250
std::string findHighestRunDir()
Definition: DirManager.cc:20
std::string getBoLSFilePathOnFU(const unsigned int ls) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void postEndRun(edm::GlobalContext const &globalContext)
Unserialize a JSON document into a Value.
Definition: reader.h:16
static const std::vector< std::string > MergeTypeNames_
const_iterator end() const
void checkTransferSystemPSet(edm::ProcessContext const &pc)
std::vector< std::string > const & getNames()
std::string getEoLSFilePathOnFU(const unsigned int ls) const
bool bumpFile(unsigned int &ls, unsigned int &index, std::string &nextFile, uint32_t &fsize, int maxLS)
void preallocate(edm::service::SystemBounds const &bounds)
Iterator for object and array value.
Definition: value.h:1007
std::string getInputJsonFilePath(const unsigned int ls, const unsigned int index) const
def check(config)
Definition: trackerTree.py:14
std::string getRunOpenDirPath() const
JetCorrectorParameters::Definitions def
Definition: classes.h:6
std::string protocolBufferHistogramFileNameWithPid(const unsigned int run, const unsigned int ls, std::string const &stream)
unsigned int fuLockPollInterval_
std::string eolsFileName(const unsigned int run, const unsigned int ls)
unsigned int nStreams_
std::string streamerDataFileNameWithPid(const unsigned int run, const unsigned int ls, std::string const &stream)
std::string getEoRFilePathOnFU() const
std::string bu_run_open_dir_
array value (ordered list)
Definition: value.h:31