Skip to content
Snippets Groups Projects
Commit 70372376 authored by Steffen Maeland's avatar Steffen Maeland Committed by Graeme Stewart
Browse files

Tag including updates for FE-I4B service records and errors (PixelConditionsServices-00-24-10-01)

parent 40a814f5
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,8 @@ class IPixelByteStreamErrorsSvc: virtual public IInterface {
public:
enum ErrorType {TimeOut=0, firstErrType=TimeOut, BCID=1, LVL1ID=2, Preamble=3, Trailer=4, Flagged=5, DisableFE=6, ROD=7, Decoding=8, Invalid=9, lastErrType=Invalid };
enum ErrorType {TimeOut=0, firstErrType=TimeOut, BCID=1, LVL1ID=2, Preamble=3, Trailer=4,
Flagged=5, DisableFE=6, ROD=7, Decoding=8, Invalid=9, LinkMaskedByPPC=10, Limit=11, lastErrType=Limit };
virtual ~IPixelByteStreamErrorsSvc(){}
static const InterfaceID & interfaceID();
......@@ -80,6 +81,13 @@ public:
virtual StatusCode readData()=0;
virtual StatusCode recordData()=0;
// FE-I4B
virtual void addLinkMaskedByPPC() = 0;
virtual void addLimitError() = 0;
virtual void updateServiceRecords(int code, unsigned int count) = 0;
virtual unsigned int getServiceRecordCount(int code) = 0;
};
inline const InterfaceID & IPixelByteStreamErrorsSvc::interfaceID(){
......
......@@ -28,7 +28,8 @@ PixelByteStreamErrorsSvc::PixelByteStreamErrorsSvc( const std::string& name,
m_event_read(0),
m_FE_errors(0),
m_module_isread(0),
m_readESD(false)
m_ServiceRecords(),
m_readESD(false)
{
declareProperty("ReadingESD",m_readESD,"Get summary of BS errors from StoreGate, if available");
}
......@@ -155,6 +156,8 @@ PixelByteStreamErrorsSvc::finalize(){
msg(MSG::INFO) << " - Number of Trailer Errors: " << m_numTrailerErrors << endreq;
msg(MSG::INFO) << " - Number of Disabled FE Errors: " << m_numDisabledFEErrors << endreq;
msg(MSG::INFO) << " - Number of ROD Errors: " << m_numRODErrors << endreq;
msg(MSG::INFO) << " - Number of links masked by PPC: " << m_numLinkMaskedByPPC << endreq;
msg(MSG::INFO) << " - Number of header/trailer limit errors: " << m_numLimitError << endreq;
msg(MSG::INFO) << " - Number of Unknown word Errors: " << m_numDecodingErrors << endreq;
msg(MSG::INFO) << " --------------------------------------------- " << endreq;
......@@ -250,6 +253,12 @@ PixelByteStreamErrorsSvc::resetCounts() {
m_numDisabledFEErrors=0;
m_numDecodingErrors=0;
m_numRODErrors=0;
m_numLinkMaskedByPPC=0;
m_numLimitError=0;
// Also reset FE-I4B service records
for (int i = 0; i < 32; ++i) m_ServiceRecords[i] = 0;
}
......@@ -285,7 +294,11 @@ PixelByteStreamErrorsSvc::getNumberOfErrors(int errorType) {
return m_numDecodingErrors;
case Invalid:
return m_numInvalidIdentifiers;
}
case LinkMaskedByPPC:
return m_numLinkMaskedByPPC;
case Limit:
return m_numLimitError;
}
return 0;
}
......
......@@ -53,7 +53,7 @@ public:
virtual bool isGood(const IdentifierHash & elementIdHash);
virtual unsigned int getModuleErrors(IdentifierHash hashID) {return m_module_errors[(int) hashID];};
virtual unsigned int getModuleErrors(IdentifierHash hashID) {return m_module_errors[(int) hashID];}
virtual void setModuleErrors(IdentifierHash hashID, unsigned int errorcode) {
if( static_cast<unsigned int>(hashID) < m_max_hashes ){
......@@ -82,25 +82,31 @@ public:
virtual void addDisabledFEError(){m_numDisabledFEErrors++;};
virtual void addDecodingError(){m_numDecodingErrors++;};
virtual void addRODError(){m_numRODErrors++;};
virtual void addRead(IdentifierHash hashID){
if( static_cast<unsigned int>(hashID) < m_max_hashes ){
virtual void addRead(IdentifierHash hashID) {
if (static_cast<unsigned int>(hashID) < m_max_hashes) {
m_event_read[static_cast<unsigned int>(hashID)]++;
m_module_isread[static_cast<unsigned int>(hashID)]=true;
}
}
// FE-I4B trailer errors
virtual void addLinkMaskedByPPC() {++m_numLinkMaskedByPPC;}
virtual void addLimitError() {++m_numLimitError;}
};
virtual unsigned int getReadEvents(IdentifierHash hashID){return m_event_read[(int)hashID];};
virtual bool isActive(IdentifierHash hashID){return m_module_isread[(int)hashID];};
virtual unsigned int getReadEvents(IdentifierHash hashID){return m_event_read[(int)hashID];}
virtual bool isActive(IdentifierHash hashID){return m_module_isread[(int)hashID];}
virtual void addBadFE(IdentifierHash hashID, int badFE){
if( static_cast<unsigned int>(hashID) < m_max_hashes ){
m_FE_errors[static_cast<unsigned int>(hashID)] |= (1<<badFE);
}
};
virtual unsigned int getBadFE(IdentifierHash hashID) {return m_FE_errors[(int)hashID];};
virtual unsigned int getBadFE(IdentifierHash hashID) {return m_FE_errors[(int)hashID];}
virtual StatusCode readData();
virtual StatusCode recordData();
// FE-I4B service records
virtual void updateServiceRecords(int code, unsigned int count) {m_ServiceRecords[code] = count;}
virtual unsigned int getServiceRecordCount(int code) {return m_ServiceRecords[code];}
private:
const PixelID* m_pixel_id;
......@@ -124,6 +130,14 @@ private:
int m_numDisabledFEErrors;
int m_numDecodingErrors;
int m_numRODErrors;
int m_numLinkMaskedByPPC;
int m_numLimitError;
// FE-I4B service record codes
// Array of counters for each code, i.e. m_ServiceRecords[0] is the
// count for code 0 (BCID counter error)
unsigned int m_ServiceRecords[32];
// int m_numRawErrors;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment