CMS 3D CMS Logo

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

#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 checkTransferSystemPSet ()
 
void createRunOpendirMaybe ()
 
 EvFDaqDirector (const edm::ParameterSet &pset, edm::ActivityRegistry &reg)
 
std::string findCurrentRunDir ()
 
std::string getBoLSFilePathOnFU (const unsigned int ls) 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 getInitFilePath (std::string const &stream) const
 
std::string getInputJsonFilePath (const unsigned int ls, const unsigned int index) const
 
std::string getJumpFilePath () const
 
unsigned int getJumpIndex () const
 
unsigned int getJumpLS () 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
 
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
 
std::string getStreamDestinations (std::string const &stream) const
 
std::vector< int > * getStreamFileTracker ()
 
bool getTestModeNoBuilderUnit ()
 
bool isSingleStreamThread ()
 
void lockFULocal ()
 
void lockFULocal2 ()
 
void lockInitLock ()
 
FILE * maybeCreateAndLockFileHeadForStream (unsigned int ls, std::string &stream)
 
bool outputAdler32Recheck () const
 
void postEndRun (edm::GlobalContext const &globalContext)
 
void preallocate (edm::service::SystemBounds const &bounds)
 
void preBeginRun (edm::GlobalContext const &globalContext)
 
void preGlobalEndLumi (edm::GlobalContext const &globalContext)
 
void preSourceEvent (edm::StreamID const &streamID)
 
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, InputFile * >> *filesToDelete)
 
void setFMS (evf::FastMonitoringService *fms)
 
void tryInitializeFuLockFile ()
 
void unlockAndCloseMergeStream ()
 
void unlockFULocal ()
 
void unlockFULocal2 ()
 
void unlockInitLock ()
 
void updateFileIndex (int const &fileIndex)
 
FileStatus updateFuLock (unsigned int &ls, std::string &nextFile, uint32_t &fsize)
 
 ~EvFDaqDirector ()
 

Private Member Functions

