1 #ifndef EVENTFILTER_UTILTIES_PLUGINS_EVFDAQDIRECTOR 2 #define EVENTFILTER_UTILTIES_PLUGINS_EVFDAQDIRECTOR 28 #include <tbb/concurrent_hash_map.h> 29 #include <boost/filesystem.hpp> 30 #include <boost/asio.hpp> 40 class PathsAndConsumesOfModulesBase;
49 class DataPointDefinition;
84 std::string getInputJsonFilePath(
const unsigned int ls,
const unsigned int index)
const;
85 std::string getRawFilePath(
const unsigned int ls,
const unsigned int index)
const;
86 std::string getOpenRawFilePath(
const unsigned int ls,
const unsigned int index)
const;
87 std::string getOpenInputJsonFilePath(
const unsigned int ls,
const unsigned int index)
const;
96 std::string getOpenProtocolBufferHistogramFilePath(
const unsigned int ls,
std::string const& stream)
const;
98 std::string getMergedProtocolBufferHistogramFilePath(
const unsigned int ls,
std::string const& stream)
const;
102 std::string getEoLSFilePathOnBU(
const unsigned int ls)
const;
103 std::string getEoLSFilePathOnFU(
const unsigned int ls)
const;
104 std::string getBoLSFilePathOnFU(
const unsigned int ls)
const;
110 void removeFile(
unsigned int ls,
unsigned int index);
114 void tryInitializeFuLockFile();
117 void unlockInitLock();
121 void unlockFULocal();
123 void unlockFULocal2();
124 void createBoLSFile(
const uint32_t lumiSection,
bool checkIfExists)
const;
125 void createLumiSectionFiles(
const uint32_t lumiSection,
const uint32_t currentLumiSection,
bool doCreateBoLS =
true);
126 int grabNextJsonFile(
std::string const& jsonSourcePath,
std::string const& rawSourcePath, int64_t& fileSizeFromJson,
bool& fileFound);
130 uint32_t& serverLS, uint32_t& closedServerLS,
133 FileStatus getNextFromFileBroker(
const unsigned int currentLumiSection,
unsigned int& ls,
std::string& nextFile,
134 int& serverEventsInNewFile_, int64_t& fileSize,
uint64_t& thisLockWaitTimeUs);
135 void createRunOpendirMaybe();
136 void createProcessingNotificationMaybe()
const;
138 unsigned int getLumisectionToStart()
const;
140 fileDeleteLockPtr_=fileDeleteLock;
141 filesToDeletePtr_ = filesToDelete;
147 static struct flock make_flock(short type, short whence, off_t start, off_t len, pid_t pid);
150 bool bumpFile(
unsigned int& ls,
unsigned int& index,
std::string& nextFile, uint32_t& fsize,
int maxLS);
151 void openFULockfileStream(
bool create);
152 std::string inputFileNameStem(
const unsigned int ls,
const unsigned int index)
const;
169 unsigned int startFromLS_ = 1;
202 struct flock bu_w_flk;
203 struct flock bu_r_flk;
204 struct flock bu_w_fulk;
205 struct flock bu_r_fulk;
206 struct flock fu_rw_flk;
207 struct flock fu_rw_fulk;
212 std::list<std::pair<int,InputFile*>> *filesToDeletePtr_ =
nullptr;
214 pthread_mutex_t init_lock_ = PTHREAD_MUTEX_INITIALIZER;
216 unsigned int nStreams_=0;
217 unsigned int nThreads_=0;
219 bool readEolsDefinition_ =
true;
220 unsigned int eolsNFilesIndex_ = 1;
223 unsigned int stop_ls_override_ = 0;
236 std::unique_ptr<boost::asio::ip::tcp::resolver>
resolver_;
237 std::unique_ptr<boost::asio::ip::tcp::resolver::query>
query_;
239 std::unique_ptr<boost::asio::ip::tcp::socket>
socket_;
std::string & buBaseRunDir()
FILE * bu_t_monitor_stream
static boost::mutex mutex
boost::asio::io_service io_service_
def create(alignables, pedeDump, additionalData, outputFile, config)
std::shared_ptr< Json::Value > transferSystemJson_
jsoncollector::DataPointDefinition * dpd_
std::unique_ptr< boost::asio::ip::tcp::resolver > resolver_
bool isSingleStreamThread()
unsigned long previousFileSize_
bool useFileBroker() const
std::unique_ptr< boost::asio::ip::tcp::resolver::iterator > endpoint_iterator_
void overrideRunNumber(unsigned int run)
std::string hltSourceDirectory_
tbb::concurrent_hash_map< std::string, std::string > mergeTypeMap_
std::string mergeTypePset_
std::unique_ptr< boost::asio::ip::tcp::socket > socket_
bool outputAdler32Recheck_
bool outputAdler32Recheck() const
void setDeleteTracking(std::mutex *fileDeleteLock, std::list< std::pair< int, InputFile * >> *filesToDelete)
std::string stopFilePath_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::string findCurrentRunDir()
std::string selectedTransferMode_
std::string & buBaseRunOpenDir()
JSON (JavaScript Object Notation).
std::string eorFileName(const unsigned int run)
std::unique_ptr< boost::asio::ip::tcp::resolver::query > query_
std::string stopFilePathPid_
std::string & baseRunDir()
unsigned long long uint64_t
bool fileBrokerUseLocalLock_
FILE * bu_w_monitor_stream
static const std::vector< std::string > MergeTypeNames_
unsigned int getRunNumber() const
std::string fileBrokerPort_
bool fileBrokerKeepAlive_
std::string getRunOpenDirPath() const
void setFMS(evf::FastMonitoringService *fms)
std::string fileBrokerHost_
unsigned int fuLockPollInterval_
std::string eolsFileName(const unsigned int run, const unsigned int ls)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
std::string bu_run_open_dir_