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" 28 class InputSourceDescription;
35 class FastMonitoringService;
39 class DataPointDefinition;
53 std::pair<bool,unsigned int> getEventReport(
unsigned int lumi,
bool erase);
55 virtual bool checkNextEvent()
override;
59 virtual void preForkReleaseResources()
override;
60 virtual void postForkReacquireResources(std::shared_ptr<edm::multicore::MessageReceiverForSource>)
override;
61 virtual void rewind_()
override;
63 void maybeOpenNewLumiSection(
const uint32_t lumiSection);
64 void createBoLSFile(
const uint32_t lumiSection,
bool checkIfExists);
71 void readSupervisor();
72 void readWorker(
unsigned int tid);
80 void reportEventsThisLumiInSource(
unsigned int lumi,
unsigned int events);
108 unsigned int fileListIndex_ = 0;
110 unsigned int loopModeIterationInc_ = 0;
123 uint32_t eventRunNumber_=0;
124 uint32_t GTPEventID_ = 0;
125 uint32_t L1EventID_ = 0;
128 unsigned long eventsThisRun_ = 0;
142 bool chunkIsFree_=
false;
144 bool startedSupervisorThread_ =
false;
160 bool setExceptionState_ =
false;
164 int currentFileIndex_ = -1;
169 unsigned int nStreams_ = 0;
170 unsigned int checkEvery_ = 10;
178 int fileDescriptor_ = -1;
179 uint32_t bufferInputRead_ = 0;
192 uint32_t usedSize_ = 0;
199 buf_ =
new unsigned char[size_];
202 void reset(
unsigned int newOffset,
unsigned int toRead,
unsigned int fileIndex) {
205 fileIndex_=fileIndex;
225 uint32_t bufferPosition_ = 0;
226 uint32_t chunkPosition_ = 0;
227 unsigned int currentChunk_ = 0;
240 for (
unsigned int i=0;
i<nChunks;
i++)
241 chunks_.push_back(
nullptr);
248 return chunks_[chunkid]!=
nullptr && chunks_[chunkid]->readComplete_;
250 bool advance(
unsigned char* & dataPosition,
const size_t size);
251 void moveToPreviousChunk(
const size_t size,
const size_t offset);
252 void rewindChunk(
const size_t size);
256 #endif // EventFilter_Utilities_FedRawDataInputSource_h
static boost::mutex mutex
unsigned long long uint64_t
void reset(double vett[256])