bool bumpFile (unsigned int &ls, unsigned int &index, std::string &nextFile, uint32_t &fsize, int maxLS)
 
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 (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 currentFileIndex_ = -1
 
int data_readwrite_fd_
 
struct flock data_rw_flk
 
struct flock data_rw_fulk
 
FILE * data_rw_stream
 
bool directorBu_
 
DirManager dirManager_
 
unsigned int eolsNFilesIndex_ = 1
 
std::mutexfileDeleteLockPtr_ = nullptr
 
std::list< std::pair< int,
InputFile * > > * 
filesToDeletePtr_ = nullptr
 
evf::FastMonitoringServicefms_ = 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 hltSourceDirectory_
 
std::string hostname_
 
pthread_mutex_t init_lock_ = PTHREAD_MUTEX_INITIALIZER
 
unsigned int jumpIndex_
 
unsigned int jumpLS_
 
unsigned int nStreams_ =0
 
unsigned int nThreads_ =0
 
bool outputAdler32Recheck_
 
unsigned long previousFileSize_
 
bool readEolsDefinition_ = true
 
bool requireTSPSet_
 
unsigned int run_
 
std::string run_dir_
 
std::string run_string_
 
std::string selectedTransferMode_
 
std::string stopFilePath_
 
std::vector< int > streamFileTracker_
 
bool testModeNoBuilderUnit_
 
std::shared_ptr< Json::ValuetransferSystemJson_
 

Detailed Description

Definition at line 42 of file EvFDaqDirector.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

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

Definition at line 39 of file EvFDaqDirector.cc.

References base_dir_, bu_base_dir_, bu_run_dir_, bu_run_open_dir_, bu_w_lock_stream, bu_writelock_fd_, roll_playback::copy_file, createRunOpendirMaybe(), directorBu_, edm::hlt::Exception, fu_readwritelock_fd_, fu_rw_lock_stream, fulocal_rwlock_fd2_, fulocal_rwlock_fd_, getRunOpenDirPath(), hltSourceDirectory_, hostname_, init_lock_, NULL, openFULockfileStream(), postEndRun(), preallocate(), preBeginRun(), preGlobalEndLumi(), preSourceEvent(), run_, run_dir_, run_string_, contentValuesCheck::ss, stopFilePath_, AlCaHLTBitMon_QueryRunRegistry::string, tryInitializeFuLockFile(), edm::ActivityRegistry::watchPostGlobalEndRun(), edm::ActivityRegistry::watchPreallocate(), edm::ActivityRegistry::watchPreGlobalBeginRun(), edm::ActivityRegistry::watchPreGlobalEndLumi(), and edm::ActivityRegistry::watchPreSourceEvent().

40  :
42  pset.getUntrackedParameter<bool> ("testModeNoBuilderUnit",
43  false)
44  ),
45  base_dir_(
46  pset.getUntrackedParameter<std::string> ("baseDir", "/data")
47  ),
49  pset.getUntrackedParameter<std::string> ("buBaseDir", "/data")
50  ),
52  pset.getUntrackedParameter<bool> ("directorIsBu", false)
53  ),
54  run_(pset.getUntrackedParameter<unsigned int> ("runNumber",0)),
55  outputAdler32Recheck_(pset.getUntrackedParameter<bool>("outputAdler32Recheck",false)),
56  requireTSPSet_(pset.getUntrackedParameter<bool>("requireTransfersPSet",false)),
57  selectedTransferMode_(pset.getUntrackedParameter<std::string>("selectedTransferMode","")),
58  hltSourceDirectory_(pset.getUntrackedParameter<std::string>("hltSourceDirectory","")),
59  hostname_(""),
60  bu_readlock_fd_(-1),
61  bu_writelock_fd_(-1),
66 
70  //bu_w_monitor_stream(0),
71  //bu_t_monitor_stream(0),
72  data_rw_stream(0),
73 
75 
77  jumpLS_(0),
78  jumpIndex_(0),
79 
80  bu_w_flk( make_flock( F_WRLCK, SEEK_SET, 0, 0, 0 )),
81  bu_r_flk( make_flock( F_RDLCK, SEEK_SET, 0, 0, 0 )),
82  bu_w_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, 0 )),
83  bu_r_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, 0 )),
84  fu_rw_flk( make_flock ( F_WRLCK, SEEK_SET, 0, 0, getpid() )),
85  fu_rw_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() )),
86  data_rw_flk( make_flock ( F_WRLCK, SEEK_SET, 0, 0, getpid() )),
87  data_rw_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() ))
88  //fulocal_rw_flk( make_flock( F_WRLCK, SEEK_SET, 0, 0, getpid() )),
89  //fulocal_rw_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() )),
90  //fulocal_rw_flk2( make_flock( F_WRLCK, SEEK_SET, 0, 0, getpid() )),
91  //fulocal_rw_fulk2( make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() ))
92  {
93 
99 
100  std::stringstream ss;
101  ss << "run" << std::setfill('0') << std::setw(6) << run_;
102  run_string_ = ss.str();
104 
105  //save hostname for later
106  char hostname[33];
107  gethostname(hostname,32);
108  hostname_ = hostname;
109  // check if base dir exists or create it accordingly
110  int retval = mkdir(base_dir_.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
111  if (retval != 0 && errno != EEXIST) {
112  throw cms::Exception("DaqDirector") << " Error checking for base dir -: "
113  << base_dir_ << " mkdir error:" << strerror(errno);
114  }
115 
116  //create run dir in base dir
117  umask(0);
118  retval = mkdir(run_dir_.c_str(),
119  S_IRWXU | S_IRWXG | S_IROTH | S_IRWXO | S_IXOTH);
120  if (retval != 0 && errno != EEXIST) {
121  throw cms::Exception("DaqDirector") << " Error creating run dir -: "
122  << run_dir_ << " mkdir error:" << strerror(errno);
123  }
124 
125  //create fu-local.lock in run open dir
126  if (!directorBu_) {
127 
129  std::string fulocal_lock_ = getRunOpenDirPath() +"/fu-local.lock";
130  fulocal_rwlock_fd_ = open(fulocal_lock_.c_str(), O_RDWR | O_CREAT, S_IRWXU | S_IWGRP | S_IRGRP | S_IWOTH | S_IROTH);//O_RDWR?
131  if (fulocal_rwlock_fd_==-1)
132  throw cms::Exception("DaqDirector") << " Error creating/opening a local lock file -: " << fulocal_lock_.c_str() << " : " << strerror(errno);
133  chmod(fulocal_lock_.c_str(),0777);
134  fsync(fulocal_rwlock_fd_);
135  //open second fd for another input source thread
136  fulocal_rwlock_fd2_ = open(fulocal_lock_.c_str(), O_RDWR, S_IRWXU | S_IWGRP | S_IRGRP | S_IWOTH | S_IROTH);//O_RDWR?
137  if (fulocal_rwlock_fd2_==-1)
138  throw cms::Exception("DaqDirector") << " Error opening a local lock file -: " << fulocal_lock_.c_str() << " : " << strerror(errno);
139  }
140 
141  //bu_run_dir: for FU, for which the base dir is local and the BU is remote, it is expected to be there
142  //for BU, it is created at this point
143  if (directorBu_)
144  {
146  std::string bulockfile = bu_run_dir_ + "/bu.lock";
147  std::string fulockfile = bu_run_dir_ + "/fu.lock";
148 
149  //make or find bu run dir
150  retval = mkdir(bu_run_dir_.c_str(),
151  S_IRWXU | S_IRWXG | S_IRWXO);
152  if (retval != 0 && errno != EEXIST) {
153  throw cms::Exception("DaqDirector")
154  << " Error creating bu run dir -: " << bu_run_dir_
155  << " mkdir error:" << strerror(errno) << "\n";
156  }
157  bu_run_open_dir_ = bu_run_dir_ + "/open";
158  retval = mkdir(bu_run_open_dir_.c_str(),
159  S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
160  if (retval != 0 && errno != EEXIST) {
161  throw cms::Exception("DaqDirector") << " Error creating bu run open dir -: "
162  << bu_run_open_dir_ << " mkdir error:" << strerror(errno)
163  << "\n";
164  }
165 
166  // the BU director does not need to know about the fu lock
167  bu_writelock_fd_ = open(bulockfile.c_str(),
168  O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU);
169  if (bu_writelock_fd_ == -1)
170  edm::LogWarning("EvFDaqDirector") << "problem with creating filedesc for buwritelock -: "
171  << strerror(errno);
172  else
173  edm::LogInfo("EvFDaqDirector") << "creating filedesc for buwritelock -: "
174  << bu_writelock_fd_;
175  bu_w_lock_stream = fdopen(bu_writelock_fd_, "w");
176  if (bu_w_lock_stream == 0)
177  edm::LogWarning("EvFDaqDirector")<< "Error creating write lock stream -: " << strerror(errno);
178 
179  // BU INITIALIZES LOCK FILE
180  // FU LOCK FILE OPEN
181  openFULockfileStream(fulockfile, true);
183  fflush(fu_rw_lock_stream);
184  close(fu_readwritelock_fd_);
185 
186  if (hltSourceDirectory_.size())
187  {
188  struct stat buf;
189  if (stat(hltSourceDirectory_.c_str(),&buf)==0) {
190  std::string hltdir=bu_run_dir_+"/hlt";
191  std::string tmphltdir=bu_run_open_dir_+"/hlt";
192  retval = mkdir(tmphltdir.c_str(),S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
193 
194  boost::filesystem::copy_file(hltSourceDirectory_+"/HltConfig.py",tmphltdir+"/HltConfig.py");
195  try {
196  boost::filesystem::copy_file(hltSourceDirectory_+"/CMSSW_VERSION",tmphltdir+"/CMSSW_VERSION");
197  boost::filesystem::copy_file(hltSourceDirectory_+"/SCRAM_ARCH",tmphltdir+"/SCRAM_ARCH");
198  } catch (...) {}
199 
200  boost::filesystem::copy_file(hltSourceDirectory_+"/fffParameters.jsn",tmphltdir+"/fffParameters.jsn");
201 
202  boost::filesystem::rename(tmphltdir,hltdir);
203  }
204  else
205  throw cms::Exception("DaqDirector") << " Error looking for HLT configuration -: " << hltSourceDirectory_;
206  }
207  //else{}//no configuration specified
208  }
209  else
210  {
211  // for FU, check if bu base dir exists
212 
213  retval = mkdir(bu_base_dir_.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
214  if (retval != 0 && errno != EEXIST) {
215  throw cms::Exception("DaqDirector") << " Error checking for bu base dir -: "
216  << bu_base_dir_ << " mkdir error:" << strerror(errno) << "\n";
217  }
218 
220  std::string fulockfile = bu_run_dir_ + "/fu.lock";
221  openFULockfileStream(fulockfile, false);
222  }
223 
224  pthread_mutex_init(&init_lock_,NULL);
225 
226  stopFilePath_ = run_dir_+"/CMSSW_STOP";
227  }
struct flock bu_w_fulk
T getUntrackedParameter(std::string const &, T const &) const
struct flock fu_rw_flk
std::string run_string_
void watchPreallocate(Preallocate::slot_type const &iSlot)
void openFULockfileStream(std::string &fuLockFilePath, bool create)
void watchPreGlobalEndLumi(PreGlobalEndLumi::slot_type const &iSlot)
pthread_mutex_t init_lock_
struct flock bu_r_fulk
#define NULL
Definition: scimark2.h:8
struct flock data_rw_flk
unsigned long previousFileSize_
unsigned int jumpIndex_
struct flock fu_rw_fulk
std::string hltSourceDirectory_
std::string stopFilePath_
std::string bu_base_dir_
std::string selectedTransferMode_
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
struct flock bu_w_flk
void preBeginRun(edm::GlobalContext const &globalContext)
void preSourceEvent(edm::StreamID const &streamID)
void preGlobalEndLumi(edm::GlobalContext const &globalContext)
void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const &iSlot)
std::string bu_run_dir_
void postEndRun(edm::GlobalContext const &globalContext)
unsigned int jumpLS_
void watchPreSourceEvent(PreSourceEvent::slot_type const &iSlot)
void preallocate(edm::service::SystemBounds const &bounds)
struct flock data_rw_fulk
std::string getRunOpenDirPath() const
struct flock bu_r_flk
std::string bu_run_open_dir_
evf::EvFDaqDirector::~EvFDaqDirector ( )

Definition at line 229 of file EvFDaqDirector.cc.

References fulocal_rwlock_fd2_, fulocal_rwlock_fd_, unlockFULocal(), and unlockFULocal2().

230  {
231  if (fulocal_rwlock_fd_!=-1) {
232  unlockFULocal();
233  close(fulocal_rwlock_fd_);
234  }
235 
236  if (fulocal_rwlock_fd2_!=-1) {
237  unlockFULocal2();
238  close(fulocal_rwlock_fd2_);
239  }
240 
241  }

Member Function Documentation

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

Definition at line 56 of file EvFDaqDirector.h.

References run_dir_.

56 {return run_dir_;}
std::string& evf::EvFDaqDirector::buBaseRunDir ( )
inline

Definition at line 57 of file EvFDaqDirector.h.

References bu_run_dir_.

57 {return bu_run_dir_;}
std::string bu_run_dir_
std::string& evf::EvFDaqDirector::buBaseRunOpenDir ( )
inline

Definition at line 58 of file EvFDaqDirector.h.

References bu_run_open_dir_.

58 {return bu_run_open_dir_;}
std::string bu_run_open_dir_
bool evf::EvFDaqDirector::bumpFile ( unsigned int &  ls,
unsigned int &  index,
std::string &  nextFile,
uint32_t &  fsize,
int  maxLS 
)
private

Definition at line 630 of file EvFDaqDirector.cc.

References evf::FastMonitoringService::accumulateFileSize(), fms_, getEoLSFilePathOnBU(), getInputJsonFilePath(), getNFilesFromEoLS(), cmsHarvester::index, python.rootplot.utilities::ls(), previousFileSize_, contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, and testModeNoBuilderUnit_.

Referenced by updateFuLock().

630  {
631 
632  if (previousFileSize_ != 0) {
633  if (!fms_) {
634  try {
636  } catch (...) {
637  edm::LogError("EvFDaqDirector") <<" FastMonitoringService not found";
638  }
639  }
641  previousFileSize_ = 0;
642  }
643 
644  //reached limit
645  if (maxLS>=0 && ls > (unsigned int)maxLS) return false;
646 
647  struct stat buf;
648  std::stringstream ss;
649  unsigned int nextIndex = index;
650  nextIndex++;
651 
652  // 1. Check suggested file
653  nextFile = getInputJsonFilePath(ls,index);
654  if (stat(nextFile.c_str(), &buf) == 0) {
655 
656  previousFileSize_ = buf.st_size;
657  fsize = buf.st_size;
658  return true;
659  }
660  // 2. No file -> lumi ended? (and how many?)
661  else {
662  std::string BUEoLSFile = getEoLSFilePathOnBU(ls);
663  bool eolFound = (stat(BUEoLSFile.c_str(), &buf) == 0);
664  unsigned int startingLumi = ls;
665  while (eolFound) {
666 
667  // recheck that no raw file appeared in the meantime
668  if (stat(nextFile.c_str(), &buf) == 0) {
669  previousFileSize_ = buf.st_size;
670  fsize = buf.st_size;
671  return true;
672  }
673 
674  int indexFilesInLS = getNFilesFromEoLS(BUEoLSFile);
675  if (indexFilesInLS < 0)
676  //parsing failed
677  return false;
678  else {
679  //check index
680  if ((int)index<indexFilesInLS) {
681  //we have 2 files, and check for 1 failed... retry (2 will never be here)
682  edm::LogError("EvFDaqDirector") << "Potential miss of index file in LS -: " << ls << ". Missing "
683  << nextFile << " because " << indexFilesInLS-1 << " is the highest index expected. Will not update fu.lock file";
684  return false;
685  }
686  }
687  // this lumi ended, check for files
688  ++ls;
689  index = 0;
690 
691  //reached limit
692  if (maxLS>=0 && ls > (unsigned int)maxLS) return false;
693 
694  nextFile = getInputJsonFilePath(ls,0);
695  if (stat(nextFile.c_str(), &buf) == 0) {
696  // a new file was found at new lumisection, index 0
697  previousFileSize_ = buf.st_size;
698  fsize = buf.st_size;
699 
701  // rename ended lumi to + 2
702  std::string sourceEol = getEoLSFilePathOnBU(startingLumi);
703 
704  std::string destEol = getEoLSFilePathOnBU(startingLumi+2);
705 
706  std::string cpCmd = "cp " + sourceEol + " " + destEol;
707  edm::LogInfo("EvFDaqDirector") << " testmode: Running copy cmd -: " << cpCmd;
708  int rc = system(cpCmd.c_str());
709  if (rc != 0) {
710  edm::LogError("EvFDaqDirector") << " testmode: COPY EOL FAILED!!!!! -: " << cpCmd;
711  }
712  }
713 
714  return true;
715  }
716  BUEoLSFile = getEoLSFilePathOnBU(ls);
717  eolFound = (stat(BUEoLSFile.c_str(), &buf) == 0);
718  }
719  }
720  // no new file found
721  return false;
722  }
void accumulateFileSize(unsigned int lumi, unsigned long fileSize)
std::string getEoLSFilePathOnBU(const unsigned int ls) const
unsigned long previousFileSize_
int getNFilesFromEoLS(std::string BUEoLSFile)
evf::FastMonitoringService * fms_
std::string getInputJsonFilePath(const unsigned int ls, const unsigned int index) const
void evf::EvFDaqDirector::checkTransferSystemPSet ( )

Definition at line 836 of file EvFDaqDirector.cc.

References Json::Value::append(), Json::arrayValue, alignCSCRings::dest, gather_cfg::destinations, edm::hlt::Exception, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), edm::getParameterSet(), edm::getProcessParameterSet(), alignBH_cfg::mode, edm::ParameterSet::psetTable(), requireTSPSet_, and transferSystemJson_.

Referenced by preallocate().

837  {
838  transferSystemJson_.reset(new Json::Value);
839  if (edm::getProcessParameterSet().existsAs<edm::ParameterSet>("transferSystem",true))
840  {
841  const edm::ParameterSet& tsPset(edm::getProcessParameterSet().getParameterSet("transferSystem"));
842 
843  Json::Value destinationsVal(Json::arrayValue);
844  std::vector<std::string> destinations = tsPset.getParameter<std::vector<std::string>>("destinations");
845  for (auto & dest: destinations) destinationsVal.append(dest);
846  (*transferSystemJson_)["destinations"]=destinationsVal;
847 
848  Json::Value modesVal(Json::arrayValue);
849  std::vector<std::string> modes = tsPset.getParameter< std::vector<std::string> >("transferModes");
850  for (auto & mode: modes) modesVal.append(mode);
851  (*transferSystemJson_)["transferModes"]=modesVal;
852 
853  for (auto psKeyItr =tsPset.psetTable().begin();psKeyItr!=tsPset.psetTable().end(); ++ psKeyItr) {
854  if (psKeyItr->first!="destinations" && psKeyItr->first!="transferModes") {
855  const edm::ParameterSet & streamDef = tsPset.getParameterSet(psKeyItr->first);
856  Json::Value streamVal;
857  for (auto & mode : modes) {
858  //validation
859  if (!streamDef.existsAs<std::vector<std::string>>(mode,true))
860  throw cms::Exception("EvFDaqDirector") << " Missing transfer system specification for -:" << psKeyItr->first << " (transferMode " << mode << ")";
861  std::vector<std::string> streamDestinations = streamDef.getParameter<std::vector<std::string>>(mode);
862 
863  Json::Value sDestsValue(Json::arrayValue);
864 
865  if (!streamDestinations.size())
866  throw cms::Exception("EvFDaqDirector") << " Missing transter system destination(s) for -: "<< psKeyItr->first << ", mode:" << mode;
867 
868  for (auto & sdest:streamDestinations) {
869  bool sDestValid=false;
870  sDestsValue.append(sdest);
871  for (auto & dest: destinations) {
872  if (dest==sdest) sDestValid=true;
873  }
874  if (!sDestValid)
875  throw cms::Exception("EvFDaqDirector") << " Invalid transter system destination specified for -: "<< psKeyItr->first << ", mode:" << mode << ", dest:"<<sdest;
876  }
877  streamVal[mode]=sDestsValue;
878  }
879  (*transferSystemJson_)[psKeyItr->first] = streamVal;
880  }
881  }
882  }
883  else {
884  if (requireTSPSet_)
885  throw cms::Exception("EvFDaqDirector") << "transferSystem PSet not found";
886  }
887  }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:185
std::shared_ptr< Json::Value > transferSystemJson_
ParameterSet const & getParameterSet(ParameterSetID const &id)
Represents a JSON value.
Definition: value.h:111
ParameterSet const & getProcessParameterSet()
Definition: Registry.cc:85
ParameterSet const & getParameterSet(std::string const &) const
tuple destinations
Definition: gather_cfg.py:120
array value (ordered list)
Definition: value.h:31
void evf::EvFDaqDirector::createRunOpendirMaybe ( )

Definition at line 808 of file EvFDaqDirector.cc.

References getRunOpenDirPath(), LogDebug, and cmsHarvester::path.

Referenced by EvFDaqDirector().

808  {
809  // create open dir if not already there
810 
812  if (!boost::filesystem::is_directory(openPath)) {
813  LogDebug("EvFDaqDirector") << "<open> FU dir not found. Creating... -:" << openPath.string();
814  boost::filesystem::create_directories(openPath);
815  }
816  }
#define LogDebug(id)
tuple path
else: Piece not in the list, fine.
std::string getRunOpenDirPath() const
std::string evf::EvFDaqDirector::eolsFileName ( const unsigned int  ls) const
private
std::string evf::EvFDaqDirector::eorFileName ( ) const
private
std::string evf::EvFDaqDirector::findCurrentRunDir ( )
inline

Definition at line 60 of file EvFDaqDirector.h.

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

60 { return dirManager_.findRunDir(run_);}
std::string findRunDir(unsigned int)
Definition: DirManager.cc:37
std::string evf::EvFDaqDirector::getBoLSFilePathOnFU ( const unsigned int  ls) const

Definition at line 401 of file EvFDaqDirector.cc.

References fffnaming::bolsFileName(), run_, and run_dir_.

Referenced by FedRawDataInputSource::createBoLSFile().

401  {
402  return run_dir_ + "/" + fffnaming::bolsFileName(run_,ls);
403  }
std::string bolsFileName(const unsigned int run, const unsigned int ls)
std::string evf::EvFDaqDirector::getEoLSFilePathOnBU ( const unsigned int  ls) const

Definition at line 393 of file EvFDaqDirector.cc.

References bu_run_dir_, fffnaming::eolsFileName(), and run_.

Referenced by bumpFile(), and FedRawDataInputSource::checkNextEvent().

393  {
394  return bu_run_dir_ + "/" + fffnaming::eolsFileName(run_,ls);
395  }
std::string bu_run_dir_
std::string eolsFileName(const unsigned int run, const unsigned int ls)
std::string evf::EvFDaqDirector::getEoLSFilePathOnFU ( const unsigned int  ls) const

Definition at line 397 of file EvFDaqDirector.cc.

References fffnaming::eolsFileName(), run_, and run_dir_.

Referenced by FedRawDataInputSource::checkNextEvent(), FedRawDataInputSource::maybeOpenNewLumiSection(), and updateFuLock().

397  {
398  return run_dir_ + "/" + fffnaming::eolsFileName(run_,ls);
399  }
std::string eolsFileName(const unsigned int run, const unsigned int ls)
std::string evf::EvFDaqDirector::getEoRFilePath ( ) const

Definition at line 405 of file EvFDaqDirector.cc.

References bu_run_dir_, fffnaming::eorFileName(), and run_.

Referenced by updateFuLock().

405  {
406  return bu_run_dir_ + "/" + fffnaming::eorFileName(run_);
407  }
std::string eorFileName(const unsigned int run)
std::string bu_run_dir_
std::string evf::EvFDaqDirector::getEoRFilePathOnFU ( ) const

Definition at line 410 of file EvFDaqDirector.cc.

References fffnaming::eorFileName(), run_, and run_dir_.

Referenced by FedRawDataInputSource::checkNextEvent().

410  {
411  return run_dir_ + "/" + fffnaming::eorFileName(run_);
412  }
std::string eorFileName(const unsigned int run)
std::string evf::EvFDaqDirector::getInitFilePath ( std::string const &  stream) const

Definition at line 365 of file EvFDaqDirector.cc.

References fffnaming::initFileNameWithPid(), run_, and run_dir_.

Referenced by DQMFileSaver::globalBeginRun().

365  {
367  }
std::string initFileNameWithPid(const unsigned int run, const unsigned int ls, std::string const &stream)
std::string evf::EvFDaqDirector::getInputJsonFilePath ( const unsigned int  ls,
const unsigned int  index 
) const

Definition at line 324 of file EvFDaqDirector.cc.

References bu_run_dir_, fffnaming::inputJsonFileName(), and run_.

Referenced by bumpFile().

324  {
326  }
std::string inputJsonFileName(const unsigned int run, const unsigned int ls, const unsigned int index)
std::string bu_run_dir_
std::string evf::EvFDaqDirector::getJumpFilePath ( ) const
inline

Definition at line 93 of file EvFDaqDirector.h.

References bu_run_dir_, getRunNumber(), fffnaming::inputRawFileName(), jumpIndex_, and jumpLS_.

Referenced by FedRawDataInputSource::renameToNextFree().

std::string inputRawFileName(const unsigned int run, const unsigned int ls, const unsigned int index)
unsigned int jumpIndex_
std::string bu_run_dir_
unsigned int getRunNumber() const
unsigned int jumpLS_
unsigned int evf::EvFDaqDirector::getJumpIndex ( ) const
inline

Definition at line 92 of file EvFDaqDirector.h.

References jumpIndex_.

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

Definition at line 91 of file EvFDaqDirector.h.

References jumpLS_.

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

Definition at line 357 of file EvFDaqDirector.cc.

References hostname_, run_, run_dir_, and fffnaming::streamerDataChecksumFileNameWithInstance().

357  {
359  }
std::string streamerDataChecksumFileNameWithInstance(const unsigned int run, const unsigned int ls, std::string const &stream, std::string const &instance)
std::string evf::EvFDaqDirector::getMergedDatFilePath ( const unsigned int  ls,
std::string const &  stream 
) const

Definition at line 353 of file EvFDaqDirector.cc.

References hostname_, run_, run_dir_, and fffnaming::streamerDataFileNameWithInstance().

Referenced by maybeCreateAndLockFileHeadForStream().

353  {
355  }
std::string streamerDataFileNameWithInstance(const unsigned int run, const unsigned int ls, std::string const &stream, std::string const &instance)
std::string evf::EvFDaqDirector::getMergedProtocolBufferHistogramFilePath ( const unsigned int  ls,
std::string const &  stream 
) const

Definition at line 377 of file EvFDaqDirector.cc.

References hostname_, fffnaming::protocolBufferHistogramFileNameWithInstance(), run_, and run_dir_.

377  {
379  }
std::string protocolBufferHistogramFileNameWithInstance(const unsigned int run, const unsigned int ls, std::string const &stream, std::string const &instance)
std::string evf::EvFDaqDirector::getMergedRootHistogramFilePath ( const unsigned int  ls,
std::string const &  stream 
) const

Definition at line 389 of file EvFDaqDirector.cc.

References hostname_, fffnaming::rootHistogramFileNameWithInstance(), run_, and run_dir_.

389  {
391  }
std::string rootHistogramFileNameWithInstance(const unsigned int run, const unsigned int ls, std::string const &stream, std::string const &instance)
int evf::EvFDaqDirector::getNFilesFromEoLS ( std::string  BUEoLSFile)
private

Definition at line 569 of file EvFDaqDirector.cc.

References bu_run_dir_, data, def, jsoncollector::DataPoint::deserialize(), eolsNFilesIndex_, jsoncollector::DataPoint::getData(), jsoncollector::DataPoint::getDefinition(), jsoncollector::DataPointDefinition::getNames(), i, Json::Reader::parse(), readEolsDefinition_, matplotRender::reader, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by bumpFile().

569  {
570 
571  boost::filesystem::ifstream ij(BUEoLSFile);
572  Json::Value deserializeRoot;
574 
575  if (!reader.parse(ij, deserializeRoot)) {
576  edm::LogError("EvFDaqDirector") << "Cannot deserialize input JSON file -:" << BUEoLSFile;
577  return -1;
578  }
579 
581  DataPoint dp;
582  dp.deserialize(deserializeRoot);
583 
584  //read definition
585  if (readEolsDefinition_) {
586  //std::string def = boost::algorithm::trim(dp.getDefinition());
588  if (!def.size()) readEolsDefinition_=false;
589  while (def.size()) {
590  std::string fullpath;
591  if (def.find('/')==0)
592  fullpath = def;
593  else
594  fullpath = bu_run_dir_+'/'+def;
595  struct stat buf;
596  if (stat(fullpath.c_str(), &buf) == 0) {
597  DataPointDefinition eolsDpd;
598  std::string defLabel = "legend";
599  DataPointDefinition::getDataPointDefinitionFor(fullpath, &eolsDpd,&defLabel);
600  if (eolsDpd.getNames().size()==0) {
601  //try with "data" label if "legend" format is not used
602  eolsDpd = DataPointDefinition();
603  defLabel="data";
604  DataPointDefinition::getDataPointDefinitionFor(fullpath, &eolsDpd,&defLabel);
605  }
606  for (unsigned int i=0;i<eolsDpd.getNames().size();i++)
607  if (eolsDpd.getNames().at(i)=="NFiles")
609  readEolsDefinition_=false;
610  break;
611  }
612  //check if we can still find definition
613  if (def.size()<=1 || def.find('/')==std::string::npos) {
614  readEolsDefinition_=false;
615  break;
616  }
617  def = def.substr(def.find('/')+1);
618  }
619  }
620 
621  if (dp.getData().size()>eolsNFilesIndex_)
622  data = dp.getData()[eolsNFilesIndex_];
623  else {
624  edm::LogError("EvFDaqDirector") << " error reading number of files from BU JSON -: " << BUEoLSFile;
625  return -1;
626  }
627  return boost::lexical_cast<int>(data);
628  }
std::vector< std::string > & getData()
Definition: DataPoint.h:58
int i
Definition: DBlmapReader.cc:9
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
virtual void deserialize(Json::Value &root)
Definition: DataPoint.cc:56
unsigned int eolsNFilesIndex_
std::string & getDefinition()
Definition: DataPoint.h:59
std::string bu_run_dir_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
Unserialize a JSON document into a Value.
Definition: reader.h:16
std::vector< std::string > const & getNames()
JetCorrectorParameters::Definitions def
Definition: classes.h:6
std::string evf::EvFDaqDirector::getOpenDatFilePath ( const unsigned int  ls,
std::string const &  stream 
) const

Definition at line 341 of file EvFDaqDirector.cc.

References run_, run_dir_, and fffnaming::streamerDataFileNameWithPid().

341  {
343  }
std::string streamerDataFileNameWithPid(const unsigned int run, const unsigned int ls, std::string const &stream)
std::string evf::EvFDaqDirector::getOpenInitFilePath ( std::string const &  stream) const

Definition at line 361 of file EvFDaqDirector.cc.

References fffnaming::initFileNameWithPid(), run_, and run_dir_.

361  {
362  return run_dir_ + "/open/" + fffnaming::initFileNameWithPid(run_,0,stream);
363  }
std::string initFileNameWithPid(const unsigned int run, const unsigned int ls, std::string const &stream)
std::string evf::EvFDaqDirector::getOpenInputJsonFilePath ( const unsigned int  ls,
const unsigned int  index 
) const

Definition at line 337 of file EvFDaqDirector.cc.

References bu_run_dir_, fffnaming::inputJsonFileName(), and run_.

337  {
339  }
std::string inputJsonFileName(const unsigned int run, const unsigned int ls, const unsigned int index)
std::string bu_run_dir_
std::string evf::EvFDaqDirector::getOpenOutputJsonFilePath ( const unsigned int  ls,
std::string const &  stream 
) const

Definition at line 345 of file EvFDaqDirector.cc.

References run_, run_dir_, and fffnaming::streamerJsonFileNameWithPid().

345  {
347  }
std::string streamerJsonFileNameWithPid(const unsigned int run, const unsigned int ls, std::string const &stream)
std::string evf::EvFDaqDirector::getOpenProtocolBufferHistogramFilePath ( const unsigned int  ls,
std::string const &  stream 
) const

Definition at line 369 of file EvFDaqDirector.cc.

References fffnaming::protocolBufferHistogramFileNameWithPid(), run_, and run_dir_.

369  {
371  }
std::string protocolBufferHistogramFileNameWithPid(const unsigned int run, const unsigned int ls, std::string const &stream)
std::string evf::EvFDaqDirector::getOpenRawFilePath ( const unsigned int  ls,
const unsigned int  index 
) const

Definition at line 333 of file EvFDaqDirector.cc.

References bu_run_dir_, fffnaming::inputRawFileName(), and run_.

333  {
334  return bu_run_dir_ + "/open/" + fffnaming::inputRawFileName(run_,ls,index);
335  }
std::string inputRawFileName(const unsigned int run, const unsigned int ls, const unsigned int index)
std::string bu_run_dir_
std::string evf::EvFDaqDirector::getOpenRootHistogramFilePath ( const unsigned int  ls,
std::string const &  stream 
) const

Definition at line 381 of file EvFDaqDirector.cc.

References fffnaming::rootHistogramFileNameWithPid(), run_, and run_dir_.

381  {
383  }
std::string rootHistogramFileNameWithPid(const unsigned int run, const unsigned int ls, std::string const &stream)
std::string evf::EvFDaqDirector::getOutputJsonFilePath ( const unsigned int  ls,
std::string const &  stream 
) const

Definition at line 349 of file EvFDaqDirector.cc.

References run_, run_dir_, and fffnaming::streamerJsonFileNameWithPid().

349  {
351  }
std::string streamerJsonFileNameWithPid(const unsigned int run, const unsigned int ls, std::string const &stream)
std::string evf::EvFDaqDirector::getProtocolBufferHistogramFilePath ( const unsigned int  ls,
std::string const &  stream 
) const

Definition at line 373 of file EvFDaqDirector.cc.

References fffnaming::protocolBufferHistogramFileNameWithPid(), run_, and run_dir_.

373  {
375  }
std::string protocolBufferHistogramFileNameWithPid(const unsigned int run, const unsigned int ls, std::string const &stream)
std::string evf::EvFDaqDirector::getRawFilePath ( const unsigned int  ls,
const unsigned int  index 
) const

Definition at line 329 of file EvFDaqDirector.cc.

References bu_run_dir_, fffnaming::inputRawFileName(), and run_.

Referenced by removeFile().

329  {
331  }
std::string inputRawFileName(const unsigned int run, const unsigned int ls, const unsigned int index)
std::string bu_run_dir_
std::string evf::EvFDaqDirector::getRootHistogramFilePath ( const unsigned int  ls,
std::string const &  stream 
) const

Definition at line 385 of file EvFDaqDirector.cc.

References fffnaming::rootHistogramFileNameWithPid(), run_, and run_dir_.

385  {
387  }
std::string rootHistogramFileNameWithPid(const unsigned int run, const unsigned int ls, std::string const &stream)
unsigned int evf::EvFDaqDirector::getRunNumber ( ) const
inline

Definition at line 90 of file EvFDaqDirector.h.

References run_.

Referenced by getJumpFilePath().

90 { return run_; }
std::string evf::EvFDaqDirector::getRunOpenDirPath ( ) const
inline

Definition at line 83 of file EvFDaqDirector.h.

References run_dir_.

Referenced by createRunOpendirMaybe(), and EvFDaqDirector().

83 {return run_dir_ +"/open";}
std::string evf::EvFDaqDirector::getStreamDestinations ( std::string const &  stream) const

Definition at line 889 of file EvFDaqDirector.cc.

References Json::Value::begin(), Json::Value::end(), edm::hlt::Exception, producerFileCleanner::msg, requireTSPSet_, run_regression::ret, selectedTransferMode_, edmStreamStallGrapher::stream, AlCaHLTBitMon_QueryRunRegistry::string, and transferSystemJson_.

890  {
891  std::string streamRequestName;
892  if (transferSystemJson_->isMember(stream.c_str()))
893  streamRequestName = stream;
894  else {
895  std::stringstream msg;
896  msg << "Transfer system mode definitions missing for -: " << stream;
897  if (requireTSPSet_)
898  throw cms::Exception("EvFDaqDirector") << msg.str();
899  else {
900  edm::LogWarning("EvFDaqDirector") << msg.str() << " (permissive mode)";
901  return std::string("Failsafe");
902  }
903  }
904  //return empty if strict check parameter is not on
906  edm::LogWarning("EvFDaqDirector") << "Selected mode string is not provided as DaqDirector parameter."
907  << "Switch on requireTSPSet parameter to enforce this requirement. Setting mode to empty string.";
908  return std::string("Failsafe");
909  }
911  throw cms::Exception("EvFDaqDirector") << "Selected mode string is not provided as DaqDirector parameter.";
912  }
913  //check if stream has properly listed transfer stream
914  if (!transferSystemJson_->get(streamRequestName, "").isMember(selectedTransferMode_.c_str()))
915  {
916  std::stringstream msg;
917  msg << "Selected transfer mode " << selectedTransferMode_ << " is not specified for stream " << streamRequestName;
918  if (requireTSPSet_)
919  throw cms::Exception("EvFDaqDirector") << msg.str();
920  else
921  edm::LogWarning("EvFDaqDirector") << msg.str() << " (permissive mode)";
922  return std::string("Failsafe");
923  }
924  Json::Value destsVec = transferSystemJson_->get(streamRequestName, "").get(selectedTransferMode_,"");
925 
926  //flatten string json::Array into CSV std::string
928  for (Json::Value::iterator it = destsVec.begin(); it!=destsVec.end(); it++)
929  {
930  if (ret!="") ret +=",";
931  ret+=(*it).asString();
932  }
933  return ret;
934  }
const_iterator begin() const
std::shared_ptr< Json::Value > transferSystemJson_
Represents a JSON value.
Definition: value.h:111
std::string selectedTransferMode_
const_iterator end() const
Iterator for object and array value.
Definition: value.h:1007
std::vector<int>* evf::EvFDaqDirector::getStreamFileTracker ( )
inline

