forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cms-sw#26679 from veszpv/RestoreFEDErrorTreatmentF…
…orPhase0v2 Restore fed error treatment for phase0 pixel detector
- Loading branch information
Showing
8 changed files
with
423 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#ifndef ErrorCheckerBase_H | ||
#define ErrorCheckerBase_H | ||
/** \class ErrorCheckerBase | ||
* | ||
* | ||
*/ | ||
|
||
#include "DataFormats/SiPixelRawData/interface/SiPixelRawDataError.h" | ||
|
||
#include <vector> | ||
#include <map> | ||
|
||
|
||
class SiPixelFrameConverter; | ||
class SiPixelFedCabling; | ||
|
||
class ErrorCheckerBase { | ||
|
||
public: | ||
typedef cms_uint32_t Word32; | ||
typedef cms_uint64_t Word64; | ||
|
||
typedef std::vector<SiPixelRawDataError> DetErrors; | ||
typedef std::map<cms_uint32_t, DetErrors> Errors; | ||
|
||
virtual ~ErrorCheckerBase() {}; | ||
|
||
virtual void setErrorStatus(bool ErrorStatus)=0; | ||
|
||
virtual bool checkCRC(bool& errorsInEvent, int fedId, const Word64* trailer, Errors& errors)=0; | ||
|
||
virtual bool checkHeader(bool& errorsInEvent, int fedId, const Word64* header, Errors& errors)=0; | ||
|
||
virtual bool checkTrailer(bool& errorsInEvent, int fedId, unsigned int nWords, const Word64* trailer, Errors& errors)=0; | ||
|
||
virtual bool checkROC(bool& errorsInEvent, int fedId, const SiPixelFrameConverter* converter, | ||
const SiPixelFedCabling* theCablingTree, | ||
Word32& errorWord, Errors& errors)=0; | ||
|
||
|
||
|
||
virtual void conversionError(int fedId, const SiPixelFrameConverter* converter, | ||
int status, Word32& errorWord, Errors& errors)=0; | ||
|
||
private: | ||
|
||
virtual cms_uint32_t errorDetId(const SiPixelFrameConverter* converter, | ||
int errorType, const Word32 & word) const =0; | ||
|
||
}; | ||
|
||
#endif |
49 changes: 49 additions & 0 deletions
49
EventFilter/SiPixelRawToDigi/interface/ErrorCheckerPhase0.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#ifndef ErrorCheckerPhase0_H | ||
#define ErrorCheckerPhase0_H | ||
/** \class ErrorCheckerPhase0 | ||
* | ||
* | ||
*/ | ||
|
||
#include "EventFilter/SiPixelRawToDigi/interface/ErrorCheckerBase.h" | ||
#include "FWCore/Utilities/interface/typedefs.h" | ||
|
||
|
||
class ErrorCheckerPhase0 : public ErrorCheckerBase { | ||
|
||
public: | ||
typedef cms_uint32_t Word32; | ||
typedef cms_uint64_t Word64; | ||
|
||
typedef std::vector<SiPixelRawDataError> DetErrors; | ||
typedef std::map<cms_uint32_t, DetErrors> Errors; | ||
|
||
ErrorCheckerPhase0(); | ||
|
||
void setErrorStatus(bool ErrorStatus) override; | ||
|
||
bool checkCRC(bool& errorsInEvent, int fedId, const Word64* trailer, Errors& errors) override; | ||
|
||
bool checkHeader(bool& errorsInEvent, int fedId, const Word64* header, Errors& errors) override; | ||
|
||
bool checkTrailer(bool& errorsInEvent, int fedId, unsigned int nWords, const Word64* trailer, Errors& errors) override; | ||
|
||
bool checkROC(bool& errorsInEvent, int fedId, const SiPixelFrameConverter* converter, | ||
const SiPixelFedCabling* theCablingTree, | ||
Word32& errorWord, Errors& errors) override; | ||
|
||
|
||
|
||
void conversionError(int fedId, const SiPixelFrameConverter* converter, | ||
int status, Word32& errorWord, Errors& errors) override; | ||
|
||
private: | ||
|
||
bool includeErrors; | ||
|
||
cms_uint32_t errorDetId(const SiPixelFrameConverter* converter, | ||
int errorType, const Word32 & word) const override; | ||
|
||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.