68 for (
int row=0; row<15; row++)
97 fedFatal =
m_dbe->
book1D(
"CASTOR FEDFatal errors" ,
"Number of Fatal Errors per CASTOR FED",3,690,693);
107 if(
fVerbosity>0)
std::cout <<
"CastorDataIntegrityMonitor::setup - NO DQMStore service" << std::endl;
125 if(
fVerbosity>0)
std::cout <<
"CastorDataIntegrityMonitor::processEvent (begin)" << std::endl;
135 if (fed.
size()<12)
continue;
140 for (
int spigot=0; spigot<15; spigot++){
141 for (
int dcc=0; dcc<3; dcc++){
154 if(
fVerbosity>0)
std::cout <<
"CastorDataIntegrityMonitor::processEvent (end)" << std::endl;
169 if(!dccHeader)
return;
172 unsigned char* trailer_ptr = (
unsigned char*) (raw.
data()+raw.
size()-
sizeof(
uint64_t));
269 if (!trailer.
check())
290 int WholeErrorList=0;
302 if (
dccid==693)
continue;
306 if (WholeErrorList!=0) {
308 if ((WholeErrorList>>0)&0x01) {
314 if (((WholeErrorList>>1)&0x01)!=0) {
315 if(
fVerbosity>0)
std::cout <<
"CastorDataIntegrityMonitor:: error ==> Uncorrected Error" << std::endl;
320 if (((WholeErrorList>>2)&0x01)!=0) {
321 if(
fVerbosity>0)
std::cout <<
"CastorDataIntegrityMonitor:: error ==> Truncated data coming into LRB" << std::endl;
326 if (((WholeErrorList>>3)&0x01)!=0) {
327 if(
fVerbosity>0)
std::cout <<
"CastorDataIntegrityMonitor: error ==>: FIFO Overflow" << std::endl;
332 if (((WholeErrorList>>4)&0x01)!=0) {
333 if(
fVerbosity>0)
std::cout <<
"CastorDataIntegrityMonitor:: error ==> (EvN Mismatch), htr payload metadeta" << std::endl;
338 if (((WholeErrorList>>5)&0x01)!=0) {
339 if(
fVerbosity>0)
std::cout <<
"CastorDataIntegrityMonitor:: error ==> STatus: hdr/data/trlr error" << std::endl;
344 if (((WholeErrorList>>6)&0x01)!=0) {
345 if(
fVerbosity>0)
std::cout <<
"CastorDataIntegrityMonitor:: error ==> ODD 16-bit word count from HT error" << std::endl;
355 if(
fVerbosity>0)
std::cout <<
"CastorDataIntegrityMonitor:: HTR Problem: Spigot Not Present"<<std::endl;
361 if(
fVerbosity>0)
std::cout <<
"CastorDataIntegrityMonitor:: HTR Problem: Spigot Data Truncated"<<std::endl;
366 if(
fVerbosity>0)
std::cout <<
"CastorDataIntegrityMonitor:: HTR Problem: Spigot CRC Error"<<std::endl;
371 if(
fVerbosity>0)
std::cout <<
"CastorDataIntegrityMonitor:: HTR Problem: Spigot Data Length too small"<<std::endl;
377 if(
fVerbosity>0)
std::cout<<
"CastorDataIntegrityMonitor:: Invalid HTR data (data beyond payload size) observed on spigot " << spigot
378 <<
" of DCC with source id " << dccHeader->
getSourceId()<< std::endl;
384 if(
fVerbosity>0)
std::cout <<
"CastorDataIntegrityMonitor:: Invalid HTR data observed on spigot " << spigot <<
" of DCC with source id " << dccHeader->
getSourceId() << std::endl;
390 if(
fVerbosity>0)
std::cout <<
"CastorDataIntegrityMonitor:: Histogram data passed to non-histogram unpacker on spigot " << spigot <<
" of DCC with source id "
std::map< int, short > CDFEventType_list
void unpack(const FEDRawData &raw, const CastorElectronicsMap &emap)
virtual void setup(const edm::ParameterSet &ps, DQMStore *dbe)
bool check() const
Check for a good event Requires a minimum length, matching wordcount and length, not an empty event...
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
int problemsSpigot[15][3]
MonitorElement * fedFatal
void beginRun(const edm::EventSetup &iSetup)
size_t size() const
Lenght of the data buffer in bytes.
std::map< int, short >::iterator CDFvers_it
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
MonitorElement * spigotStatusMap
std::map< int, short > CDFReservedBits_list
std::map< int, short >::iterator CDFReservedBits_it
~CastorDataIntegrityMonitor()
unsigned long long uint64_t
int lenght()
The length of the event fragment counted in 64-bit words including header and trailer.
std::map< int, short > CDFversionNumber_list
void processEvent(const FEDRawDataCollection &RawData, const HcalUnpackerReport &report, const CastorElectronicsMap &emap)
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
std::map< int, short >::iterator CDFEvT_it
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
std::vector< int > fedUnpackList_
MonitorElement * fedEntries
TH2F * getTH2F(void) const
MonitorElement * bookInt(const char *name)
Book int.
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void setCurrentFolder(const std::string &fullpath)
bool isHistogramEvent() const
Is this event a histogram event? (do not call standard unpack in this case!!!!!)
CastorDataIntegrityMonitor()