Definition at line 101 of file EvFDaqDirector.h.

References streamFileTracker_.

Referenced by FedRawDataInputSource::getNextEvent().

101 {return &streamFileTracker_;}
std::vector< int > streamFileTracker_
bool evf::EvFDaqDirector::getTestModeNoBuilderUnit ( )
inline

Definition at line 94 of file EvFDaqDirector.h.

References testModeNoBuilderUnit_.

94 { return testModeNoBuilderUnit_;}
std::string evf::EvFDaqDirector::initFileName ( std::string const &  stream) const
private
std::string evf::EvFDaqDirector::inputFileNameStem ( const unsigned int  ls,
const unsigned int  index 
) const
private
bool evf::EvFDaqDirector::isSingleStreamThread ( )
inline

Definition at line 102 of file EvFDaqDirector.h.

References nStreams_, and nThreads_.

Referenced by FedRawDataInputSource::getNextEvent().

102 {return nStreams_==1 && nThreads_==1;}
unsigned int nThreads_
unsigned int nStreams_
void evf::EvFDaqDirector::lockFULocal ( )

Definition at line 786 of file EvFDaqDirector.cc.

References fulocal_rwlock_fd_.

Referenced by updateFuLock().

786  {
787  //fcntl(fulocal_rwlock_fd_, F_SETLKW, &fulocal_rw_flk);
788  flock(fulocal_rwlock_fd_,LOCK_EX);
789  }
void evf::EvFDaqDirector::lockFULocal2 ( )

