CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
evf::EvFDaqDirector Class Reference

#include <EvFDaqDirector.h>

Public Member Functions

std::string & baseDir ()
 
std::string & buBaseDir ()
 
std::string & buBaseOpenDir ()
 
 EvFDaqDirector (const edm::ParameterSet &pset, edm::ActivityRegistry &reg)
 
std::string findCurrentRunDir ()
 
unsigned int findHighestRun ()
 
std::string findHighestRunDir ()
 
std::string findHighestRunDirStem ()
 
std::string & fuBaseDir ()
 
std::string getEoLSFilePathOnBU (const unsigned int ls) const
 
std::string getEoLSFilePathOnFU (const unsigned int ls) const
 
std::string getEoRFilePath () const
 
std::string getInitFilePath (std::string const &stream) const
 
std::string getJumpFilePath () const
 
unsigned int getJumpIndex () const
 
unsigned int getJumpLS () const
 
std::string getMergedDatFilePath (const unsigned int ls, std::string const &stream) const
 
std::string getOpenDatFilePath (const unsigned int ls, std::string const &stream) const
 
std::string getOpenRawFilePath (const unsigned int ls, const unsigned int index) const
 
std::string getOutputJsonFilePath (const unsigned int ls, std::string const &stream) const
 
std::string getPathForFU () const
 
std::string getRawFilePath (const unsigned int ls, const unsigned int index) const
 
unsigned int getRunNumber () const
 
bool getTestModeNoBuilderUnit ()
 
FILE * maybeCreateAndLockFileHeadForStream (unsigned int ls, std::string &stream)
 
std::string & monitorBaseDir ()
 
void postEndRun (edm::Run const &run, edm::EventSetup const &es)
 
void preBeginRun (edm::RunID const &id, edm::Timestamp const &ts)
 
int readBuLock ()
 
void removeFile (unsigned int ls, unsigned int index)
 
void removeFile (std::string)
 
std::string & smBaseDir ()
 
void tryInitializeFuLockFile ()
 
void unlockAndCloseMergeStream ()
 
void updateBuLock (unsigned int ls)
 
bool updateFuLock (unsigned int &ls, std::string &nextFile, bool &eorSeen)
 
void writeDiskAndThrottleStat (double, int, int)
 
void writeLsStatisticsBU (unsigned int, unsigned int, unsigned long long, long long)
 
void writeLsStatisticsFU (unsigned int ls, unsigned int events, timeval completion_time)
 
 ~EvFDaqDirector ()
 

Private Member Functions

bool bulock ()
 
bool bumpFile (unsigned int &ls, unsigned int &index, std::string &nextFile)
 
bool createOutputDirectory ()
 
std::string eolsFileName (const unsigned int ls) const
 
std::string eorFileName () const
 
bool findHighestActiveLS (unsigned int &startingLS) const
 
bool fulock ()
 
std::string initFileName (std::string const &stream) const
 
std::string inputFileNameStem (const unsigned int ls, const unsigned int index) const
 
std::string mergedFileNameStem (const unsigned int ls, std::string const &stream) const
 
bool mkFuRunDir ()
 
void openFULockfileStream (std::string &fuLockFilePath, bool create)
 
std::string outputFileNameStem (const unsigned int ls, std::string const &stream) const
 

Private Attributes

std::string base_dir_
 
std::string bu_base_dir_
 
struct flock bu_r_flk
 
struct flock bu_r_fulk
 
FILE * bu_r_lock_stream
 
int bu_readlock_fd_
 
std::string bu_run_dir_
 
std::string bu_run_open_dir_
 
FILE * bu_t_monitor_stream
 
struct flock bu_w_flk
 
struct flock bu_w_fulk
 
FILE * bu_w_lock_stream
 
FILE * bu_w_monitor_stream
 
int bu_writelock_fd_
 
int data_readwrite_fd_
 
struct flock data_rw_flk
 
struct flock data_rw_fulk
 
FILE * data_rw_stream
 
bool directorBu_
 
DirManager dirManager_
 
int fu_readwritelock_fd_
 
struct flock fu_rw_flk
 
struct flock fu_rw_fulk
 
FILE * fu_rw_lock_stream
 
std::string hostname_
 
unsigned int jumpIndex_
 
unsigned int jumpLS_
 
std::string monitor_base_dir_
 
unsigned long previousFileSize_
 
unsigned int run_
 
std::string run_dir_
 
std::string run_string_
 
std::string sm_base_dir_
 
bool testModeNoBuilderUnit_
 

Detailed Description

Definition at line 25 of file EvFDaqDirector.h.

Constructor & Destructor Documentation

evf::EvFDaqDirector::EvFDaqDirector ( const edm::ParameterSet pset,
edm::ActivityRegistry reg 
)
explicit

Definition at line 27 of file EvFDaqDirector.cc.

References base_dir_, bu_base_dir_, bu_run_dir_, bu_run_open_dir_, bu_t_monitor_stream, bu_w_lock_stream, bu_w_monitor_stream, bu_writelock_fd_, createOutputDirectory(), directorBu_, edm::hlt::Exception, lut2db_cfg::filename, fu_readwritelock_fd_, fu_rw_lock_stream, hostname_, monitor_base_dir_, openFULockfileStream(), postEndRun(), preBeginRun(), run_, run_dir_, run_string_, AlCaHLTBitMon_QueryRunRegistry::string, tryInitializeFuLockFile(), edm::ActivityRegistry::watchPostEndRun(), and edm::ActivityRegistry::watchPreBeginRun().

