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;
37 class DataPointDefinition;
51 std::pair<bool,unsigned int> getEventReport(
unsigned int lumi,
bool erase);
53 bool checkNextEvent()
override;
57 void rewind_()
override;
59 void maybeOpenNewLumiSection(
const uint32_t lumiSection);
60 void createBoLSFile(
const uint32_t lumiSection,
bool checkIfExists);
67 void readSupervisor();
68 void readWorker(
unsigned int tid);
76 void reportEventsThisLumiInSource(
unsigned int lumi,
unsigned int events);
104 unsigned int fileListIndex_ = 0;
106 unsigned int loopModeIterationInc_ = 0;
119 uint32_t eventRunNumber_=0;
120 uint32_t GTPEventID_ = 0;
121 uint32_t L1EventID_ = 0;
124 unsigned long eventsThisRun_ = 0;
138 bool chunkIsFree_=
false;
140 bool startedSupervisorThread_ =
false;
156 bool setExceptionState_ =
false;
160 int currentFileIndex_ = -1;
165 unsigned int nStreams_ = 0;
166 unsigned int checkEvery_ = 10;
174 int fileDescriptor_ = -1;
175 uint32_t bufferInputRead_ = 0;
188 uint32_t usedSize_ = 0;
195 buf_ =
new unsigned char[size_];
198 void reset(
unsigned int newOffset,
unsigned int toRead,
unsigned int fileIndex) {
201 fileIndex_=fileIndex;
221 uint32_t bufferPosition_ = 0;
222 uint32_t chunkPosition_ = 0;
223 unsigned int currentChunk_ = 0;
236 for (
unsigned int i=0;
i<nChunks;
i++)
237 chunks_.push_back(
nullptr);
244 return chunks_[chunkid]!=
nullptr && chunks_[chunkid]->readComplete_;
246 bool advance(
unsigned char* & dataPosition,
const size_t size);
247 void moveToPreviousChunk(
const size_t size,
const size_t offset);
248 void rewindChunk(
const size_t size);
252 #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])