Definition at line 797 of file EvFDaqDirector.cc.

References fulocal_rwlock_fd2_.

Referenced by FedRawDataInputSource::checkNextEvent(), and FedRawDataInputSource::maybeOpenNewLumiSection().

797  {
798  //fcntl(fulocal_rwlock_fd2_, F_SETLKW, &fulocal_rw_flk2);
799  flock(fulocal_rwlock_fd2_,LOCK_EX);
800  }
void evf::EvFDaqDirector::lockInitLock ( )

Definition at line 778 of file EvFDaqDirector.cc.

References init_lock_.

778  {
779  pthread_mutex_lock(&init_lock_);
780  }
pthread_mutex_t init_lock_
FILE * evf::EvFDaqDirector::maybeCreateAndLockFileHeadForStream ( unsigned int  ls,
std::string &  stream 
)

Definition at line 758 of file EvFDaqDirector.cc.

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

758  {
759  data_rw_stream = fopen(getMergedDatFilePath(ls,stream).c_str(), "a"); //open stream for appending
761  if (data_readwrite_fd_ == -1)
762  edm::LogError("EvFDaqDirector") << "problem with creating filedesc for datamerge "
763  << strerror(errno);
764  else
765  LogDebug("EvFDaqDirector") << "creating filedesc for datamerge -: "
767  fcntl(data_readwrite_fd_, F_SETLKW, &data_rw_flk);
768 
769  return data_rw_stream;
770  }
#define LogDebug(id)
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
void evf::EvFDaqDirector::openFULockfileStream ( std::string &  fuLockFilePath,
bool  create 
)
private

Definition at line 739 of file EvFDaqDirector.cc.

References fu_readwritelock_fd_, fu_rw_lock_stream, and LogDebug.

Referenced by EvFDaqDirector().

739  {
740  if (create) {
741  fu_readwritelock_fd_ = open(fulockfile.c_str(), O_RDWR | O_CREAT,
742  S_IRWXU | S_IWGRP | S_IRGRP | S_IWOTH | S_IROTH);
743  chmod(fulockfile.c_str(),0766);
744  } else {
745  fu_readwritelock_fd_ = open(fulockfile.c_str(), O_RDWR, S_IRWXU);
746  }
747  if (fu_readwritelock_fd_ == -1)
748  edm::LogError("EvFDaqDirector") << "problem with creating filedesc for fuwritelock -: " << fulockfile.c_str()
749  << " create:" << create << " error:" << strerror(errno);
750  else
751  LogDebug("EvFDaqDirector") << "creating filedesc for fureadwritelock -: "
753 
754  fu_rw_lock_stream = fdopen(fu_readwritelock_fd_, "r+");
755  }
#define LogDebug(id)
SurfaceDeformation * create(int type, const std::vector< double > &params)
bool evf::EvFDaqDirector::outputAdler32Recheck ( ) const
inline

Definition at line 84 of file EvFDaqDirector.h.

