22 #include "log4cplus/logger.h"
24 #include <sys/types.h>
28 #include <semaphore.h>
51 log4cplus::Logger
logger,
unsigned int timeout,
151 virtual void clear() = 0;
267 virtual std::vector<std::string>
cellStates()
const = 0;
270 virtual std::vector<pid_t>
cellPrcIds()
const = 0;
308 while (0 != sem_wait(&
lock_)) {
309 if (errno != EINTR) {
310 LOG4CPLUS_ERROR(
log_,
"Cannot obtain lock on sem LOCK!");
319 std::unique_lock<std::timed_mutex> lockCrashHandler() {
320 std::unique_lock<std::timed_mutex> lk(crashHandlerLock_);
324 std::unique_lock<std::timed_mutex> lockCrashHandlerTimed(
unsigned int seconds) {
388 std::timed_mutex crashHandlerLock_;
virtual bool sendDqmWhileHalting()=0
virtual std::vector< std::string > dqmCellStates() const =0
virtual std::vector< pid_t > clientPrcIds() const =0
void sendDiscard(UInt_t buResourceId)
virtual std::vector< std::string > cellStates() const =0
bool * acceptSMDataDiscard_
virtual std::vector< time_t > cellTimeStamps() const =0
virtual void lastResort()=0
virtual bool buildResource(MemRef_t *bufRef)=0
void setDoCrcCheck(UInt_t doCrcCheck)
void releaseResources()
releases all FUResource's
virtual bool discardDataEvent(MemRef_t *bufRef)=0
toolbox::mem::Reference MemRef_t
void setActive(bool activeValue)
virtual std::vector< UInt_t > cellEvtNumbers() const =0
virtual void resetCounters()=0
virtual bool discardWhileHalting(bool sendDiscards)=0
UInt_t nbSentError() const
virtual void dropEvent()=0
bool isLastMessageOfEvent(MemRef_t *bufRef)
UInt_t nbCompleted() const
virtual std::string printStatus()
UInt_t nbDiscarded() const
virtual std::string clientPrcIdsAsString() const =0
UInt_t nbAllocated() const
void resetPendingAllocates()
resets free resources to the maximum number
UInt_t nbEolPosted() const
void dumpEvent(evf::FUShmRawCell *cell)
UInt_t nbPendingSMDiscards_
IPCMethod(bool segmentationMode, UInt_t nbRawCells, UInt_t nbRecoCells, UInt_t nbDqmCells, UInt_t rawCellSize, UInt_t recoCellSize, UInt_t dqmCellSize, int freeResReq, BUProxy *bu, SMProxy *sm, log4cplus::Logger logger, unsigned int timeout, EvffedFillerRB *frb, xdaq::Application *app)
virtual UInt_t nbClients() const =0
UInt_t nbEolDiscarded() const
UInt_t sumOfSizes() const
virtual bool discardDqmEvent(MemRef_t *bufRef)=0
UInt_t nbPendingSMDiscards() const
int nbPendingSMDqmDiscards() const
UInt_t allocateResource()
bool isReadyToShutDown() const
std::vector< FUResource * > FUResourceVec_t
void sendDqmEvent(UInt_t fuDqmId, UInt_t runNumber, UInt_t evtAtUpdate, UInt_t folderId, UInt_t fuProcessId, UInt_t fuGuid, UChar_t *data, UInt_t dataSize)
int * acceptSMDqmDiscard_
FUResourceVec_t resources_
unsigned int freeResRequiredForAllocate_
void setRunNumber(UInt_t runNumber)
UInt_t nbAllocSent() const
void setDoDumpEvents(UInt_t doDumpEvents)
UInt_t nbCrcErrors() const
virtual bool handleCrashedEP(UInt_t runNumber, pid_t pid)=0
uint64_t sumOfSquares() const
UInt_t nbFreeSlots() const
unsigned long long uint64_t
UInt_t nbClientsToShutDown_
virtual bool discardDataEventWhileHalting(MemRef_t *bufRef)=0
unsigned int shutdownTimeout_
virtual UInt_t nbResources() const =0
std::atomic< int > nbPendingSMDqmDiscards_
virtual bool discardDqmEventWhileHalting(MemRef_t *bufRef)=0
void sendErrorEvent(UInt_t fuResourceId, UInt_t runNumber, UInt_t evtNumber, UInt_t fuProcessId, UInt_t fuGuid, UChar_t *data, UInt_t dataSize)
virtual void postEndOfLumiSection(MemRef_t *bufRef)=0
char data[epos_bytes_allocation]
virtual bool sendData()=0
void sendDataEvent(UInt_t fuResourceId, UInt_t runNumber, UInt_t evtNumber, UInt_t outModId, UInt_t fuProcessId, UInt_t fuGuid, UChar_t *data, UInt_t dataSize)
void setStopFlag(bool status)
std::queue< UInt_t > freeResourceIds_
virtual void resetIPC()=0
resets the underlying IPC method to the initial state
void sendInitMessage(UInt_t fuResourceId, UInt_t outModId, UInt_t fuProcessId, UInt_t fuGuid, UChar_t *data, UInt_t dataSize, UInt_t nExpectedEPs)
virtual std::vector< pid_t > cellPrcIds() const =0
virtual void shutDownClients()=0
void setReadyToShutDown(bool readyValue)
virtual bool sendDataWhileHalting()=0