1 #ifndef EventFilter_Utilities_DAQSource_h 2 #define EventFilter_Utilities_DAQSource_h 4 #include <condition_variable> 11 #include "oneapi/tbb/concurrent_queue.h" 12 #include "oneapi/tbb/concurrent_vector.h" 26 class InputSourceDescription;
36 namespace FastMonState {
124 std::default_random_engine
rng_;
146 tbb::concurrent_queue<std::unique_ptr<RawInputFile>>
fileQueue_;
183 unsigned int lumi = 0,
185 bool deleteFile =
true,
188 uint16_t rawHeaderSize = 0,
189 uint32_t nChunks = 0,
192 :
InputFile(
status,
lumi,
name, deleteFile, rawFd, fileSize, rawHeaderSize, nChunks,
nEvents, nullptr),
194 bool advance(
unsigned char*& dataPosition,
const size_t size);
200 #endif // EventFilter_Utilities_DAQSource_h
std::unique_ptr< RawInputFile > currentFile_
std::pair< RawInputFile *, InputChunk * > ReaderInfo
edm::RunNumber_t runNumber_
std::unique_ptr< std::thread > readSupervisorThread_
std::default_random_engine rng_
std::map< unsigned int, unsigned int > sourceEventsReport_
std::condition_variable startupCv_
std::atomic< bool > threadInit_
unsigned int loopModeIterationInc_
Next checkNext() override
void read(edm::EventPrincipal &eventPrincipal) override
std::pair< bool, unsigned int > getEventReport(unsigned int lumi, bool erase)
void maybeOpenNewLumiSection(const uint32_t lumiSection)
std::mutex fileDeleteLock_
const std::string dataModeConfig_
std::vector< std::thread * > workerThreads_
void reportEventsThisLumiInSource(unsigned int lumi, unsigned int events)
edm::ProcessHistoryID processHistoryID_
unsigned int currentLumiSection_
std::atomic< unsigned int > readingFilesCount_
evf::EvFDaqDirector::FileStatus getNextEventFromDataBlock()
DAQSource(edm::ParameterSet const &, edm::InputSourceDescription const &)
uint64_t eventChunkBlock_
unsigned long eventsThisRun_
evf::EvFDaqDirector::FileStatus getNextDataBlock()
int currentLumiSection() const
unsigned int fileListIndex_
unsigned int eventsThisLumi_
const bool fileListLoopMode_
std::condition_variable cvWakeup_
std::vector< std::condition_variable * > cvReader_
unsigned int maxBufferedFiles_
evf::FastMonitoringService * fms_
void readWorker(unsigned int tid)
std::unique_ptr< std::thread > dataArrangerThread_
std::atomic< bool > quit_threads_
bool useL1EventID() const
const bool alwaysStartFromFirstLS_
void makeEventWrapper(edm::EventPrincipal &eventPrincipal, edm::EventAuxiliary &aux)
std::shared_ptr< DataMode > dataMode_
edm::ProcessHistoryID & processHistoryID()
tbb::concurrent_queue< std::unique_ptr< RawInputFile > > fileQueue_
const std::vector< unsigned int > testTCDSFEDRange_
unsigned long long uint64_t
std::vector< std::string > listFileNames_
std::vector< int > streamFileTracker_
std::vector< unsigned int > tid_active_
std::vector< unsigned int > thread_quit_signal
void setMonStateSup(evf::FastMonState::InputState state)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool startedSupervisorThread_
evf::EvFDaqDirector * daqDirector_
tbb::concurrent_queue< InputChunk * > freeChunks_
unsigned int numConcurrentReads_
tbb::concurrent_queue< unsigned int > workerPool_
int eventRunNumber() const
std::vector< ReaderInfo > workerJob_
evf::EvFDaqDirector::FileStatus getFile(unsigned int &ls, std::string &nextFile, uint64_t &lockWaitTime)
void setMonState(evf::FastMonState::InputState state)
const bool verifyChecksum_
std::list< std::pair< int, std::unique_ptr< InputFile > > > filesToDelete_