References outputAdler32Recheck_.

std::string evf::EvFDaqDirector::outputFileNameStem ( const unsigned int  ls,
std::string const &  stream 
) const
private
void evf::EvFDaqDirector::postEndRun ( edm::GlobalContext const &  globalContext)

Definition at line 243 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().

243  {
244  close(bu_readlock_fd_);
245  close(bu_writelock_fd_);
246  if (directorBu_) {
247  std::string filename = bu_run_dir_ + "/bu.lock";
248  removeFile(filename);
249  }
250  }
void removeFile(unsigned int ls, unsigned int index)
std::string bu_run_dir_
tuple filename
Definition: lut2db_cfg.py:20
void evf::EvFDaqDirector::preallocate ( edm::service::SystemBounds const &  bounds)

Definition at line 252 of file EvFDaqDirector.cc.

References checkTransferSystemPSet(), i, edm::service::SystemBounds::maxNumberOfStreams(), edm::service::SystemBounds::maxNumberOfThreads(), nStreams_, nThreads_, and streamFileTracker_.

Referenced by EvFDaqDirector().

252  {
253 
254  for (unsigned int i=0;i<bounds.maxNumberOfStreams();i++){
255  streamFileTracker_.push_back(-1);
256  }
257  nThreads_=bounds.maxNumberOfStreams();
258  nStreams_=bounds.maxNumberOfThreads();
259 
261  }
unsigned int nThreads_
int i
Definition: DBlmapReader.cc:9
std::vector< int > streamFileTracker_
unsigned int nStreams_
void evf::EvFDaqDirector::preBeginRun ( edm::GlobalContext const &  globalContext)

Definition at line 263 of file EvFDaqDirector.cc.

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

Referenced by EvFDaqDirector().

263  {
264 
265  //assert(run_ == id.run());
266 
267  // check if the requested run is the latest one - issue a warning if it isn't
269  edm::LogWarning("EvFDaqDirector") << "WARNING - checking run dir -: "
270  << run_dir_ << ". This is not the highest run "
272  }
273  }
std::string findHighestRunDir()
Definition: DirManager.cc:20
void evf::EvFDaqDirector::preGlobalEndLumi ( edm::GlobalContext const &  globalContext)

Definition at line 275 of file EvFDaqDirector.cc.

References cppFunctionSkipper::exception, fileDeleteLockPtr_, filesToDeletePtr_, LogDebug, python.rootplot.utilities::ls(), edm::LuminosityBlockID::luminosityBlock(), edm::GlobalContext::luminosityBlockID(), cmsHarvester::path, and python.multivaluedict::remove().

Referenced by EvFDaqDirector().

276  {
277  //delete all files belonging to just closed lumi
278  unsigned int ls = globalContext.luminosityBlockID().luminosityBlock();
280  edm::LogWarning("EvFDaqDirector") << " Handles to check for files to delete were not set by the input source...";
281  return;
282  }
283 
284  std::unique_lock<std::mutex> lkw(*fileDeleteLockPtr_);
285  auto it = filesToDeletePtr_->begin();
286  while (it!=filesToDeletePtr_->end()) {
287  if (it->second->lumi_ == ls) {
288  const boost::filesystem::path filePath(it->second->fileName_);
289  LogDebug("EvFDaqDirector") << "Deleting input file -:" << it->second->fileName_;
290  try {
291  //rarely this fails but file gets deleted
292  boost::filesystem::remove(filePath);
293  }
294  catch (const boost::filesystem::filesystem_error& ex)
295  {
296  edm::LogError("EvFDaqDirector") << " - deleteFile BOOST FILESYSTEM ERROR CAUGHT -: " << ex.what() << ". Trying again.";
297  usleep(10000);
298  try {
299  boost::filesystem::remove(filePath);
300  }
301  catch (...) {/*file gets deleted first time but exception is still thrown*/}
302  }
303  catch (std::exception& ex)
304  {
305  edm::LogError("EvFDaqDirector") << " - deleteFile std::exception CAUGHT -: " << ex.what() << ". Trying again.";
306  usleep(10000);
307  try {
308  boost::filesystem::remove(filePath);
309  } catch (...) {/*file gets deleted first time but exception is still thrown*/}
310  }
311 
312  delete it->second;
313  it = filesToDeletePtr_->erase(it);
314  }
315  else it++;
316  }
317  }
#define LogDebug(id)
std::list< std::pair< int, InputFile * > > * filesToDeletePtr_
std::mutex * fileDeleteLockPtr_
tuple path
else: Piece not in the list, fine.
void evf::EvFDaqDirector::preSourceEvent ( edm::StreamID const &  streamID)
inline

Definition at line 319 of file EvFDaqDirector.cc.

References currentFileIndex_, and streamFileTracker_.

Referenced by EvFDaqDirector().

319  {
321  }
std::vector< int > streamFileTracker_
int evf::EvFDaqDirector::readLastLSEntry ( std::string const &  file)

Definition at line 819 of file EvFDaqDirector.cc.

References Json::Value::asInt(), mergeVDriftHistosByStation::file, Json::Value::get(), Json::Reader::parse(), matplotRender::reader, and run_regression::ret.

Referenced by updateFuLock().

819  {
820 
821  boost::filesystem::ifstream ij(file);
822  Json::Value deserializeRoot;
824 
825  if (!reader.parse(ij, deserializeRoot)) {
826  edm::LogError("EvFDaqDirector") << "Cannot deserialize input JSON file -:" << file;
827  return -1;
828  }
829 
830  int ret = deserializeRoot.get("lastLS","").asInt();
831  return ret;
832 
833  }
Value get(UInt index, const Value &defaultValue) 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
Int asInt() const
Unserialize a JSON document into a Value.
Definition: reader.h:16
void evf::EvFDaqDirector::removeFile ( unsigned int  ls,
unsigned int  index 
)

Definition at line 421 of file EvFDaqDirector.cc.

References getRawFilePath().

Referenced by postEndRun().

421  {
423  }
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 414 of file EvFDaqDirector.cc.

414  {
415  int retval = remove(filename.c_str());
416  if (retval != 0)
417  edm::LogError("EvFDaqDirector") << "Could not remove used file -: " << filename << ". error = "
418  << strerror(errno);
419  }
tuple filename
Definition: lut2db_cfg.py:20
void evf::EvFDaqDirector::setDeleteTracking ( std::mutex fileDeleteLock,
std::list< std::pair< int, InputFile * >> *  filesToDelete 
)
inline

Definition at line 109 of file EvFDaqDirector.h.

References fileDeleteLockPtr_, and filesToDeletePtr_.

Referenced by FedRawDataInputSource::FedRawDataInputSource().

