CMS 3D CMS Logo

EvFDaqDirector.h
Go to the documentation of this file.
1 #ifndef EVENTFILTER_UTILTIES_PLUGINS_EVFDAQDIRECTOR
2 #define EVENTFILTER_UTILTIES_PLUGINS_EVFDAQDIRECTOR
3 
7 
10 
11 //std headers
12 #include <filesystem>
13 #include <iomanip>
14 #include <list>
15 #include <map>
16 #include <mutex>
17 #include <sstream>
18 #include <string>
19 #include <vector>
20 
21 //system headers
22 #include <sys/stat.h>
23 #include <sys/file.h>
24 #include <fcntl.h>
25 #include <cerrno>
26 #include <cstring>
27 #include <cstdio>
28 
29 #include <tbb/concurrent_hash_map.h>
30 #include <boost/asio.hpp>
31 
32 class SystemBounds;
33 class GlobalContext;
34 class StreamID;
35 
36 struct InputFile;
37 struct InputChunk;
38 
39 namespace edm {
40  class PathsAndConsumesOfModulesBase;
41  class ProcessContext;
42 } // namespace edm
43 
44 namespace Json {
45  class Value;
46 }
47 
48 namespace jsoncollector {
49  class DataPointDefinition;
50 }
51 
52 namespace edm {
54 }
55 
56 namespace evf {
57 
59 
61 
63  public:
65 
68  void initRun();
69  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
70  void preallocate(edm::service::SystemBounds const& bounds);
72  void preBeginRun(edm::GlobalContext const& globalContext);
73  void postEndRun(edm::GlobalContext const& globalContext);
74  void preGlobalEndLumi(edm::GlobalContext const& globalContext);
75  void overrideRunNumber(unsigned int run) { run_ = run; }
79  bool useFileBroker() const { return useFileBroker_; }
80 
82  std::string getInputJsonFilePath(const unsigned int ls, const unsigned int index) const;
83  std::string getRawFilePath(const unsigned int ls, const unsigned int index) const;
84  std::string getOpenRawFilePath(const unsigned int ls, const unsigned int index) const;
85  std::string getOpenInputJsonFilePath(const unsigned int ls, const unsigned int index) const;
86  std::string getDatFilePath(const unsigned int ls, std::string const& stream) const;
87  std::string getOpenDatFilePath(const unsigned int ls, std::string const& stream) const;
88  std::string getOpenOutputJsonFilePath(const unsigned int ls, std::string const& stream) const;
89  std::string getOutputJsonFilePath(const unsigned int ls, std::string const& stream) const;
90  std::string getMergedDatFilePath(const unsigned int ls, std::string const& stream) const;
91  std::string getMergedDatChecksumFilePath(const unsigned int ls, std::string const& stream) const;
95  std::string getProtocolBufferHistogramFilePath(const unsigned int ls, std::string const& stream) const;
97  std::string getOpenRootHistogramFilePath(const unsigned int ls, std::string const& stream) const;
98  std::string getRootHistogramFilePath(const unsigned int ls, std::string const& stream) const;
99  std::string getMergedRootHistogramFilePath(const unsigned int ls, std::string const& stream) const;
100  std::string getEoLSFilePathOnBU(const unsigned int ls) const;
101  std::string getEoLSFilePathOnFU(const unsigned int ls) const;
102  std::string getBoLSFilePathOnFU(const unsigned int ls) const;
103  std::string getEoRFilePath() const;
106  std::string getRunOpenDirPath() const { return run_dir_ + "/open"; }
108  void removeFile(unsigned int ls, unsigned int index);
109  void removeFile(std::string);
110 
111  FileStatus updateFuLock(unsigned int& ls,
112  std::string& nextFile,
113  uint32_t& fsize,
114  uint16_t& rawHeaderSize,
115  uint64_t& lockWaitTime,
116  bool& setExceptionState);
118  unsigned int getRunNumber() const { return run_; }
119  void lockInitLock();
120  void unlockInitLock();
121  void setFMS(evf::FastMonitoringService* fms) { fms_ = fms; }
122  bool isSingleStreamThread() { return nStreams_ == 1 && nThreads_ == 1; }
123  void lockFULocal();
124  void unlockFULocal();
125  void lockFULocal2();
126  void unlockFULocal2();
127  void createBoLSFile(const uint32_t lumiSection, bool checkIfExists) const;
128  void createLumiSectionFiles(const uint32_t lumiSection,
129  const uint32_t currentLumiSection,
130  bool doCreateBoLS = true);
131  static int parseFRDFileHeader(std::string const& rawSourcePath,
132  int& rawFd,
133  uint16_t& rawHeaderSize,
134  uint32_t& lsFromHeader,
135  int32_t& eventsFromHeader,
136  int64_t& fileSizeFromHeader,
137  bool requireHeader,
138  bool retry,
139  bool closeFile);
140  bool rawFileHasHeader(std::string const& rawSourcePath, uint16_t& rawHeaderSize);
141  int grabNextJsonFromRaw(std::string const& rawSourcePath,
142  int& rawFd,
143  uint16_t& rawHeaderSize,
144  int64_t& fileSizeFromHeader,
145  bool& fileFound,
146  uint32_t serverLS,
147  bool closeFile);
148  int grabNextJsonFile(std::string const& jsonSourcePath,
149  std::string const& rawSourcePath,
150  int64_t& fileSizeFromJson,
151  bool& fileFound);
152  int grabNextJsonFileAndUnlock(std::filesystem::path const& jsonSourcePath);
153 
154  EvFDaqDirector::FileStatus contactFileBroker(unsigned int& serverHttpStatus,
155  bool& serverState,
156  uint32_t& serverLS,
157  uint32_t& closedServerLS,
158  std::string& nextFileJson,
159  std::string& nextFileRaw,
160  bool& rawHeader,
161  int maxLS);
162 
163  FileStatus getNextFromFileBroker(const unsigned int currentLumiSection,
164  unsigned int& ls,
165  std::string& nextFile,
166  int& rawFd,
167  uint16_t& rawHeaderSize,
168  int32_t& serverEventsInNewFile_,
169  int64_t& fileSize,
170  uint64_t& thisLockWaitTimeUs);
171  void createRunOpendirMaybe();
173  int readLastLSEntry(std::string const& file);
174  unsigned int getLumisectionToStart() const;
175  void setDeleteTracking(std::mutex* fileDeleteLock,
176  std::list<std::pair<int, std::unique_ptr<InputFile>>>* filesToDelete) {
177  fileDeleteLockPtr_ = fileDeleteLock;
178  filesToDeletePtr_ = filesToDelete;
179  }
181  void checkMergeTypePSet(edm::ProcessContext const& pc);
184  static struct flock make_flock(short type, short whence, off_t start, off_t len, pid_t pid);
185 
186  private:
187  bool bumpFile(unsigned int& ls,
188  unsigned int& index,
189  std::string& nextFile,
190  uint32_t& fsize,
191  uint16_t& rawHeaderSize,
192  int maxLS,
193  bool& setExceptionState);
194  void openFULockfileStream(bool create);
195  std::string inputFileNameStem(const unsigned int ls, const unsigned int index) const;
196  std::string outputFileNameStem(const unsigned int ls, std::string const& stream) const;
197  std::string mergedFileNameStem(const unsigned int ls, std::string const& stream) const;
199  std::string eolsFileName(const unsigned int ls) const;
200  std::string eorFileName() const;
201  int getNFilesFromEoLS(std::string BUEoLSFile);
202 
205  unsigned int run_;
212  unsigned int fuLockPollInterval_;
219 
220  unsigned int startFromLS_ = 1;
221 
230 
236 
242 
244 
245  unsigned long previousFileSize_;
246 
247  struct flock bu_w_flk;
248  struct flock bu_r_flk;
249  struct flock bu_w_fulk;
250  struct flock bu_r_fulk;
251  struct flock fu_rw_flk;
252  struct flock fu_rw_fulk;
253 
255 
257  std::list<std::pair<int, std::unique_ptr<InputFile>>>* filesToDeletePtr_ = nullptr;
258 
259  pthread_mutex_t init_lock_ = PTHREAD_MUTEX_INITIALIZER;
260 
261  unsigned int nStreams_ = 0;
262  unsigned int nThreads_ = 0;
263 
264  bool readEolsDefinition_ = true;
265  unsigned int eolsNFilesIndex_ = 1;
268  unsigned int stop_ls_override_ = 0;
269 
270  std::shared_ptr<Json::Value> transferSystemJson_;
271  tbb::concurrent_hash_map<std::string, std::string> mergeTypeMap_;
272 
273  //values initialized in .cc file
274  static const std::vector<std::string> MergeTypeNames_;
275 
276  //json parser
278 
279  boost::asio::io_service io_service_;
280  std::unique_ptr<boost::asio::ip::tcp::resolver> resolver_;
281  std::unique_ptr<boost::asio::ip::tcp::resolver::query> query_;
282  std::unique_ptr<boost::asio::ip::tcp::resolver::iterator> endpoint_iterator_;
283  std::unique_ptr<boost::asio::ip::tcp::socket> socket_;
284  //boost::asio::io_context io_context_;
285  //tcp::resolver resolver_;
286  //tcp::resolver::results_type endpoints_;
287  };
288 } // namespace evf
289 
290 #endif
evf::EvFDaqDirector::getOpenOutputJsonFilePath
std::string getOpenOutputJsonFilePath(const unsigned int ls, std::string const &stream) const
Definition: EvFDaqDirector.cc:425
evf::EvFDaqDirector::preallocate
void preallocate(edm::service::SystemBounds const &bounds)
Definition: EvFDaqDirector.cc:320
evf::EvFDaqDirector::directorBU_
bool directorBU_
Definition: EvFDaqDirector.h:217
evf::EvFDaqDirector::previousFileSize_
unsigned long previousFileSize_
Definition: EvFDaqDirector.h:245
evf::EvFDaqDirector::bumpFile
bool bumpFile(unsigned int &ls, unsigned int &index, std::string &nextFile, uint32_t &fsize, uint16_t &rawHeaderSize, int maxLS, bool &setExceptionState)
Definition: EvFDaqDirector.cc:779
evf::EvFDaqDirector::requireTSPSet_
bool requireTSPSet_
Definition: EvFDaqDirector.h:214
evf::EvFDaqDirector::unlockFULocal2
void unlockFULocal2()
Definition: EvFDaqDirector.cc:928
evf::EvFDaqDirector::endpoint_iterator_
std::unique_ptr< boost::asio::ip::tcp::resolver::iterator > endpoint_iterator_
Definition: EvFDaqDirector.h:282
eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
evf::EvFDaqDirector::dirManager_
DirManager dirManager_
Definition: EvFDaqDirector.h:243
evf::EvFDaqDirector::overrideRunNumber
void overrideRunNumber(unsigned int run)
Definition: EvFDaqDirector.h:75
evf::EvFDaqDirector::createBoLSFile
void createBoLSFile(const uint32_t lumiSection, bool checkIfExists) const
Definition: EvFDaqDirector.cc:933
evf::EvFDaqDirector::fileBrokerKeepAlive_
bool fileBrokerKeepAlive_
Definition: EvFDaqDirector.h:210
evf::EvFDaqDirector::getRawFilePath
std::string getRawFilePath(const unsigned int ls, const unsigned int index) const
Definition: EvFDaqDirector.cc:405
evf::EvFDaqDirector::fulocal_rwlock_fd_
int fulocal_rwlock_fd_
Definition: EvFDaqDirector.h:234
start
Definition: start.py:1
evf::EvFDaqDirector::runEnded
Definition: EvFDaqDirector.h:64
evf::EvFDaqDirector::useFileBroker_
bool useFileBroker_
Definition: EvFDaqDirector.h:206
evf::EvFDaqDirector::init_lock_
pthread_mutex_t init_lock_
Definition: EvFDaqDirector.h:259
evf::EvFDaqDirector::getEoLSFilePathOnBU
std::string getEoLSFilePathOnBU(const unsigned int ls) const
Definition: EvFDaqDirector.cc:476
evf::EvFDaqDirector::filesToDeletePtr_
std::list< std::pair< int, std::unique_ptr< InputFile > > > * filesToDeletePtr_
Definition: EvFDaqDirector.h:257
evf::EvFDaqDirector::bu_r_fulk
struct flock bu_r_fulk
Definition: EvFDaqDirector.h:250
evf::EvFDaqDirector::getEoRFilePath
std::string getEoRFilePath() const
Definition: EvFDaqDirector.cc:488
evf::EvFDaqDirector::readEolsDefinition_
bool readEolsDefinition_
Definition: EvFDaqDirector.h:264
evf::EvFDaqDirector::mergeTypePset_
std::string mergeTypePset_
Definition: EvFDaqDirector.h:216
evf::EvFDaqDirector::bu_run_open_dir_
std::string bu_run_open_dir_
Definition: EvFDaqDirector.h:228
evf::EvFDaqDirector::eolsFileName
std::string eolsFileName(const unsigned int ls) const
evf::EvFDaqDirector::EvFDaqDirector
EvFDaqDirector(const edm::ParameterSet &pset, edm::ActivityRegistry &reg)
Definition: EvFDaqDirector.cc:39
evf::EvFDaqDirector::bu_w_fulk
struct flock bu_w_fulk
Definition: EvFDaqDirector.h:249
evf::EvFDaqDirector::bu_readlock_fd_
int bu_readlock_fd_
Definition: EvFDaqDirector.h:231
evf::EvFDaqDirector::nThreads_
unsigned int nThreads_
Definition: EvFDaqDirector.h:262
evf::EvFDaqDirector::getStreamMergeType
std::string getStreamMergeType(std::string const &stream, MergeType defaultType)
Definition: EvFDaqDirector.cc:2003
evf::EvFDaqDirector::getLumisectionToStart
unsigned int getLumisectionToStart() const
Definition: EvFDaqDirector.cc:1862
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ProcessContext
Definition: ProcessContext.h:27
evf::EvFDaqDirector::checkTransferSystemPSet
void checkTransferSystemPSet(edm::ProcessContext const &pc)
Definition: EvFDaqDirector.cc:1877
cms::cuda::stream
cudaStream_t stream
Definition: HistoContainer.h:57
evf::DirManager
Definition: DirManager.h:13
evf::EvFDaqDirector::make_flock
static struct flock make_flock(short type, short whence, off_t start, off_t len, pid_t pid)
Definition: EvFDaqDirector.cc:2023
evf::EvFDaqDirector::getRootHistogramFilePath
std::string getRootHistogramFilePath(const unsigned int ls, std::string const &stream) const
Definition: EvFDaqDirector.cc:468
evf::EvFDaqDirector::bu_writelock_fd_
int bu_writelock_fd_
Definition: EvFDaqDirector.h:232
evf::EvFDaqDirector::getProtocolBufferHistogramFilePath
std::string getProtocolBufferHistogramFilePath(const unsigned int ls, std::string const &stream) const
Definition: EvFDaqDirector.cc:454
evf::EvFDaqDirector::contactFileBroker
EvFDaqDirector::FileStatus contactFileBroker(unsigned int &serverHttpStatus, bool &serverState, uint32_t &serverLS, uint32_t &closedServerLS, std::string &nextFileJson, std::string &nextFileRaw, bool &rawHeader, int maxLS)
Definition: EvFDaqDirector.cc:1447
evf::EvFDaqDirector::getStreamDestinations
std::string getStreamDestinations(std::string const &stream) const
Definition: EvFDaqDirector.cc:1939
evf::EvFDaqDirector::eorFileName
std::string eorFileName() const
evf::EvFDaqDirector::tryInitializeFuLockFile
void tryInitializeFuLockFile()
Definition: EvFDaqDirector.cc:880
evf::EvFDaqDirector::io_service_
boost::asio::io_service io_service_
Definition: EvFDaqDirector.h:279
evf::EvFDaqDirector::lockInitLock
void lockInitLock()
Definition: EvFDaqDirector.cc:909
evf::EvFDaqDirector::stop_ls_override_
unsigned int stop_ls_override_
Definition: EvFDaqDirector.h:268
DirManager.h
evf::EvFDaqDirector::fileBrokerHost_
std::string fileBrokerHost_
Definition: EvFDaqDirector.h:208
evf::EvFDaqDirector::sameFile
Definition: EvFDaqDirector.h:64
evf::EvFDaqDirector::runAbort
Definition: EvFDaqDirector.h:64
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
evf::EvFDaqDirector::getOpenDatFilePath
std::string getOpenDatFilePath(const unsigned int ls, std::string const &stream) const
Definition: EvFDaqDirector.cc:421
evf::EvFDaqDirector::bu_r_flk
struct flock bu_r_flk
Definition: EvFDaqDirector.h:248
evf::EvFDaqDirector::getFFFParamsFilePathOnBU
std::string getFFFParamsFilePathOnBU() const
Definition: EvFDaqDirector.cc:492
evf::EvFDaqDirector::query_
std::unique_ptr< boost::asio::ip::tcp::resolver::query > query_
Definition: EvFDaqDirector.h:281
evf::EvFDaqDirector::baseRunDir
std::string & baseRunDir()
Definition: EvFDaqDirector.h:76
InputFile
Definition: FedRawDataInputSource.h:211
evf::EvFDaqDirector::getRunOpenDirPath
std::string getRunOpenDirPath() const
Definition: EvFDaqDirector.h:106
evf::EvFDaqDirector::inputFileNameStem
std::string inputFileNameStem(const unsigned int ls, const unsigned int index) const
evf::EvFDaqDirector::outputFileNameStem
std::string outputFileNameStem(const unsigned int ls, std::string const &stream) const
evf::EvFDaqDirector::getDatFilePath
std::string getDatFilePath(const unsigned int ls, std::string const &stream) const
Definition: EvFDaqDirector.cc:417
evf::EvFDaqDirector::buBaseRunDir
std::string & buBaseRunDir()
Definition: EvFDaqDirector.h:77
evf::EvFDaqDirector::preBeginJob
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
Definition: EvFDaqDirector.cc:359
evf::EvFDaqDirector::getInitFilePath
std::string getInitFilePath(std::string const &stream) const
Definition: EvFDaqDirector.cc:445
ActivityRegistry.h
evf::EvFDaqDirector::openFULockfileStream
void openFULockfileStream(bool create)
Definition: EvFDaqDirector.cc:890
evf::EvFDaqDirector::bu_t_monitor_stream
FILE * bu_t_monitor_stream
Definition: EvFDaqDirector.h:241
evf::FastMonitoringService
Definition: FastMonitoringService.h:153
evf::EvFDaqDirector::updateFuLock
FileStatus updateFuLock(unsigned int &ls, std::string &nextFile, uint32_t &fsize, uint16_t &rawHeaderSize, uint64_t &lockWaitTime, bool &setExceptionState)
Definition: EvFDaqDirector.cc:503
evf::EvFDaqDirector::getEoLSFilePathOnFU
std::string getEoLSFilePathOnFU(const unsigned int ls) const
Definition: EvFDaqDirector.cc:480
evf::EvFDaqDirector::stopFilePath_
std::string stopFilePath_
Definition: EvFDaqDirector.h:266
evf::MergeTypeJSNDATA
Definition: EvFDaqDirector.h:58
evf::EvFDaqDirector::isSingleStreamThread
bool isSingleStreamThread()
Definition: EvFDaqDirector.h:122
evf::EvFDaqDirector::parseFRDFileHeader
static int parseFRDFileHeader(std::string const &rawSourcePath, int &rawFd, uint16_t &rawHeaderSize, uint32_t &lsFromHeader, int32_t &eventsFromHeader, int64_t &fileSizeFromHeader, bool requireHeader, bool retry, bool closeFile)
Definition: EvFDaqDirector.cc:961
evf::EvFDaqDirector::getOpenInputJsonFilePath
std::string getOpenInputJsonFilePath(const unsigned int ls, const unsigned int index) const
Definition: EvFDaqDirector.cc:413
Json
JSON (JavaScript Object Notation).
Definition: EvFDaqDirector.h:44
evf::EvFDaqDirector::selectedTransferMode_
std::string selectedTransferMode_
Definition: EvFDaqDirector.h:215
InputChunk
Definition: FedRawDataInputSource.h:187
evf::EvFDaqDirector::fms_
evf::FastMonitoringService * fms_
Definition: EvFDaqDirector.h:254
edm::ActivityRegistry
Definition: ActivityRegistry.h:134
evf::EvFDaqDirector::noFile
Definition: EvFDaqDirector.h:64
evf::EvFDaqDirector::useFileBroker
bool useFileBroker() const
Definition: EvFDaqDirector.h:79
evf::EvFDaqDirector::getMergedProtocolBufferHistogramFilePath
std::string getMergedProtocolBufferHistogramFilePath(const unsigned int ls, std::string const &stream) const
Definition: EvFDaqDirector.cc:459
evf::EvFDaqDirector::run_
unsigned int run_
Definition: EvFDaqDirector.h:205
evf::EvFDaqDirector::outputAdler32Recheck
bool outputAdler32Recheck() const
Definition: EvFDaqDirector.h:107
evf::EvFDaqDirector::eolsNFilesIndex_
unsigned int eolsNFilesIndex_
Definition: EvFDaqDirector.h:265
evf::MergeTypeDAT
Definition: EvFDaqDirector.h:58
evf::EvFDaqDirector::pid_
std::string pid_
Definition: EvFDaqDirector.h:225
evf::EvFDaqDirector::fileBrokerUseLocalLock_
bool fileBrokerUseLocalLock_
Definition: EvFDaqDirector.h:211
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
evf::EvFDaqDirector::bu_w_monitor_stream
FILE * bu_w_monitor_stream
Definition: EvFDaqDirector.h:240
evf::EvFDaqDirector::MergeTypeNames_
static const std::vector< std::string > MergeTypeNames_
Definition: EvFDaqDirector.h:274
evf::EvFDaqDirector::fileDeleteLockPtr_
std::mutex * fileDeleteLockPtr_
Definition: EvFDaqDirector.h:256
evf::EvFDaqDirector::getOutputJsonFilePath
std::string getOutputJsonFilePath(const unsigned int ls, std::string const &stream) const
Definition: EvFDaqDirector.cc:429
evf::EvFDaqDirector::fulocal_rwlock_fd2_
int fulocal_rwlock_fd2_
Definition: EvFDaqDirector.h:235
edm::GlobalContext
Definition: GlobalContext.h:29
edm::service::SystemBounds
Definition: SystemBounds.h:29
edm::ParameterSet
Definition: ParameterSet.h:47
evf::EvFDaqDirector::preBeginRun
void preBeginRun(edm::GlobalContext const &globalContext)
Definition: EvFDaqDirector.cc:364
evf::EvFDaqDirector::fileBrokerPort_
std::string fileBrokerPort_
Definition: EvFDaqDirector.h:209
evf::EvFDaqDirector::getMergedDatChecksumFilePath
std::string getMergedDatChecksumFilePath(const unsigned int ls, std::string const &stream) const
Definition: EvFDaqDirector.cc:437
FFFNamingSchema.h
evf::EvFDaqDirector::getNextFromFileBroker
FileStatus getNextFromFileBroker(const unsigned int currentLumiSection, unsigned int &ls, std::string &nextFile, int &rawFd, uint16_t &rawHeaderSize, int32_t &serverEventsInNewFile_, int64_t &fileSize, uint64_t &thisLockWaitTimeUs)
Definition: EvFDaqDirector.cc:1710
evf::EvFDaqDirector::~EvFDaqDirector
~EvFDaqDirector()
Definition: EvFDaqDirector.cc:301
evf::EvFDaqDirector::outputAdler32Recheck_
bool outputAdler32Recheck_
Definition: EvFDaqDirector.h:213
evf::EvFDaqDirector::mergeTypeMap_
tbb::concurrent_hash_map< std::string, std::string > mergeTypeMap_
Definition: EvFDaqDirector.h:271
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
evf::EvFDaqDirector::unlockFULocal
void unlockFULocal()
Definition: EvFDaqDirector.cc:918
evf::EvFDaqDirector::getOpenInitFilePath
std::string getOpenInitFilePath(std::string const &stream) const
Definition: EvFDaqDirector.cc:441
evf::EvFDaqDirector::run_dir_
std::string run_dir_
Definition: EvFDaqDirector.h:226
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
mutex
static std::mutex mutex
Definition: Proxy.cc:8
evf::EvFDaqDirector::getMergedRootHistogramFilePath
std::string getMergedRootHistogramFilePath(const unsigned int ls, std::string const &stream) const
Definition: EvFDaqDirector.cc:472
evf::EvFDaqDirector::fuLockPollInterval_
unsigned int fuLockPollInterval_
Definition: EvFDaqDirector.h:212
evf::EvFDaqDirector::lockFULocal
void lockFULocal()
Definition: EvFDaqDirector.cc:913
evf::EvFDaqDirector::getOpenProtocolBufferHistogramFilePath
std::string getOpenProtocolBufferHistogramFilePath(const unsigned int ls, std::string const &stream) const
Definition: EvFDaqDirector.cc:449
evf::EvFDaqDirector
Definition: EvFDaqDirector.h:62
evf::EvFDaqDirector::bu_base_dir_
std::string bu_base_dir_
Definition: EvFDaqDirector.h:204
evf::EvFDaqDirector::findCurrentRunDir
std::string findCurrentRunDir()
Definition: EvFDaqDirector.h:81
evf::EvFDaqDirector::mergedFileNameStem
std::string mergedFileNameStem(const unsigned int ls, std::string const &stream) const
evf::EvFDaqDirector::createRunOpendirMaybe
void createRunOpendirMaybe()
Definition: EvFDaqDirector.cc:1838
evf::EvFDaqDirector::getEoRFilePathOnFU
std::string getEoRFilePathOnFU() const
Definition: EvFDaqDirector.cc:490
evf::EvFDaqDirector::newLumi
Definition: EvFDaqDirector.h:64
evf::EvFDaqDirector::fu_rw_fulk
struct flock fu_rw_fulk
Definition: EvFDaqDirector.h:252
evf::EvFDaqDirector::createLumiSectionFiles
void createLumiSectionFiles(const uint32_t lumiSection, const uint32_t currentLumiSection, bool doCreateBoLS=true)
Definition: EvFDaqDirector.cc:943
evf::EvFDaqDirector::hltSourceDirectory_
std::string hltSourceDirectory_
Definition: EvFDaqDirector.h:218
evf::EvFDaqDirector::startFromLS_
unsigned int startFromLS_
Definition: EvFDaqDirector.h:220
jsoncollector
Definition: DataPoint.h:26
evf::EvFDaqDirector::readLastLSEntry
int readLastLSEntry(std::string const &file)
Definition: EvFDaqDirector.cc:1848
jsoncollector::DataPointDefinition
Definition: DataPointDefinition.h:20
evf::EvFDaqDirector::getMergedDatFilePath
std::string getMergedDatFilePath(const unsigned int ls, std::string const &stream) const
Definition: EvFDaqDirector.cc:433
evf::EvFDaqDirector::fu_rw_flk
struct flock fu_rw_flk
Definition: EvFDaqDirector.h:251
evf::EvFDaqDirector::run_string_
std::string run_string_
Definition: EvFDaqDirector.h:223
evf::DirManager::findRunDir
std::string findRunDir(unsigned int)
Definition: DirManager.cc:43
evf::EvFDaqDirector::socket_
std::unique_ptr< boost::asio::ip::tcp::socket > socket_
Definition: EvFDaqDirector.h:283
writedatasetfile.run
run
Definition: writedatasetfile.py:27
evf::EvFDaqDirector::createProcessingNotificationMaybe
void createProcessingNotificationMaybe() const
Definition: EvFDaqDirector.cc:2017
ConfigurationDescriptions
evf::EvFDaqDirector::initRun
void initRun()
Definition: EvFDaqDirector.cc:149
evf::MergeType
MergeType
Definition: EvFDaqDirector.h:58
evf::EvFDaqDirector::rawFileHasHeader
bool rawFileHasHeader(std::string const &rawSourcePath, uint16_t &rawHeaderSize)
Definition: EvFDaqDirector.cc:1057
edm::PathsAndConsumesOfModulesBase
Definition: PathsAndConsumesOfModulesBase.h:35
evf::EvFDaqDirector::getRunNumber
unsigned int getRunNumber() const
Definition: EvFDaqDirector.h:118
evf::EvFDaqDirector::bu_w_flk
struct flock bu_w_flk
Definition: EvFDaqDirector.h:247
evf::EvFDaqDirector::fulockfile_
std::string fulockfile_
Definition: EvFDaqDirector.h:229
evf::EvFDaqDirector::setFMS
void setFMS(evf::FastMonitoringService *fms)
Definition: EvFDaqDirector.h:121
evf
Definition: fillJson.h:27
evf::EvFDaqDirector::preGlobalEndLumi
void preGlobalEndLumi(edm::GlobalContext const &globalContext)
Definition: EvFDaqDirector.cc:383
evf::EvFDaqDirector::transferSystemJson_
std::shared_ptr< Json::Value > transferSystemJson_
Definition: EvFDaqDirector.h:270
evf::EvFDaqDirector::hostname_
std::string hostname_
Definition: EvFDaqDirector.h:222
evf::EvFDaqDirector::getInputJsonFilePath
std::string getInputJsonFilePath(const unsigned int ls, const unsigned int index) const
Definition: EvFDaqDirector.cc:401
evf::EvFDaqDirector::getOpenRootHistogramFilePath
std::string getOpenRootHistogramFilePath(const unsigned int ls, std::string const &stream) const
Definition: EvFDaqDirector.cc:464
evf::EvFDaqDirector::dpd_
jsoncollector::DataPointDefinition * dpd_
Definition: EvFDaqDirector.h:277
evf::EvFDaqDirector::resolver_
std::unique_ptr< boost::asio::ip::tcp::resolver > resolver_
Definition: EvFDaqDirector.h:280
evf::EvFDaqDirector::removeFile
void removeFile(unsigned int ls, unsigned int index)
Definition: EvFDaqDirector.cc:501
evf::EvFDaqDirector::nStreams_
unsigned int nStreams_
Definition: EvFDaqDirector.h:261
evf::EvFDaqDirector::grabNextJsonFileAndUnlock
int grabNextJsonFileAndUnlock(std::filesystem::path const &jsonSourcePath)
Definition: EvFDaqDirector.cc:1358
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
evf::EvFDaqDirector::fu_readwritelock_fd_
int fu_readwritelock_fd_
Definition: EvFDaqDirector.h:233
SiStripCommissioningSource_FromEDM_cfg.FastMonitoringService
FastMonitoringService
Definition: SiStripCommissioningSource_FromEDM_cfg.py:49
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
evf::MergeTypeNULL
Definition: EvFDaqDirector.h:58
evf::EvFDaqDirector::bu_run_dir_
std::string bu_run_dir_
Definition: EvFDaqDirector.h:227
evf::EvFDaqDirector::buBaseRunOpenDir
std::string & buBaseRunOpenDir()
Definition: EvFDaqDirector.h:78
evf::EvFDaqDirector::getBoLSFilePathOnFU
std::string getBoLSFilePathOnFU(const unsigned int ls) const
Definition: EvFDaqDirector.cc:484
evf::EvFDaqDirector::base_dir_
std::string base_dir_
Definition: EvFDaqDirector.h:203
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
evf::EvFDaqDirector::fu_rw_lock_stream
FILE * fu_rw_lock_stream
Definition: EvFDaqDirector.h:239
ParameterSet.h
evf::EvFDaqDirector::getOpenRawFilePath
std::string getOpenRawFilePath(const unsigned int ls, const unsigned int index) const
Definition: EvFDaqDirector.cc:409
evf::EvFDaqDirector::stopFilePathPid_
std::string stopFilePathPid_
Definition: EvFDaqDirector.h:267
evf::EvFDaqDirector::initFileName
std::string initFileName(std::string const &stream) const
evf::EvFDaqDirector::unlockInitLock
void unlockInitLock()
Definition: EvFDaqDirector.cc:911
evf::EvFDaqDirector::run_nstring_
std::string run_nstring_
Definition: EvFDaqDirector.h:224
SystemBounds
evf::EvFDaqDirector::postEndRun
void postEndRun(edm::GlobalContext const &globalContext)
Definition: EvFDaqDirector.cc:374
evf::EvFDaqDirector::FileStatus
FileStatus
Definition: EvFDaqDirector.h:64
evf::EvFDaqDirector::lockFULocal2
void lockFULocal2()
Definition: EvFDaqDirector.cc:923
evf::EvFDaqDirector::grabNextJsonFile
int grabNextJsonFile(std::string const &jsonSourcePath, std::string const &rawSourcePath, int64_t &fileSizeFromJson, bool &fileFound)
Definition: EvFDaqDirector.cc:1178
RunID.h
evf::EvFDaqDirector::getNFilesFromEoLS
int getNFilesFromEoLS(std::string BUEoLSFile)
Definition: EvFDaqDirector.cc:718
evf::MergeTypePB
Definition: EvFDaqDirector.h:58
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
Json::Value
Represents a JSON value.
Definition: value.h:99
evf::EvFDaqDirector::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: EvFDaqDirector.cc:327
evf::EvFDaqDirector::bu_w_lock_stream
FILE * bu_w_lock_stream
Definition: EvFDaqDirector.h:237
evf::EvFDaqDirector::fileBrokerHostFromCfg_
bool fileBrokerHostFromCfg_
Definition: EvFDaqDirector.h:207
evf::EvFDaqDirector::newFile
Definition: EvFDaqDirector.h:64
evf::EvFDaqDirector::bu_r_lock_stream
FILE * bu_r_lock_stream
Definition: EvFDaqDirector.h:238
evf::EvFDaqDirector::grabNextJsonFromRaw
int grabNextJsonFromRaw(std::string const &rawSourcePath, int &rawFd, uint16_t &rawHeaderSize, int64_t &fileSizeFromHeader, bool &fileFound, uint32_t serverLS, bool closeFile)
Definition: EvFDaqDirector.cc:1096
evf::EvFDaqDirector::setDeleteTracking
void setDeleteTracking(std::mutex *fileDeleteLock, std::list< std::pair< int, std::unique_ptr< InputFile >>> *filesToDelete)
Definition: EvFDaqDirector.h:175
evf::EvFDaqDirector::checkMergeTypePSet
void checkMergeTypePSet(edm::ProcessContext const &pc)
Definition: EvFDaqDirector.cc:1985