1 #ifndef EventFilter_Utilities_FedRawDataInputSource_h 2 #define EventFilter_Utilities_FedRawDataInputSource_h 7 #include <condition_variable> 9 #include "tbb/concurrent_queue.h" 10 #include "tbb/concurrent_vector.h" 12 #include "boost/filesystem.hpp" 26 class InputSourceDescription;
33 class FastMonitoringService;
46 std::pair<bool,unsigned int> getEventReport(
unsigned int lumi,
bool erase);
48 bool checkNextEvent()
override;
52 void rewind_()
override;
54 void maybeOpenNewLumiSection(
const uint32_t lumiSection);
60 void readSupervisor();
61 void readWorker(
unsigned int tid);
69 void reportEventsThisLumiInSource(
unsigned int lumi,
unsigned int events);
99 unsigned int fileListIndex_ = 0;
101 unsigned int loopModeIterationInc_ = 0;
114 uint32_t eventRunNumber_=0;
115 uint32_t GTPEventID_ = 0;
116 uint32_t L1EventID_ = 0;
119 unsigned long eventsThisRun_ = 0;
131 bool chunkIsFree_=
false;
133 bool startedSupervisorThread_ =
false;
149 bool setExceptionState_ =
false;
153 int currentFileIndex_ = -1;
158 unsigned int nStreams_ = 0;
159 unsigned int checkEvery_ = 10;
167 int fileDescriptor_ = -1;
168 uint32_t bufferInputRead_ = 0;
181 uint32_t usedSize_ = 0;
188 buf_ =
new unsigned char[size_];
191 void reset(
unsigned int newOffset,
unsigned int toRead,
unsigned int fileIndex) {
194 fileIndex_=fileIndex;
214 uint32_t bufferPosition_ = 0;
215 uint32_t chunkPosition_ = 0;
216 unsigned int currentChunk_ = 0;
229 for (
unsigned int i=0;
i<nChunks;
i++)
230 chunks_.push_back(
nullptr);
237 return chunks_[chunkid]!=
nullptr && chunks_[chunkid]->readComplete_;
239 bool advance(
unsigned char* & dataPosition,
const size_t size);
240 void moveToPreviousChunk(
const size_t size,
const size_t offset);
241 void rewindChunk(
const size_t size);
245 #endif // EventFilter_Utilities_FedRawDataInputSource_h
static boost::mutex mutex
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
unsigned long long uint64_t
void reset(double vett[256])