109  {
110  fileDeleteLockPtr_=fileDeleteLock;
111  filesToDeletePtr_ = filesToDelete;
112  }
std::list< std::pair< int, InputFile * > > * filesToDeletePtr_
std::mutex * fileDeleteLockPtr_
void evf::EvFDaqDirector::setFMS ( evf::FastMonitoringService fms)
inline

Definition at line 99 of file EvFDaqDirector.h.

References fms_.

Referenced by FedRawDataInputSource::FedRawDataInputSource().

99 {fms_=fms;}
evf::FastMonitoringService * fms_
void evf::EvFDaqDirector::tryInitializeFuLockFile ( )

Definition at line 724 of file EvFDaqDirector.cc.

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

Referenced by EvFDaqDirector().

724  {
725  if (fu_rw_lock_stream == 0)
726  edm::LogError("EvFDaqDirector") << "Error creating fu read/write lock stream "
727  << strerror(errno);
728  else {
729  edm::LogInfo("EvFDaqDirector") << "Initializing FU LOCK FILE";
730  unsigned int readLs = 1, readIndex = 0, jumpLs = 3, jumpIndex = 0;
732  fprintf(fu_rw_lock_stream, "%u %u %u %u", readLs, readIndex,
733  jumpLs, jumpIndex);
734  else
735  fprintf(fu_rw_lock_stream, "%u %u", readLs, readIndex);
736  }
737  }
void evf::EvFDaqDirector::unlockAndCloseMergeStream ( )

Definition at line 772 of file EvFDaqDirector.cc.

References data_readwrite_fd_, data_rw_fulk, and data_rw_stream.

772  {
773  fflush(data_rw_stream);
774  fcntl(data_readwrite_fd_, F_SETLKW, &data_rw_fulk);
775  fclose(data_rw_stream);
776  }
struct flock data_rw_fulk
void evf::EvFDaqDirector::unlockFULocal ( )

Definition at line 791 of file EvFDaqDirector.cc.

References fulocal_rwlock_fd_.

Referenced by FedRawDataInputSource::grabNextJsonFile(), and ~EvFDaqDirector().

791  {
792  //fcntl(fulocal_rwlock_fd_, F_SETLKW, &fulocal_rw_fulk);
793  flock(fulocal_rwlock_fd_,LOCK_UN);
794  }
void evf::EvFDaqDirector::unlockFULocal2 ( )

Definition at line 802 of file EvFDaqDirector.cc.

References fulocal_rwlock_fd2_.

Referenced by FedRawDataInputSource::checkNextEvent(), FedRawDataInputSource::maybeOpenNewLumiSection(), and ~EvFDaqDirector().

802  {
803  //fcntl(fulocal_rwlock_fd2_, F_SETLKW, &fulocal_rw_fulk2);
804  flock(fulocal_rwlock_fd2_,LOCK_UN);
805  }
void evf::EvFDaqDirector::unlockInitLock ( )

Definition at line 782 of file EvFDaqDirector.cc.

References init_lock_.

782  {
783  pthread_mutex_unlock(&init_lock_);
784  }
pthread_mutex_t init_lock_
void evf::EvFDaqDirector::updateFileIndex ( int const &  fileIndex)
inline

Definition at line 100 of file EvFDaqDirector.h.

References currentFileIndex_.

Referenced by FedRawDataInputSource::getNextEvent().

100 {currentFileIndex_=fileIndex;}
EvFDaqDirector::FileStatus evf::EvFDaqDirector::updateFuLock ( unsigned int &  ls,
std::string &  nextFile,
uint32_t &  fsize 
)

Definition at line 425 of file EvFDaqDirector.cc.

References bu_run_dir_, bumpFile(), DDVectorGetter::check(), fu_readwritelock_fd_, fu_rw_flk, fu_rw_fulk, fu_rw_lock_stream, getEoLSFilePathOnFU(), getEoRFilePath(), jumpIndex_, jumpLS_, lockFULocal(), LogDebug, python.rootplot.utilities::ls(), newFile, noFile, getHLTprescales::readIndex(), readLastLSEntry(), runEnded, stopFilePath_, and testModeNoBuilderUnit_.

Referenced by FedRawDataInputSource::readSupervisor().

425  {
426  EvFDaqDirector::FileStatus fileStatus = noFile;
427 
428  int retval = -1;
429  int lock_attempts = 0;
430 
431  struct stat buf;
432  int stopFileLS = -1;
433  if (stat(stopFilePath_.c_str(),&buf)==0) {
434  stopFileLS = readLastLSEntry(stopFilePath_);
435  edm::LogWarning("EvFDaqDirector") << "Detected stop request from hltd. Ending run for this process after LS -: " << stopFileLS;
436  //return runEnded;
437  }
438 
439  while (retval==-1) {
440  retval = fcntl(fu_readwritelock_fd_, F_SETLK, &fu_rw_flk);
441  if (retval==-1) usleep(50000);
442  else continue;
443 
444  lock_attempts++;
445  if (lock_attempts>100 || errno==116) {
446  if (errno==116)
447  edm::LogWarning("EvFDaqDirector") << "Stale lock file handle. Checking if run directory and fu.lock file are present" << std::endl;
448  else
449  edm::LogWarning("EvFDaqDirector") << "Unable to obtain a lock for 5 seconds. Checking if run directory and fu.lock file are present -: errno "
450  << errno <<":"<< strerror(errno) << std::endl;
451 
452 
453  if (stat(getEoLSFilePathOnFU(ls).c_str(),&buf)==0) {
454  edm::LogWarning("EvFDaqDirector") << "Detected local EoLS for lumisection "<< ls ;
455  ls++;
456  return noFile;
457  }
458 
459  if (stat(bu_run_dir_.c_str(), &buf)!=0) return runEnded;
460  if (stat((bu_run_dir_+"/fu.lock").c_str(), &buf)!=0) return runEnded;
461  lock_attempts=0;
462  }
463  }
464  if(retval!=0) return fileStatus;
465 
466 #ifdef DEBUG
467  timeval ts_lockend;
468  gettimeofday(&ts_lockend,0);
469 #endif
470 
471  // if the stream is readable
472  if (fu_rw_lock_stream != 0) {
473  unsigned int readLs, readIndex, jumpLs, jumpIndex;
474  int check = 0;
475  // rewind the stream
476  check = fseek(fu_rw_lock_stream, 0, SEEK_SET);
477  // if rewinded ok
478  if (check == 0) {
479  // read its' values
481  fscanf(fu_rw_lock_stream, "%u %u %u %u", &readLs, &readIndex,
482  &jumpLs, &jumpIndex);
483  else {
484  fscanf(fu_rw_lock_stream, "%u %u", &readLs, &readIndex);
485  edm::LogInfo("EvFDaqDirector") << "Read fu.lock file file -: " << readLs << ":" << readIndex;
486  }
487 
488  // try to bump
489  bool bumpedOk = bumpFile(readLs, readIndex, nextFile, fsize, stopFileLS);
490  ls = readLs;
491  // there is a new file to grab or lumisection ended
492  if (bumpedOk) {
493  // rewind and clear
494  check = fseek(fu_rw_lock_stream, 0, SEEK_SET);
495  if (check == 0) {
496  ftruncate(fu_readwritelock_fd_, 0);
497  fflush(fu_rw_lock_stream); //this should not be needed ???
498  } else
499  edm::LogError("EvFDaqDirector") << "seek on fu read/write lock for updating failed with error "
500  << strerror(errno);
501  // write new data
502  check = fseek(fu_rw_lock_stream, 0, SEEK_SET);
503  if (check == 0) {
504  // write next index in the file, which is the file the next process should take
506  fprintf(fu_rw_lock_stream, "%u %u %u %u", readLs,
507  readIndex + 1, readLs + 2, readIndex + 1);
508  jumpLS_ = readLs + 2;
510  } else {
511  fprintf(fu_rw_lock_stream, "%u %u", readLs,
512  readIndex + 1);
513  }
514  fflush(fu_rw_lock_stream);
515  fsync(fu_readwritelock_fd_);
516 
517  fileStatus = newFile;
518 
520  edm::LogInfo("EvFDaqDirector") << "Written to file -: " << readLs << ":"
521  << readIndex + 1 << " --> " << readLs + 2
522  << ":" << readIndex + 1;
523  else
524  LogDebug("EvFDaqDirector") << "Written to file -: " << readLs << ":"
525  << readIndex + 1;
526 
527  } else
528  edm::LogError("EvFDaqDirector") << "seek on fu read/write lock for updating failed with error "
529  << strerror(errno);
530  }
531  } else
532  edm::LogError("EvFDaqDirector") << "seek on fu read/write lock for reading failed with error "
533  << strerror(errno);
534  } else
535  edm::LogError("EvFDaqDirector") << "fu read/write lock stream is invalid " << strerror(errno);
536 
537 #ifdef DEBUG
538  timeval ts_preunlock;
539  gettimeofday(&ts_preunlock,0);
540  int locked_period_int = ts_preunlock.tv_sec - ts_lockend.tv_sec;
541  double locked_period=locked_period_int+double(ts_preunlock.tv_usec - ts_lockend.tv_usec)/1000000;
542 #endif
543 
544  //if new json is present, lock file which FedRawDataInputSource will later unlock
545  if (fileStatus==newFile) lockFULocal();
546 
547  //release lock at this point
548  int retvalu=-1;
549  retvalu=fcntl(fu_readwritelock_fd_, F_SETLKW, &fu_rw_fulk);
550  if (retvalu==-1) edm::LogError("EvFDaqDirector") << "Error unlocking the fu.lock " << strerror(errno);
551 
552 #ifdef DEBUG
553  edm::LogDebug("EvFDaqDirector") << "Waited during lock -: " << locked_period << " seconds";
554 #endif
555 
556  if ( fileStatus == noFile ) {
557  struct stat buf;
558  //edm::LogInfo("EvFDaqDirector") << " looking for EoR file: " << getEoRFilePath().c_str();
559  if ( stat(getEoRFilePath().c_str(), &buf) == 0 || stat(bu_run_dir_.c_str(), &buf)!=0)
560  fileStatus = runEnded;
561  if (stopFileLS>=0 && (int)ls > stopFileLS) {
562  edm::LogInfo("EvFDaqDirector") << "Reached maximum lumisection set by hltd";
563  fileStatus = runEnded;
564  }
565  }
566  return fileStatus;
567  }
#define LogDebug(id)
struct flock fu_rw_flk
std::string getEoRFilePath() const
unsigned int jumpIndex_
struct flock fu_rw_fulk
bool check(const std::string &)
std::string stopFilePath_
int readLastLSEntry(std::string const &file)
std::string bu_run_dir_
unsigned int jumpLS_
std::string getEoLSFilePathOnFU(const unsigned int ls) const
bool bumpFile(unsigned int &ls, unsigned int &index, std::string &nextFile, uint32_t &fsize, int maxLS)