28  :
30  pset.getUntrackedParameter<bool> ("testModeNoBuilderUnit",
31  false)
32  ),
33  base_dir_(
34  pset.getUntrackedParameter<std::string> ("baseDir", "/data")
35  ),
37  pset.getUntrackedParameter<std::string> ("buBaseDir", "/data")
38  ),
40  pset.getUntrackedParameter<std::string> ("smBaseDir", "/sm")
41  ),
43  pset.getUntrackedParameter<std::string> ("monBaseDir",
44  "MON")
45  ),
47  pset.getUntrackedParameter<bool> ("directorIsBu", false)
48  ),
49  run_(pset.getUntrackedParameter<unsigned int> ("runNumber",0)),
50  hostname_(""),
51  bu_readlock_fd_(-1),
52  bu_writelock_fd_(-1),
55 
61  data_rw_stream(0),
62 
64 
66  jumpLS_(0),
67  jumpIndex_(0),
68 
69  bu_w_flk( make_flock( F_WRLCK, SEEK_SET, 0, 0, 0 )),
70  bu_r_flk( make_flock( F_RDLCK, SEEK_SET, 0, 0, 0 )),
71  bu_w_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, 0 )),
72  bu_r_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, 0 )),
73  fu_rw_flk( make_flock ( F_WRLCK, SEEK_SET, 0, 0, getpid() )),
74  fu_rw_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() )),
75  data_rw_flk( make_flock ( F_WRLCK, SEEK_SET, 0, 0, getpid() )),
76  data_rw_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() ))
77  {
80 
81  std::stringstream ss;
82  ss << "run" << std::setfill('0') << std::setw(6) << run_;
83  run_string_ = ss.str();
85 
86  //save hostname for later
87  char hostname[33];
88  gethostname(hostname,32);
89  hostname_ = hostname;
90  // check if base dir exists or create it accordingly
91  int retval = mkdir(base_dir_.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
92  if (retval != 0 && errno != EEXIST) {
93  throw cms::Exception("DaqDirector") << " Error checking for base dir "
94  << base_dir_ << " mkdir error:" << strerror(errno) << "\n";
95  }
96 
97  //bu_run_dir: for FU, for which the base dir is local and the BU is remote, it is expected to be there
98  //for BU, it is created at this point
99 
100 
101  if (directorBu_)
102  {
104  std::string bulockfile = bu_run_dir_ + "/bu.lock";
105  std::string fulockfile = bu_run_dir_ + "/fu.lock";
106 
107  //make or find bu run dir
108  retval = mkdir(bu_run_dir_.c_str(),
109  S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
110  if (retval != 0 && errno != EEXIST) {
111  throw cms::Exception("DaqDirector")
112  << " Error creating bu run dir " << bu_run_dir_
113  << " mkdir error:" << strerror(errno) << "\n";
114  }
115  bu_run_open_dir_ = bu_run_dir_ + "/open";
116  retval = mkdir(bu_run_open_dir_.c_str(),
117  S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
118  if (retval != 0 && errno != EEXIST) {
119  throw cms::Exception("DaqDirector") << " Error creating bu run open dir "
120  << bu_run_open_dir_ << " mkdir error:" << strerror(errno)
121  << "\n";
122  }
123 
124  //make or find monitor base dir
125  //@@EM make sure this is still needed
126 
127  stringstream ost;
128  ost << bu_run_dir_ << "/" << monitor_base_dir_;
129  monitor_base_dir_ = ost.str() + "_OLD";
130  retval = mkdir(monitor_base_dir_.c_str(),
131  S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
132  if (retval != 0 && errno != EEXIST) {
133  throw cms::Exception("DaqDirector")
134  << " Error creating monitor dir " << monitor_base_dir_
135  << " mkdir error:" << strerror(errno) << "\n";
136  }
137 
138  // the BU director does not need to know about the fu lock
139  bu_writelock_fd_ = open(bulockfile.c_str(),
140  O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU);
141  if (bu_writelock_fd_ == -1)
142  edm::LogWarning("EvFDaqDirector") << "problem with creating filedesc for buwritelock "
143  << strerror(errno);
144  else
145  edm::LogInfo("EvFDaqDirector") << "creating filedesc for buwritelock "
146  << bu_writelock_fd_;
147  bu_w_lock_stream = fdopen(bu_writelock_fd_, "w");
148  if (bu_w_lock_stream == 0)
149  edm::LogWarning("EvFDaqDirector")<< "Error creating write lock stream " << strerror(errno);
150  std::string filename = monitor_base_dir_ + "/bumonitor.txt";
151  bu_w_monitor_stream = fopen(filename.c_str(), "w+");
152  filename = monitor_base_dir_ + "/diskmonitor.txt";
153  bu_t_monitor_stream = fopen(filename.c_str(), "w+");
154  if (bu_t_monitor_stream == 0)
155  edm::LogWarning("EvFDaqDirector") << "Error creating bu write lock stream " << strerror(errno);
156 
157  // BU INITIALIZES LOCK FILE
158  // FU LOCK FILE OPEN
159  openFULockfileStream(fulockfile, true);
161  fflush(fu_rw_lock_stream);
162  close(fu_readwritelock_fd_);
163  createOutputDirectory(); // this should act not on the bu base dir but on the output disk
164  }
165  else
166  {
167  // for FU, check if bu base dir exists
168 
169  retval = mkdir(bu_base_dir_.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
170  if (retval != 0 && errno != EEXIST) {
171  throw cms::Exception("DaqDirector") << " Error checking for bu base dir "
172  << base_dir_ << " mkdir error:" << strerror(errno) << "\n";
173  }
174 
176  std::string fulockfile = bu_run_dir_ + "/fu.lock";
177  openFULockfileStream(fulockfile, false);
178  }
179 
180 
181  }
struct flock bu_w_fulk
T getUntrackedParameter(std::string const &, T const &) const
struct flock fu_rw_flk
std::string run_string_
void postEndRun(edm::Run const &run, edm::EventSetup const &es)
void openFULockfileStream(std::string &fuLockFilePath, bool create)
struct flock bu_r_fulk
struct flock data_rw_flk
unsigned long previousFileSize_
std::string sm_base_dir_
unsigned int jumpIndex_
std::string monitor_base_dir_
struct flock fu_rw_fulk
std::string bu_base_dir_
void preBeginRun(edm::RunID const &id, edm::Timestamp const &ts)
struct flock bu_w_flk
std::string bu_run_dir_
std::string base_dir_
tuple filename
Definition: lut2db_cfg.py:20
unsigned int jumpLS_
void watchPostEndRun(PostEndRun::slot_type const &iSlot)
struct flock data_rw_fulk
struct flock bu_r_flk
std::string bu_run_open_dir_
void watchPreBeginRun(PreBeginRun::slot_type const &iSlot)
evf::EvFDaqDirector::~EvFDaqDirector ( )
inline

Definition at line 30 of file EvFDaqDirector.h.

30 {}

Member Function Documentation

std::string& evf::EvFDaqDirector::baseDir ( )
inline

Definition at line 33 of file EvFDaqDirector.h.

References base_dir_.

33 {return base_dir_;}
std::string base_dir_
std::string& evf::EvFDaqDirector::buBaseDir ( )
inline

Definition at line 36 of file EvFDaqDirector.h.

References bu_run_dir_.

36 {return bu_run_dir_;}
std::string bu_run_dir_
std::string& evf::EvFDaqDirector::buBaseOpenDir ( )
inline

Definition at line 37 of file EvFDaqDirector.h.

References bu_run_open_dir_.

37 {return bu_run_open_dir_;}
std::string bu_run_open_dir_
bool evf::EvFDaqDirector::bulock ( )
private

Definition at line 443 of file EvFDaqDirector.cc.

References bu_base_dir_, bu_readlock_fd_, bu_writelock_fd_, gather_cfg::cout, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by readBuLock().

443  {
444  struct stat buf;
445  std::string lockfile = bu_base_dir_;
446  lockfile += "/bu.lock";
447  bool retval = (stat(lockfile.c_str(), &buf) == 0);
448  if (!retval) {
449  close(bu_readlock_fd_);
450  close(bu_writelock_fd_);
451  }
452  std::cout << "stat of lockfile returned " << retval << std::endl;
453  return retval;
454  }
std::string bu_base_dir_
tuple cout
Definition: gather_cfg.py:121
bool evf::EvFDaqDirector::bumpFile ( unsigned int &  ls,
unsigned int &  index,
std::string &  nextFile 
)
private

Definition at line 505 of file EvFDaqDirector.cc.

References evf::FastMonitoringService::accummulateFileSize(), newFWLiteAna::found, getEoLSFilePathOnBU(), getRawFilePath(), getHLTprescales::index, python.rootplot.utilities::ls(), previousFileSize_, and testModeNoBuilderUnit_.

Referenced by updateFuLock().

505  {
506 
507  if (previousFileSize_ != 0) {
508  FastMonitoringService *mss = (FastMonitoringService *) (edm::Service<
509  evf::MicroStateService>().operator->());
510  mss->accummulateFileSize(previousFileSize_);
511  previousFileSize_ = 0;
512  }
513 
514  struct stat buf;
515  std::stringstream ss;
516  unsigned int nextIndex = index;
517  nextIndex++;
518 
519  // 1. Check suggested file
520  nextFile = getRawFilePath(ls,index);
521  bool found = (stat(nextFile.c_str(), &buf) == 0);
522  // if found
523  if (found) {
524  //grabbedFileSize = buf.st_size;
525  previousFileSize_ = buf.st_size;
526  return true;
527  }
528  // 2. No file -> lumi ended? (and how many?)
529  else {
530  bool eolFound = (stat(getEoLSFilePathOnBU(ls).c_str(), &buf) == 0);
531  unsigned int startingLumi = ls;
532  while (eolFound) {
533  // this lumi ended, check for files
534  ++ls;
535  nextFile = getRawFilePath(ls,0);
536  found = (stat(nextFile.c_str(), &buf) == 0);
537  // update highest ls even if there is no file
538  // input source can now end its' LS when an EoL jsn file is seen
539  if (found) {
540  // a new file was found at new lumisection, index 0
541  index = 0;
542  //grabbedFileSize = buf.st_size;
543  previousFileSize_ = buf.st_size;
544 
546  // rename ended lumi to + 2
547  string sourceEol = getEoLSFilePathOnBU(startingLumi);
548 
549  string destEol = getEoLSFilePathOnBU(startingLumi+2);
550 
551  string cpCmd = "cp " + sourceEol + " " + destEol;
552  edm::LogInfo("EvFDaqDirector") << " testmode: Running copy cmd = " << cpCmd;
553  int rc = system(cpCmd.c_str());
554  if (rc != 0) {
555  edm::LogError("EvFDaqDirector") << " testmode: COPY EOL FAILED!!!!!: " << cpCmd;
556  }
557  }
558 
559  return true;
560  }
561  eolFound = (stat(getEoLSFilePathOnBU(ls).c_str(), &buf) == 0);
562  }
563  }
564  // no new file found
565  return false;
566  }
std::string getRawFilePath(const unsigned int ls, const unsigned int index) const
std::string getEoLSFilePathOnBU(const unsigned int ls) const
unsigned long previousFileSize_
bool evf::EvFDaqDirector::createOutputDirectory ( )
private

Definition at line 216 of file EvFDaqDirector.cc.

References edm::hlt::Exception, run_string_, sm_base_dir_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by EvFDaqDirector().

216  {
217  int retval = mkdir(sm_base_dir_.c_str(),
218  S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
219  if (retval != 0 && errno != EEXIST) {
220  throw cms::Exception("DaqDirector") << " Error creating output dir "
221  << sm_base_dir_ << " mkdir error:" << strerror(errno) << "\n";
222  return false;
223  }
224  std::string mergedRunDir = sm_base_dir_ + "/" + run_string_;
225  std::string mergedDataDir = mergedRunDir + "/data";
226  std::string mergedMonDir = mergedRunDir + "/mon";
227  retval = mkdir(mergedRunDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
228  if (retval != 0 && errno != EEXIST) {
229  throw cms::Exception("DaqDirector")
230  << " Error creating merged Run dir " << mergedDataDir
231  << " mkdir error:" << strerror(errno) << "\n";
232  return false;
233  }
234  retval
235  = mkdir(mergedDataDir.c_str(),
236  S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
237  if (retval != 0 && errno != EEXIST) {
238  throw cms::Exception("DaqDirector")
239  << " Error creating merged data dir " << mergedDataDir
240  << " mkdir error:" << strerror(errno) << "\n";
241  return false;
242  }
243  retval = mkdir(mergedMonDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
244  if (retval != 0 && errno != EEXIST) {
245  throw cms::Exception("DaqDirector")
246  << " Error creating merged mon dir " << mergedMonDir
247  << " mkdir error:" << strerror(errno) << "\n";
248  return false;
249  }
250  return true;
251  }
std::string run_string_
std::string sm_base_dir_
std::string evf::EvFDaqDirector::eolsFileName ( const unsigned int  ls) const
private

Definition at line 661 of file EvFDaqDirector.cc.

Referenced by getEoLSFilePathOnBU(), and getEoLSFilePathOnFU().

661  {
662  std::stringstream ss;
663  ss << "EoLS_" << std::setfill('0') << std::setw(4) << ls << ".jsn";
664  return ss.str();
665  }
std::string evf::EvFDaqDirector::eorFileName ( ) const
private

Definition at line 667 of file EvFDaqDirector.cc.

References run_.

Referenced by getEoRFilePath().

667  {
668  std::stringstream ss;
669  ss << "EoR_" << std::setfill('0') << std::setw(6) << run_ << ".jsn";
670  return ss.str();
671  }
std::string evf::EvFDaqDirector::findCurrentRunDir ( )
inline

Definition at line 41 of file EvFDaqDirector.h.

References dirManager_, evf::DirManager::findRunDir(), and run_.

41 { return dirManager_.findRunDir(run_);}
std::string findRunDir(unsigned int)
Definition: DirManager.cc:37
bool evf::EvFDaqDirector::findHighestActiveLS ( unsigned int &  startingLS) const
private
unsigned int evf::EvFDaqDirector::findHighestRun ( )
inline

Definition at line 43 of file EvFDaqDirector.h.

References dirManager_, and evf::DirManager::findHighestRun().

43 {return dirManager_.findHighestRun();}
unsigned int findHighestRun()
Definition: DirManager.cc:7
std::string evf::EvFDaqDirector::findHighestRunDir ( )
inline

Definition at line 40 of file EvFDaqDirector.h.

References dirManager_, and evf::DirManager::findHighestRunDir().

Referenced by findHighestRunDirStem().

40 { return dirManager_.findHighestRunDir();}
std::string findHighestRunDir()
Definition: DirManager.cc:20
std::string evf::EvFDaqDirector::findHighestRunDirStem ( )

Definition at line 568 of file EvFDaqDirector.cc.

References findHighestRunDir(), and getHLTPrescaleColumns::path.

568  {
569  boost::filesystem::path highestRunDirPath (findHighestRunDir());
570  return highestRunDirPath.filename().string();
571  }
std::string findHighestRunDir()
std::string& evf::EvFDaqDirector::fuBaseDir ( )
inline

Definition at line 34 of file EvFDaqDirector.h.

References run_dir_.

34 {return run_dir_;}
bool evf::EvFDaqDirector::fulock ( )
private

Definition at line 456 of file EvFDaqDirector.cc.

References bu_base_dir_, gather_cfg::cout, fu_readwritelock_fd_, and AlCaHLTBitMon_QueryRunRegistry::string.

456  {
457  struct stat buf;
458  std::string lockfile = bu_base_dir_;
459  lockfile += "/fu.lock";
460  bool retval = (stat(lockfile.c_str(), &buf) == 0);
461  if (!retval) {
462  close(fu_readwritelock_fd_);
463  close(fu_readwritelock_fd_); // why the second close ?
464  }
465  std::cout << "stat of lockfile returned " << retval << std::endl;
466  return retval;
467  }
std::string bu_base_dir_
tuple cout
Definition: gather_cfg.py:121
std::string evf::EvFDaqDirector::getEoLSFilePathOnBU ( const unsigned int  ls) const

Definition at line 277 of file EvFDaqDirector.cc.

References bu_run_dir_, and eolsFileName().

Referenced by bumpFile().

277  {
278  return bu_run_dir_ + "/" + eolsFileName(ls);
279  }
std::string eolsFileName(const unsigned int ls) const
std::string bu_run_dir_
std::string evf::EvFDaqDirector::getEoLSFilePathOnFU ( const unsigned int  ls) const

Definition at line 281 of file EvFDaqDirector.cc.

References eolsFileName(), and run_dir_.

281  {
282  return run_dir_ + "/" + eolsFileName(ls);
283  }
std::string eolsFileName(const unsigned int ls) const
std::string evf::EvFDaqDirector::getEoRFilePath ( ) const

Definition at line 285 of file EvFDaqDirector.cc.

References bu_run_dir_, and eorFileName().

Referenced by updateFuLock().

285  {
286  return bu_run_dir_ + "/" + eorFileName();
287  }
std::string bu_run_dir_
std::string eorFileName() const
std::string evf::EvFDaqDirector::getInitFilePath ( std::string const &  stream) const

Definition at line 273 of file EvFDaqDirector.cc.

References initFileName(), and run_dir_.

273  {
274  return run_dir_ + "/" + initFileName(stream);
275  }
std::string initFileName(std::string const &stream) const
std::string evf::EvFDaqDirector::getJumpFilePath ( ) const
inline

Definition at line 68 of file EvFDaqDirector.h.

References bu_run_dir_, inputFileNameStem(), jumpIndex_, and jumpLS_.

68 { return bu_run_dir_ + "/" + inputFileNameStem(jumpLS_,jumpIndex_) + ".raw"; }
unsigned int jumpIndex_
std::string inputFileNameStem(const unsigned int ls, const unsigned int index) const
std::string bu_run_dir_
unsigned int jumpLS_
unsigned int evf::EvFDaqDirector::getJumpIndex ( ) const
inline

Definition at line 67 of file EvFDaqDirector.h.

References jumpIndex_.

67 { return jumpIndex_; }
unsigned int jumpIndex_
unsigned int evf::EvFDaqDirector::getJumpLS ( ) const
inline

Definition at line 66 of file EvFDaqDirector.h.

References jumpLS_.

66 { return jumpLS_; }
unsigned int jumpLS_
std::string evf::EvFDaqDirector::getMergedDatFilePath ( const unsigned int  ls,
std::string const &  stream 
) const

Definition at line 269 of file EvFDaqDirector.cc.

References mergedFileNameStem(), and run_dir_.

Referenced by maybeCreateAndLockFileHeadForStream().

269  {
270  return run_dir_ + "/" + mergedFileNameStem(ls,stream) + ".dat";
271  }
std::string mergedFileNameStem(const unsigned int ls, std::string const &stream) const
std::string evf::EvFDaqDirector::getOpenDatFilePath ( const unsigned int  ls,
std::string const &  stream 
) const

Definition at line 261 of file EvFDaqDirector.cc.

References outputFileNameStem(), and run_dir_.

261  {
262  return run_dir_ + "/open/" + outputFileNameStem(ls,stream) + ".dat";
263  }
std::string outputFileNameStem(const unsigned int ls, std::string const &stream) const
std::string evf::EvFDaqDirector::getOpenRawFilePath ( const unsigned int  ls,
const unsigned int  index 
) const

Definition at line 257 of file EvFDaqDirector.cc.

References bu_run_dir_, and inputFileNameStem().

257  {
258  return bu_run_dir_ + "/open/" + inputFileNameStem(ls, index) + ".raw";
259  }
std::string inputFileNameStem(const unsigned int ls, const unsigned int index) const
std::string bu_run_dir_
std::string evf::EvFDaqDirector::getOutputJsonFilePath ( const unsigned int  ls,
std::string const &  stream 
) const

Definition at line 265 of file EvFDaqDirector.cc.

References outputFileNameStem(), and run_dir_.

265  {
266  return run_dir_ + "/" + outputFileNameStem(ls,stream) + ".jsn";
267  }
std::string outputFileNameStem(const unsigned int ls, std::string const &stream) const
std::string evf::EvFDaqDirector::getPathForFU ( ) const

Definition at line 289 of file EvFDaqDirector.cc.

References sm_base_dir_.

289  {
290  return sm_base_dir_;
291  }
std::string sm_base_dir_
std::string evf::EvFDaqDirector::getRawFilePath ( const unsigned int  ls,
const unsigned int  index 
) const

Definition at line 253 of file EvFDaqDirector.cc.

References bu_run_dir_, and inputFileNameStem().

Referenced by bumpFile(), and removeFile().

253  {
254  return bu_run_dir_ + "/" + inputFileNameStem(ls, index) + ".raw";
255  }
std::string inputFileNameStem(const unsigned int ls, const unsigned int index) const
std::string bu_run_dir_
unsigned int evf::EvFDaqDirector::getRunNumber ( ) const
inline

Definition at line 65 of file EvFDaqDirector.h.

References run_.

65 { return run_; }
bool evf::EvFDaqDirector::getTestModeNoBuilderUnit ( )
inline

Definition at line 69 of file EvFDaqDirector.h.

References testModeNoBuilderUnit_.

69 { return testModeNoBuilderUnit_;}
std::string evf::EvFDaqDirector::initFileName ( std::string const &  stream) const
private

Definition at line 652 of file EvFDaqDirector.cc.

References run_string_.

Referenced by getInitFilePath().

652  {
653  std::stringstream ss;
654  ss << run_string_
655  << "_" << stream
656  << "_pid" << std::setfill('0') << std::setw(5) << getpid()
657  << ".ini";
658  return ss.str();
659  }
std::string run_string_
std::string evf::EvFDaqDirector::inputFileNameStem ( const unsigned int  ls,
const unsigned int  index 
) const
private

Definition at line 626 of file EvFDaqDirector.cc.

References getHLTprescales::index, and run_string_.

Referenced by getJumpFilePath(), getOpenRawFilePath(), and getRawFilePath().

626  {
627  std::stringstream ss;
628  ss << run_string_
629  << "_ls" << std::setfill('0') << std::setw(4) << ls
630  << "_index" << std::setfill('0') << std::setw(6) << index;
631  return ss.str();
632  }
std::string run_string_
FILE * evf::EvFDaqDirector::maybeCreateAndLockFileHeadForStream ( unsigned int  ls,
std::string &  stream 
)

Definition at line 606 of file EvFDaqDirector.cc.

References data_readwrite_fd_, data_rw_flk, data_rw_stream, and getMergedDatFilePath().

606  {
607  data_rw_stream = fopen(getMergedDatFilePath(ls,stream).c_str(), "a"); //open stream for appending
609  if (data_readwrite_fd_ == -1)
610  edm::LogError("EvFDaqDirector") << "problem with creating filedesc for datamerge "
611  << strerror(errno);
612  else
613  edm::LogInfo("EvFDaqDirector") << "creating filedesc for datamerge "
615  fcntl(data_readwrite_fd_, F_SETLKW, &data_rw_flk);
616 
617  return data_rw_stream;
618  }
struct flock data_rw_flk
std::string getMergedDatFilePath(const unsigned int ls, std::string const &stream) const
std::string evf::EvFDaqDirector::mergedFileNameStem ( const unsigned int  ls,
std::string const &  stream 
) const
private

Definition at line 643 of file EvFDaqDirector.cc.

References hostname_, and run_string_.

Referenced by getMergedDatFilePath().

643  {
644  std::stringstream ss;
645  ss << run_string_
646  << "_ls" << std::setfill('0') << std::setw(4) << ls
647  << "_" << stream
648  << "_" << hostname_;
649  return ss.str();
650  }
std::string run_string_
bool evf::EvFDaqDirector::mkFuRunDir ( )
private
std::string& evf::EvFDaqDirector::monitorBaseDir ( )
inline

Definition at line 38 of file EvFDaqDirector.h.

References monitor_base_dir_.

38 {return monitor_base_dir_;}
std::string monitor_base_dir_
void evf::EvFDaqDirector::openFULockfileStream ( std::string &  fuLockFilePath,
bool  create 
)
private

Definition at line 588 of file EvFDaqDirector.cc.

References fu_readwritelock_fd_, and fu_rw_lock_stream.

Referenced by EvFDaqDirector().

588  {
589  if (create) {
590  fu_readwritelock_fd_ = open(fulockfile.c_str(), O_RDWR | O_CREAT,
591  S_IRWXU | S_IRWXG | S_IROTH | S_IRWXO | S_IXOTH);
592  } else {
593  fu_readwritelock_fd_ = open(fulockfile.c_str(), O_RDWR, S_IRWXU);
594  }
595  if (fu_readwritelock_fd_ == -1)
596  edm::LogError("EvFDaqDirector") << "problem with creating filedesc for fuwritelock "
597  << strerror(errno);
598  else
599  edm::LogInfo("EvFDaqDirector") << "creating filedesc for fureadwritelock "
601 
602  fu_rw_lock_stream = fdopen(fu_readwritelock_fd_, "r+");
603  }
SurfaceDeformation * create(int type, const std::vector< double > &params)
std::string evf::EvFDaqDirector::outputFileNameStem ( const unsigned int  ls,
std::string const &  stream 
) const
private

Definition at line 634 of file EvFDaqDirector.cc.

References run_string_.

Referenced by getOpenDatFilePath(), and getOutputJsonFilePath().

634  {
635  std::stringstream ss;
636  ss << run_string_
637  << "_ls" << std::setfill('0') << std::setw(4) << ls
638  << "_" << stream
639  << "_pid" << std::setfill('0') << std::setw(5) << getpid();
640  return ss.str();
641  }
std::string run_string_
void evf::EvFDaqDirector::postEndRun ( edm::Run const &  run,
edm::EventSetup const &  es 
)

Definition at line 183 of file EvFDaqDirector.cc.

References bu_base_dir_, bu_readlock_fd_, bu_writelock_fd_, directorBu_, lut2db_cfg::filename, removeFile(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by EvFDaqDirector().

183  {
184  close(bu_readlock_fd_);
185  close(bu_writelock_fd_);
186  if (directorBu_) {
187  std::string filename = bu_base_dir_ + "/bu.lock";
188  removeFile(filename);
189  }
190  }
std::string bu_base_dir_
void removeFile(unsigned int ls, unsigned int index)
tuple filename
Definition: lut2db_cfg.py:20
void evf::EvFDaqDirector::preBeginRun ( edm::RunID const &  id,
edm::Timestamp const &  ts 
)

Definition at line 192 of file EvFDaqDirector.cc.

References dirManager_, edm::hlt::Exception, evf::DirManager::findHighestRunDir(), DTTTrigCorrFirst::run, run_, and run_dir_.

Referenced by EvFDaqDirector().

192  {
193 
194  assert(run_ == id.run());
195 
196  // check if run dir exists or make it.
197  umask(0);
198  int retval = mkdir(run_dir_.c_str(),
199  S_IRWXU | S_IRWXG | S_IROTH | S_IRWXO | S_IXOTH);
200  if (retval != 0 && errno != EEXIST) {
201  throw cms::Exception("DaqDirector") << " Error creating run dir "
202  << run_dir_ << " mkdir error:" << strerror(errno) << "\n";
203  }
204 
205  // check if the requested run is the latest one - issue a warning if it isn't
207  edm::LogWarning("EvFDaqDirector") << "DaqDirector Warning checking run dir "
208  << run_dir_ << " this is not the highest run "
210  }
211 
212 
213 
214  }
std::string findHighestRunDir()
Definition: DirManager.cc:20
int evf::EvFDaqDirector::readBuLock ( )

Definition at line 416 of file EvFDaqDirector.cc.

References bu_base_dir_, bu_r_flk, bu_r_fulk, bu_r_lock_stream, bu_readlock_fd_, bulock(), CastorDataFrameFilter_impl::check(), evf::DirManager::checkDirEmpty(), gather_cfg::cout, dirManager_, and AlCaHLTBitMon_ParallelJobs::p.

416  {
417  int retval = -1;
418  // check if lock file has disappeared and if so whether directory is empty (signal end of run)
420  return retval;
421  if (fcntl(bu_readlock_fd_, F_SETLKW, &bu_r_flk) != 0)
422  retval = 0;
423  if (bu_r_lock_stream) {
424  unsigned int readval;
425  int check = 0;
426  unsigned int *p = &readval;
427  check = fseek(bu_r_lock_stream, 0, SEEK_SET);
428  if (check == 0) {
429  fscanf(bu_r_lock_stream, "%u", p);
430  retval = readval;
431  }
432  } else {
433  edm::LogError("EvFDaqDirector") << "error reading bu lock file " << strerror(errno);
434  retval = -1;
435  }
436  fcntl(bu_readlock_fd_, F_SETLKW, &bu_r_fulk);
437  std::cout << "readbulock returning " << retval << std::endl;
438  return retval;
439  }
bool checkDirEmpty(std::string &)
Definition: DirManager.cc:53
struct flock bu_r_fulk
bool check(const DataFrame &df, bool capcheck, bool dvercheck)
std::string bu_base_dir_
tuple cout
Definition: gather_cfg.py:121
struct flock bu_r_flk
void evf::EvFDaqDirector::removeFile ( unsigned int  ls,
unsigned int  index 
)

Definition at line 300 of file EvFDaqDirector.cc.

References getRawFilePath().

Referenced by postEndRun().

300  {
302  }
std::string getRawFilePath(const unsigned int ls, const unsigned int index) const
void removeFile(unsigned int ls, unsigned int index)
void evf::EvFDaqDirector::removeFile ( std::string  filename)

Definition at line 293 of file EvFDaqDirector.cc.

References gather_cfg::cout.

293  {
294  int retval = remove(filename.c_str());
295  if (retval != 0)
296  std::cout << "Could not remove used file " << filename << " error "
297  << strerror(errno) << "\n";
298  }
tuple filename
Definition: lut2db_cfg.py:20
tuple cout
Definition: gather_cfg.py:121
std::string& evf::EvFDaqDirector::smBaseDir ( )
inline

Definition at line 35 of file EvFDaqDirector.h.

References sm_base_dir_.

35 {return sm_base_dir_;}
std::string sm_base_dir_
void evf::EvFDaqDirector::tryInitializeFuLockFile ( )

Definition at line 573 of file EvFDaqDirector.cc.

References fu_rw_lock_stream, getHLTprescales::readIndex(), and testModeNoBuilderUnit_.

Referenced by EvFDaqDirector().

573  {
574  if (fu_rw_lock_stream == 0)
575  edm::LogError("EvFDaqDirector") << "Error creating fu read/write lock stream "
576  << strerror(errno);
577  else {
578  edm::LogInfo("EvFDaqDirector") << "Initializing FU LOCK FILE";
579  unsigned int readLs = 1, readIndex = 0, jumpLs = 3, jumpIndex = 0;
581  fprintf(fu_rw_lock_stream, "%u %u %u %u", readLs, readIndex,
582  jumpLs, jumpIndex);
583  else
584  fprintf(fu_rw_lock_stream, "%u %u", readLs, readIndex);
585  }
586  }
void evf::EvFDaqDirector::unlockAndCloseMergeStream ( )

Definition at line 620 of file EvFDaqDirector.cc.

References data_readwrite_fd_, data_rw_fulk, and data_rw_stream.

620  {
621  fflush(data_rw_stream);
622  fcntl(data_readwrite_fd_, F_SETLKW, &data_rw_fulk);
623  fclose(data_rw_stream);
624  }
struct flock data_rw_fulk
void evf::EvFDaqDirector::updateBuLock ( unsigned int  ls)

Definition at line 304 of file EvFDaqDirector.cc.

References bu_w_flk, bu_w_fulk, bu_w_lock_stream, bu_writelock_fd_, and CastorDataFrameFilter_impl::check().

304  {
305  int check = 0;
306  fcntl(bu_writelock_fd_, F_SETLKW, &bu_w_flk);
307  if (bu_w_lock_stream != 0) {
308  check = fseek(bu_w_lock_stream, 0, SEEK_SET);
309  if (check == 0)
310  fprintf(bu_w_lock_stream, "%u", ls);
311  else
312  edm::LogError("EvFDaqDirector")
313  << "seek on bu write lock for updating failed with error "
314  << strerror(errno);
315  } else
316  edm::LogError("EvFDaqDirector") << "bu write lock stream is invalid " << strerror(errno);
317 
318  fcntl(bu_writelock_fd_, F_SETLKW, &bu_w_fulk);
319  }
struct flock bu_w_fulk
bool check(const DataFrame &df, bool capcheck, bool dvercheck)
struct flock bu_w_flk
bool evf::EvFDaqDirector::updateFuLock ( unsigned int &  ls,
std::string &  nextFile,
bool &  eorSeen 
)

Definition at line 321 of file EvFDaqDirector.cc.

References bu_run_dir_, bumpFile(), CastorDataFrameFilter_impl::check(), fu_readwritelock_fd_, fu_rw_flk, fu_rw_fulk, fu_rw_lock_stream, getEoRFilePath(), jumpIndex_, jumpLS_, O_NONBLOCK, getHLTprescales::readIndex(), AlCaHLTBitMon_QueryRunRegistry::string, testModeNoBuilderUnit_, and TrackValidation_HighPurity_cff::valid.

322  {
323  // close and reopen the stream / fd
324  close(fu_readwritelock_fd_);
325  std::string fulockfile = bu_run_dir_ + "/fu.lock";
326  fu_readwritelock_fd_ = open(fulockfile.c_str(), O_RDWR | O_NONBLOCK, S_IRWXU);
327  if (fu_readwritelock_fd_ == -1)
328  edm::LogError("EvFDaqDirector") << "problem with creating filedesc for fuwritelock "
329  << strerror(errno);
330  else
331  edm::LogInfo("EvFDaqDirector") << "created filedesc for fureadwritelock "
333  fu_rw_lock_stream = fdopen(fu_readwritelock_fd_, "r+");
334  edm::LogInfo("EvFDaqDirector") << "Reopened the fw FD & STREAM";
335 
336  // obtain lock on the fulock file - this call will block if the lock is held by another process
337  int retval = fcntl(fu_readwritelock_fd_, F_SETLKW, &fu_rw_flk);
338  //if locking fails just return here
339  if(retval!=0) return false;
340 
341  eorSeen = false;
342  struct stat buf;
343  eorSeen = (stat(getEoRFilePath().c_str(), &buf) == 0);
344  bool valid = false;
345 
346  // if the stream is readable
347  if (fu_rw_lock_stream != 0) {
348  unsigned int readLs, readIndex, jumpLs, jumpIndex;
349  int check = 0;
350  // rewind the stream
351  check = fseek(fu_rw_lock_stream, 0, SEEK_SET);
352  // if rewinded ok
353  if (check == 0) {
354  // read its' values
356  fscanf(fu_rw_lock_stream, "%u %u %u %u", &readLs, &readIndex,
357  &jumpLs, &jumpIndex);
358  else
359  fscanf(fu_rw_lock_stream, "%u %u", &readLs, &readIndex);
360 
361  // try to bump
362  bool bumpedOk = bumpFile(readLs, readIndex, nextFile);
363 
364  ls = readLs;
365  // there is a new file to grab or lumisection ended
366  if (bumpedOk) {
367  // rewind and clear
368  check = fseek(fu_rw_lock_stream, 0, SEEK_SET);
369  if (check == 0) {
370  ftruncate(fu_readwritelock_fd_, 0);
371  fflush(fu_rw_lock_stream); //this should not be needed ???
372  } else
373  edm::LogError("EvFDaqDirector") << "seek on fu read/write lock for updating failed with error "
374  << strerror(errno);
375  // write new data
376  check = fseek(fu_rw_lock_stream, 0, SEEK_SET);
377  if (check == 0) {
378  // write next index in the file, which is the file the next process should take
380  fprintf(fu_rw_lock_stream, "%u %u %u %u", readLs,
381  readIndex + 1, readLs + 2, readIndex + 1);
382  jumpLS_ = readLs + 2;
384  } else {
385  fprintf(fu_rw_lock_stream, "%u %u", readLs,
386  readIndex + 1);
387  }
388  fflush(fu_rw_lock_stream);
389  fsync(fu_readwritelock_fd_);
390 
391  valid = true;
392 
394  edm::LogInfo("EvFDaqDirector")<< "Written to file: " << readLs << ":"
395  << readIndex + 1 << " --> " << readLs + 2
396  << ":" << readIndex + 1;
397  else
398  edm::LogInfo("EvFDaqDirector")<< "Written to file: " << readLs << ":"
399  << readIndex + 1;
400 
401  } else
402  edm::LogError("EvFDaqDirector") << "seek on fu read/write lock for updating failed with error "
403  << strerror(errno) << std::endl;
404  }
405  } else
406  edm::LogError("EvFDaqDirector") << "seek on fu read/write lock for reading failed with error "
407  << strerror(errno) << std::endl;
408  } else
409  edm::LogError("EvFDaqDirector") << "fu read/write lock stream is invalid " << strerror(errno);
410  //release flock at this point
411  fcntl(fu_readwritelock_fd_, F_SETLKW, &fu_rw_fulk);
412 
413  return valid;
414  }
struct flock fu_rw_flk
std::string getEoRFilePath() const
unsigned int jumpIndex_
struct flock fu_rw_fulk
bool check(const DataFrame &df, bool capcheck, bool dvercheck)
std::string bu_run_dir_
bool bumpFile(unsigned int &ls, unsigned int &index, std::string &nextFile)
#define O_NONBLOCK
Definition: SysFile.h:21
unsigned int jumpLS_
void evf::EvFDaqDirector::writeDiskAndThrottleStat ( double  fraction,
int  highWater,
int  lowWater 
)

Definition at line 488 of file EvFDaqDirector.cc.

References bu_t_monitor_stream, CastorDataFrameFilter_impl::check(), and gather_cfg::cout.

489  {
490  if (bu_t_monitor_stream != 0) {
491  int check = fseek(bu_t_monitor_stream, 0, SEEK_SET);
492  if (check == 0)
493  fprintf(bu_t_monitor_stream, "%f %d %d", fraction, highWater,
494  lowWater);
495  else
496  std::cout
497  << "seek on disk write monitor for updating failed with error "
498  << strerror(errno) << std::endl;
499  } else
500  std::cout << "disk write monitor stream is invalid " << strerror(errno)
501  << std::endl;
502 
503  }
bool check(const DataFrame &df, bool capcheck, bool dvercheck)
tuple cout
Definition: gather_cfg.py:121
void evf::EvFDaqDirector::writeLsStatisticsBU ( unsigned int  ls,
unsigned int  events,
unsigned long long  totsize,
long long  lsusec 
)

Definition at line 469 of file EvFDaqDirector.cc.

References bu_w_monitor_stream, CastorDataFrameFilter_impl::check(), and gather_cfg::cout.

470  {
471  if (bu_w_monitor_stream != 0) {
472  int check = fseek(bu_w_monitor_stream, 0, SEEK_SET);
473  if (check == 0) {
474  fprintf(bu_w_monitor_stream, "%u %u %llu %f %f %012lld", ls,
475  events, totsize,
476  double(totsize) / double(events) / 1000000.,
477  double(totsize) / double(lsusec), lsusec);
478  fflush(bu_w_monitor_stream);
479  } else
480  std::cout
481  << "seek on bu write monitor for updating failed with error "
482  << strerror(errno) << std::endl;
483  } else
484  std::cout << "bu write monitor stream is invalid " << strerror(errno)
485  << std::endl;
486 
487  }
bool check(const DataFrame &df, bool capcheck, bool dvercheck)
tuple events
Definition: patZpeak.py:19
tuple cout
Definition: gather_cfg.py:121
void evf::EvFDaqDirector::writeLsStatisticsFU ( unsigned int  ls,
unsigned int  events,
timeval  completion_time 
)
inline

Definition at line 62 of file EvFDaqDirector.h.

62 {}

Member Data Documentation

std::string evf::EvFDaqDirector::base_dir_
private

Definition at line 93 of file EvFDaqDirector.h.

Referenced by baseDir(), and EvFDaqDirector().

std::string evf::EvFDaqDirector::bu_base_dir_
private

Definition at line 94 of file EvFDaqDirector.h.

Referenced by bulock(), EvFDaqDirector(), fulock(), postEndRun(), and readBuLock().

struct flock evf::EvFDaqDirector::bu_r_flk
private

Definition at line 124 of file EvFDaqDirector.h.

Referenced by readBuLock().

struct flock evf::EvFDaqDirector::bu_r_fulk
private

Definition at line 126 of file EvFDaqDirector.h.

Referenced by readBuLock().

FILE* evf::EvFDaqDirector::bu_r_lock_stream
private

Definition at line 112 of file EvFDaqDirector.h.

Referenced by readBuLock().

int evf::EvFDaqDirector::bu_readlock_fd_
private

Definition at line 106 of file EvFDaqDirector.h.

Referenced by bulock(), postEndRun(), and readBuLock().

std::string evf::EvFDaqDirector::bu_run_dir_
private
std::string evf::EvFDaqDirector::bu_run_open_dir_
private

Definition at line 104 of file EvFDaqDirector.h.

Referenced by buBaseOpenDir(), and EvFDaqDirector().

FILE* evf::EvFDaqDirector::bu_t_monitor_stream
private

Definition at line 115 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector(), and writeDiskAndThrottleStat().

struct flock evf::EvFDaqDirector::bu_w_flk
private

Definition at line 123 of file EvFDaqDirector.h.

Referenced by updateBuLock().

struct flock evf::EvFDaqDirector::bu_w_fulk
private

Definition at line 125 of file EvFDaqDirector.h.

Referenced by updateBuLock().

FILE* evf::EvFDaqDirector::bu_w_lock_stream
private

Definition at line 111 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector(), and updateBuLock().

FILE* evf::EvFDaqDirector::bu_w_monitor_stream
private

Definition at line 114 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector(), and writeLsStatisticsBU().

int evf::EvFDaqDirector::bu_writelock_fd_
private

Definition at line 107 of file EvFDaqDirector.h.

Referenced by bulock(), EvFDaqDirector(), postEndRun(), and updateBuLock().

int evf::EvFDaqDirector::data_readwrite_fd_
private
struct flock evf::EvFDaqDirector::data_rw_flk
private

Definition at line 129 of file EvFDaqDirector.h.

Referenced by maybeCreateAndLockFileHeadForStream().

struct flock evf::EvFDaqDirector::data_rw_fulk
private

Definition at line 130 of file EvFDaqDirector.h.

Referenced by unlockAndCloseMergeStream().

FILE* evf::EvFDaqDirector::data_rw_stream
private
bool evf::EvFDaqDirector::directorBu_
private

Definition at line 97 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector(), and postEndRun().

DirManager evf::EvFDaqDirector::dirManager_
private
int evf::EvFDaqDirector::fu_readwritelock_fd_
private

Definition at line 108 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector(), fulock(), openFULockfileStream(), and updateFuLock().

struct flock evf::EvFDaqDirector::fu_rw_flk
private

Definition at line 127 of file EvFDaqDirector.h.

Referenced by updateFuLock().

struct flock evf::EvFDaqDirector::fu_rw_fulk
private

Definition at line 128 of file EvFDaqDirector.h.

Referenced by updateFuLock().

FILE* evf::EvFDaqDirector::fu_rw_lock_stream
private
std::string evf::EvFDaqDirector::hostname_
private

Definition at line 100 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector(), and mergedFileNameStem().

unsigned int evf::EvFDaqDirector::jumpIndex_
private

Definition at line 121 of file EvFDaqDirector.h.

Referenced by getJumpFilePath(), getJumpIndex(), and updateFuLock().

unsigned int evf::EvFDaqDirector::jumpLS_
private

Definition at line 121 of file EvFDaqDirector.h.

Referenced by getJumpFilePath(), getJumpLS(), and updateFuLock().

std::string evf::EvFDaqDirector::monitor_base_dir_
private

Definition at line 96 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector(), and monitorBaseDir().

unsigned long evf::EvFDaqDirector::previousFileSize_
private

Definition at line 120 of file EvFDaqDirector.h.

Referenced by bumpFile().

unsigned int evf::EvFDaqDirector::run_
private
std::string evf::EvFDaqDirector::run_dir_
private
std::string evf::EvFDaqDirector::run_string_
private
std::string evf::EvFDaqDirector::sm_base_dir_
private

Definition at line 95 of file EvFDaqDirector.h.

Referenced by createOutputDirectory(), getPathForFU(), and smBaseDir().

bool evf::EvFDaqDirector::testModeNoBuilderUnit_
private