Member Data Documentation

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

Definition at line 131 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector().

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

Definition at line 132 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector().

struct flock evf::EvFDaqDirector::bu_r_flk
private

Definition at line 166 of file EvFDaqDirector.h.

struct flock evf::EvFDaqDirector::bu_r_fulk
private

Definition at line 168 of file EvFDaqDirector.h.

FILE* evf::EvFDaqDirector::bu_r_lock_stream
private

Definition at line 154 of file EvFDaqDirector.h.

int evf::EvFDaqDirector::bu_readlock_fd_
private

Definition at line 146 of file EvFDaqDirector.h.

Referenced by postEndRun().

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

Definition at line 144 of file EvFDaqDirector.h.

Referenced by buBaseRunOpenDir(), and EvFDaqDirector().

FILE* evf::EvFDaqDirector::bu_t_monitor_stream
private

Definition at line 157 of file EvFDaqDirector.h.

struct flock evf::EvFDaqDirector::bu_w_flk
private

Definition at line 165 of file EvFDaqDirector.h.

struct flock evf::EvFDaqDirector::bu_w_fulk
private

Definition at line 167 of file EvFDaqDirector.h.

FILE* evf::EvFDaqDirector::bu_w_lock_stream
private

Definition at line 153 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector().

FILE* evf::EvFDaqDirector::bu_w_monitor_stream
private

Definition at line 156 of file EvFDaqDirector.h.

int evf::EvFDaqDirector::bu_writelock_fd_
private

Definition at line 147 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector(), and postEndRun().

int evf::EvFDaqDirector::currentFileIndex_ = -1
private

Definition at line 180 of file EvFDaqDirector.h.

Referenced by preSourceEvent(), and updateFileIndex().

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

Definition at line 171 of file EvFDaqDirector.h.

Referenced by maybeCreateAndLockFileHeadForStream().

struct flock evf::EvFDaqDirector::data_rw_fulk
private

Definition at line 172 of file EvFDaqDirector.h.

Referenced by unlockAndCloseMergeStream().

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

Definition at line 133 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector(), and postEndRun().

DirManager evf::EvFDaqDirector::dirManager_
private

Definition at line 160 of file EvFDaqDirector.h.

Referenced by findCurrentRunDir(), and preBeginRun().

unsigned int evf::EvFDaqDirector::eolsNFilesIndex_ = 1
private

Definition at line 191 of file EvFDaqDirector.h.

Referenced by getNFilesFromEoLS().

std::mutex* evf::EvFDaqDirector::fileDeleteLockPtr_ = nullptr
private

Definition at line 182 of file EvFDaqDirector.h.

Referenced by preGlobalEndLumi(), and setDeleteTracking().

std::list<std::pair<int,InputFile*> >* evf::EvFDaqDirector::filesToDeletePtr_ = nullptr
private

Definition at line 183 of file EvFDaqDirector.h.

Referenced by preGlobalEndLumi(), and setDeleteTracking().

evf::FastMonitoringService* evf::EvFDaqDirector::fms_ = nullptr
private

Definition at line 178 of file EvFDaqDirector.h.

Referenced by bumpFile(), and setFMS().

int evf::EvFDaqDirector::fu_readwritelock_fd_
private

Definition at line 148 of file EvFDaqDirector.h.

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

struct flock evf::EvFDaqDirector::fu_rw_flk
private

Definition at line 169 of file EvFDaqDirector.h.

Referenced by updateFuLock().

struct flock evf::EvFDaqDirector::fu_rw_fulk
private

Definition at line 170 of file EvFDaqDirector.h.

Referenced by updateFuLock().

FILE* evf::EvFDaqDirector::fu_rw_lock_stream
private
int evf::EvFDaqDirector::fulocal_rwlock_fd2_
private

Definition at line 151 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector(), lockFULocal2(), unlockFULocal2(), and ~EvFDaqDirector().

int evf::EvFDaqDirector::fulocal_rwlock_fd_
private

Definition at line 150 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector(), lockFULocal(), unlockFULocal(), and ~EvFDaqDirector().

std::string evf::EvFDaqDirector::hltSourceDirectory_
private

Definition at line 138 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector().

std::string evf::EvFDaqDirector::hostname_
private
pthread_mutex_t evf::EvFDaqDirector::init_lock_ = PTHREAD_MUTEX_INITIALIZER
private

Definition at line 185 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector(), lockInitLock(), and unlockInitLock().

unsigned int evf::EvFDaqDirector::jumpIndex_
private

Definition at line 163 of file EvFDaqDirector.h.

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

unsigned int evf::EvFDaqDirector::jumpLS_
private

Definition at line 163 of file EvFDaqDirector.h.

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

unsigned int evf::EvFDaqDirector::nStreams_ =0
private

Definition at line 187 of file EvFDaqDirector.h.

Referenced by isSingleStreamThread(), and preallocate().

unsigned int evf::EvFDaqDirector::nThreads_ =0
private

Definition at line 188 of file EvFDaqDirector.h.

Referenced by isSingleStreamThread(), and preallocate().

bool evf::EvFDaqDirector::outputAdler32Recheck_
private

Definition at line 135 of file EvFDaqDirector.h.

Referenced by outputAdler32Recheck().

unsigned long evf::EvFDaqDirector::previousFileSize_
private

Definition at line 162 of file EvFDaqDirector.h.

Referenced by bumpFile().

bool evf::EvFDaqDirector::readEolsDefinition_ = true
private

Definition at line 190 of file EvFDaqDirector.h.

Referenced by getNFilesFromEoLS().

bool evf::EvFDaqDirector::requireTSPSet_
private

Definition at line 136 of file EvFDaqDirector.h.

Referenced by checkTransferSystemPSet(), and getStreamDestinations().

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

Definition at line 141 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector().

std::string evf::EvFDaqDirector::selectedTransferMode_
private

Definition at line 137 of file EvFDaqDirector.h.

Referenced by getStreamDestinations().

std::string evf::EvFDaqDirector::stopFilePath_
private

Definition at line 192 of file EvFDaqDirector.h.

Referenced by EvFDaqDirector(), and updateFuLock().

std::vector<int> evf::EvFDaqDirector::streamFileTracker_
private

Definition at line 179 of file EvFDaqDirector.h.

Referenced by getStreamFileTracker(), preallocate(), and preSourceEvent().

bool evf::EvFDaqDirector::testModeNoBuilderUnit_
private
std::shared_ptr<Json::Value> evf::EvFDaqDirector::transferSystemJson_
private

Definition at line 194 of file EvFDaqDirector.h.

Referenced by checkTransferSystemPSet(), and getStreamDestinations().