CMS 3D CMS Logo

CSCDCCExaminer Class Reference

#include <EventFilter/CSCRawToDigi/interface/CSCDCCExaminer.h>

List of all members.

Public Member Functions

std::set< intchambersWithError (int num) const
std::set< intchambersWithWarning (int num) const
long check (const unsigned short *&buffer, long length)
void crcALCT (bool enable)
void crcCFEB (bool enable)
void crcTMB (bool enable)
 CSCDCCExaminer (unsigned long mask=0x1)
std::map< short, const
unsigned short * > 
DDU_block (void) const
std::map< short, unsigned long > DDU_ptrOffsets (void) const
std::map< short, unsigned long > DDU_size (void) const
short dduSourceID (void)
std::map< short, std::map
< short, const unsigned short * > > 
DMB_block (void) const
std::map< short, std::map
< short, unsigned long > > 
DMB_ptrOffsets (void) const
std::map< short, std::map
< short, unsigned long > > 
DMB_size (void) const
const char * errName (int num) const
bool error (int num) const
const char * errorName (int num) const
long errors (void) const
std::map< int, long > errorsDetailed (void) const
long errorsForChamber (int chamber) const
long errorsForDDU (int dduSourceID) const
unsigned long getMask () const
std::vector< intlistOfDDUs (void) const
void modeDDU (bool enable)
OStreamoutput1 (void)
OStreamoutput2 (void)
std::map< int, long > payloadDetailed (void) const
long payloadForChamber (int chamber) const
const char * payloadName (int num) const
void setMask (unsigned long mask)
std::map< int, long > statusDetailed (void) const
long statusForChamber (int chamber) const
const char * statusName (int num) const
bool warning (int num) const
const char * warningName (int num) const
long warnings (void) const
std::map< int, long > warningsDetailed (void) const
long warningsForChamber (int chamber) const
long warningsForDDU (int dduSourceID) const
const char * wrnName (int num) const
 ~CSCDCCExaminer (void)

Public Attributes

std::map< int, long > cntCHAMB_Headers
std::map< int, long > cntCHAMB_Trailers
long cntDDU_Headers
long cntDDU_Trailers
const unsigned short nERRORS
const unsigned short nPAYLOADS
const unsigned short nSTATUSES
const unsigned short nWARNINGS

Private Member Functions

void checkDAVs ()
 checks DAV_ALCT, DAV_TMB, and DAV_CFEB
void checkTriggerHeadersAndTrailers ()
void clear ()
void zeroCounts ()

Private Attributes

unsigned long ALCT_CRC
long ALCT_WordCount
long ALCT_WordsExpected
long ALCT_WordsSinceLastHeader
std::map< int, long > bCHAMB_ERR
std::map< int, long > bCHAMB_PAYLOAD
std::map< int, long > bCHAMB_STATUS
std::map< int, long > bCHAMB_WRN
std::map< int, long > bDDU_ERR
std::map< int, long > bDDU_WRN
long bERROR
const unsigned short * buf0
const unsigned short * buf1
const unsigned short * buf2
const unsigned short * buf_1
const unsigned short * buf_2
const unsigned short * buffer_start
long bWARNING
OStream cerr
long CFEB_BSampleCount
unsigned long CFEB_CRC
long CFEB_SampleCount
long CFEB_SampleWordCount
bool checkCrcALCT
bool checkCrcCFEB
bool checkCrcTMB
OStream cout
int currentChamber
bool DAV_ALCT
int DAV_CFEB
int DAV_DMB
bool DAV_TMB
long DDU_WordCount
long DDU_WordMismatch_Occurrences
long DDU_WordsSinceLastHeader
long DDU_WordsSinceLastTrailer
std::map< short, const
unsigned short * > 
dduBuffers
std::map< short, unsigned long > dduOffsets
std::map< short, unsigned long > dduSize
int DMB_Active
std::map< short, std::map
< short, const unsigned short * > > 
dmbBuffers
std::map< short, std::map
< short, unsigned long > > 
dmbOffsets
std::map< short, std::map
< short, unsigned long > > 
dmbSize
unsigned long examinerMask
bool fALCT_Format2007
bool fALCT_Header
std::set< intfCHAMB_ERR [29]
std::set< intfCHAMB_WRN [5]
bool fDCC_Header
bool fDCC_Trailer
bool fDDU_Header
bool fDDU_Trailer
bool fDMB_Header
bool fDMB_Trailer
bool fERROR [29]
bool fTMB_Format2007
bool fTMB_Header
bool fWARNING [5]
bool modeDDUonly
int nDMBs
std::vector< char * > sDMBEventStaus
std::vector< char * > sDMBExpectedPayload
std::vector< char * > sERROR
std::vector< char * > sERROR_
short sourceID
std::vector< char * > sWARNING
std::vector< char * > sWARNING_
unsigned long TMB_CRC
unsigned TMB_Firmware_Revision
long TMB_Tbins
long TMB_WordCount
long TMB_WordsExpected
long TMB_WordsRPC
long TMB_WordsSinceLastHeader
unsigned short tmpbuf [16]
bool uniqueALCT
bool uniqueTMB

Classes

class  OStream


Detailed Description

Definition at line 9 of file CSCDCCExaminer.h.


Constructor & Destructor Documentation

CSCDCCExaminer::CSCDCCExaminer ( unsigned long  mask = 0x1  ) 

Definition at line 43 of file CSCDCCExaminer.cc.

References ALCT_CRC, buf0, buf1, buf2, buf_1, TestMuL1L2Filter_cff::cerr, cerr, CFEB_CRC, checkCrcALCT, checkCrcCFEB, checkCrcTMB, clear(), cntCHAMB_Headers, cntCHAMB_Trailers, cntDDU_Headers, cntDDU_Trailers, GenMuonPlsPt100GeV_cfg::cout, cout, currentChamber, DAV_ALCT, DAV_CFEB, DAV_TMB, DDU_WordCount, DDU_WordMismatch_Occurrences, DDU_WordsSinceLastHeader, DDU_WordsSinceLastTrailer, DMB_Active, fALCT_Format2007, fALCT_Header, fDCC_Header, fDCC_Trailer, fDDU_Header, fDDU_Trailer, fDMB_Header, fDMB_Trailer, fTMB_Format2007, fTMB_Header, modeDDUonly, nDMBs, CSCDCCExaminer::OStream::redirect(), sDMBEventStaus, sDMBExpectedPayload, sERROR, sERROR_, sourceID, sWARNING, sWARNING_, TMB_CRC, TMB_Firmware_Revision, TMB_WordsRPC, tmpbuf, and zeroCounts().

00043                                                 :nERRORS(29),nWARNINGS(5),nPAYLOADS(12),nSTATUSES(23),sERROR(nERRORS),sWARNING(nWARNINGS),sERROR_(nERRORS),sWARNING_(nWARNINGS),sDMBExpectedPayload(nPAYLOADS),sDMBEventStaus(nSTATUSES),examinerMask(mask){
00044   cout.redirect(std::cout); cerr.redirect(std::cerr);
00045 
00046   sERROR[0] = " Any errors                                       ";
00047   sERROR[1] = " DDU Trailer Missing                              ";
00048   sERROR[2] = " DDU Header Missing                               ";
00049   sERROR[4] = " DDU Word Count Error                             ";
00050   sERROR[3] = " DDU CRC Error (not yet implemented)              ";
00051   sERROR[5] = " DMB Trailer Missing                              ";
00052   sERROR[6] = " DMB Header Missing                               ";
00053   sERROR[7] = " ALCT Trailer Missing                             ";
00054   sERROR[8] = " ALCT Header Missing                              ";
00055   sERROR[9] = " ALCT Word Count Error                            ";
00056   sERROR[10] = "ALCT CRC Error                                   ";
00057   sERROR[11] = "ALCT Trailer Bit Error                           ";
00058   // ^^^ This is due to seeing many events in ddu293 (also, some in ddu294)
00059   // with some bits in the 1st ALCT D-Header being lost. This causes a chain of errors:
00060   // - TMB Trailer is not identified and TMB word count mismatch occur when Trailer is found
00061   // - CFEB sample count is not reset on ALCT Trailer.
00062   // To merge all these errors in one,
00063   // the D-signature in the 1st ALCT Trailer will not be required for identifying the ALCT Trailer;
00064   // However, if these bits are found to be missing, ERROR[11] will be flagged.
00065   // This is just a temporary patch to make the output look less clattered.
00066   sERROR[12] = "TMB Trailer Missing                              ";
00067   sERROR[13] = "TMB Header Missing                               ";
00068   sERROR[14] = "TMB Word Count Error                             ";
00069   sERROR[15] = "TMB CRC Error                                    ";
00070   sERROR[16] = "CFEB Word Count Per Sample Error                 ";
00071   sERROR[17] = "CFEB Sample Count Error                          ";
00072   sERROR[18] = "CFEB CRC Error                                   ";
00073   sERROR[19] = "DDU Event Size Limit Error                       ";
00074   sERROR[20] = "C-Words                                          ";
00075   sERROR[21] = "ALCT DAV Error                                   ";
00076   sERROR[22] = "TMB DAV Error                                    ";
00077   sERROR[23] = "CFEB DAV Error                                   ";
00078   sERROR[24] = "DMB Active Error                                 ";
00079   sERROR[25] = "DCC Trailer Missing                              ";
00080   sERROR[26] = "DCC Header Missing                               ";
00081   sERROR[27] = "DMB DAV vs. DMB Active mismatch Error            ";
00082   sERROR[28] = "Extra words between DDU Header and first DMB header";
00083 
00084   //    sERROR[21] = "DDU Header vs. Trailer mismatch for DAV or Avtive"; // oboslete since 16.09.05
00085 
00086   sWARNING[0] = " Extra words between DDU Trailer and DDU Header ";
00087   sWARNING[1] = " DDU Header Incomplete                          ";
00088 
00089   sDMBExpectedPayload[0]  = "CFEB1_ACTIVE";
00090   sDMBExpectedPayload[1]  = "CFEB2_ACTIVE";
00091   sDMBExpectedPayload[2]  = "CFEB3_ACTIVE";
00092   sDMBExpectedPayload[3]  = "CFEB4_ACTIVE";
00093   sDMBExpectedPayload[4]  = "CFEB5_ACTIVE";
00094   sDMBExpectedPayload[5]  = "ALCT_DAV";
00095   sDMBExpectedPayload[6]  = "TMB_DAV";
00096   sDMBExpectedPayload[7]  = "CFEB1_DAV";
00097   sDMBExpectedPayload[8]  = "CFEB2_DAV";
00098   sDMBExpectedPayload[9]  = "CFEB3_DAV";
00099   sDMBExpectedPayload[10] = "CFEB4_DAV";
00100   sDMBExpectedPayload[11] = "CFEB5_DAV";
00101 
00102   sDMBEventStaus[0]  = "ALCT_FIFO_FULL";
00103   sDMBEventStaus[1]  = "TMB_FIFO_FULL";
00104   sDMBEventStaus[2]  = "CFEB1_FIFO_FULL";
00105   sDMBEventStaus[3]  = "CFEB2_FIFO_FULL";
00106   sDMBEventStaus[4]  = "CFEB3_FIFO_FULL";
00107   sDMBEventStaus[5]  = "CFEB4_FIFO_FULL";
00108   sDMBEventStaus[6]  = "CFEB5_FIFO_FULL";
00109   sDMBEventStaus[7]  = "ALCT_START_TIMEOUT";
00110   sDMBEventStaus[8]  = "TMB_START_TIMEOUT";
00111   sDMBEventStaus[9]  = "CFEB1_START_TIMEOUT";
00112   sDMBEventStaus[10] = "CFEB2_START_TIMEOUT";
00113   sDMBEventStaus[11] = "CFEB3_START_TIMEOUT";
00114   sDMBEventStaus[12] = "CFEB4_START_TIMEOUT";
00115   sDMBEventStaus[13] = "CFEB5_START_TIMEOUT";
00116   sDMBEventStaus[14] = "ALCT_END_TIMEOUT";
00117   sDMBEventStaus[15] = "TMB_END_TIMEOUT";
00118   sDMBEventStaus[16] = "CFEB1_END_TIMEOUT";
00119   sDMBEventStaus[17] = "CFEB2_END_TIMEOUT";
00120   sDMBEventStaus[18] = "CFEB3_END_TIMEOUT";
00121   sDMBEventStaus[19] = "CFEB4_END_TIMEOUT";
00122   sDMBEventStaus[20] = "CFEB5_END_TIMEOUT";
00123   sDMBEventStaus[21] = "CFEB Active-DAV mismatch";
00124   sDMBEventStaus[22] = "B-words found";
00125 
00126   sERROR_[0] = " Any errors: 00";
00127   sERROR_[1] = " DDU Trailer Missing: 01";
00128   sERROR_[2] = " DDU Header Missing: 02";
00129   sERROR_[4] = " DDU Word Count Error: 04";
00130   sERROR_[3] = " DDU CRC Error (not yet implemented): 03";
00131   sERROR_[5] = " DMB Trailer Missing: 05";
00132   sERROR_[6] = " DMB Header Missing: 06";
00133   sERROR_[7] = " ALCT Trailer Missing: 07";
00134   sERROR_[8] = " ALCT Header Missing: 08";
00135   sERROR_[9] = " ALCT Word Count Error: 09";
00136   sERROR_[10] = "ALCT CRC Error: 10";
00137   sERROR_[11] = "ALCT Trailer Bit Error: 11";
00138   sERROR_[12] = "TMB Trailer Missing: 12";
00139   sERROR_[13] = "TMB Header Missing: 13";
00140   sERROR_[14] = "TMB Word Count Error: 14";
00141   sERROR_[15] = "TMB CRC Error: 15";
00142   sERROR_[16] = "CFEB Word Count Per Sample Error: 16";
00143   sERROR_[17] = "CFEB Sample Count Error: 17";
00144   sERROR_[18] = "CFEB CRC Error: 18";
00145   sERROR_[19] = "DDU Event Size Limit Error: 19";
00146   sERROR_[20] = "C-Words: 20";
00147   sERROR_[21] = "ALCT DAV Error: 21";
00148   sERROR_[22] = "TMB DAV Error: 22";
00149   sERROR_[23] = "CFEB DAV Error: 23";
00150   sERROR_[24] = "DMB Active Error: 24";
00151   sERROR_[25] = "DCC Trailer Missing: 25";
00152   sERROR_[26] = "DCC Header Missing: 26";
00153   sERROR_[27] = "DMB DAV vs. DMB Active mismatch Error: 27";
00154   sERROR_[28] = "Extra words between DDU Header and first DMB header: 28";
00155   //    sERROR_[21] = "DDU Header vs. Trailer mismatch for DAV or Avtive: 21"; // oboslete since 16.09.05
00156 
00157   sWARNING_[0] = " Extra words between DDU Trailer and DDU Header: 00";
00158   sWARNING_[1] = " DDU Header Incomplete: 02";
00159 
00160   fDCC_Header  = false;
00161   fDCC_Trailer = false;
00162   fDDU_Header  = false;
00163   fDDU_Trailer = false;
00164   fDMB_Header  = false;
00165   fDMB_Trailer = false;
00166   fALCT_Header = false;
00167   fTMB_Header  = false;
00168   fALCT_Format2007 = true;
00169   fTMB_Format2007  = true;
00170 
00171   cntDDU_Headers  = 0;
00172   cntDDU_Trailers = 0;
00173   cntCHAMB_Headers.clear();
00174   cntCHAMB_Trailers.clear();
00175 
00176   DAV_ALCT = false;
00177   DAV_TMB  = false;
00178   DAV_CFEB = 0;
00179   DMB_Active  = 0;
00180   nDMBs = 0;
00181   DDU_WordsSinceLastHeader     = 0;
00182   DDU_WordCount                = 0;
00183   DDU_WordMismatch_Occurrences = 0;
00184   DDU_WordsSinceLastTrailer    = 0;
00185 
00186   TMB_WordsRPC  = 0;
00187   TMB_Firmware_Revision = 0;
00188   zeroCounts();
00189 
00190   checkCrcALCT = false; ALCT_CRC=0;
00191   checkCrcTMB  = false; TMB_CRC=0;
00192   checkCrcCFEB = false; CFEB_CRC=0;
00193 
00194   modeDDUonly = false;
00195   sourceID    = 0xFFF;
00196   currentChamber = -1;
00197 
00198   //headerDAV_Active = -1; // Trailer vs. Header check // Obsolete since 16.09.05
00199 
00200   clear();
00201   buf_1 = &(tmpbuf[0]);
00202   buf0  = &(tmpbuf[4]);
00203   buf1  = &(tmpbuf[8]);
00204   buf2  = &(tmpbuf[12]);
00205 
00206   bzero(tmpbuf, sizeof(short)*16);
00207 }

CSCDCCExaminer::~CSCDCCExaminer ( void   )  [inline]

Definition at line 220 of file CSCDCCExaminer.h.

00220 {}


Member Function Documentation

std::set<int> CSCDCCExaminer::chambersWithError ( int  num  )  const [inline]

Definition at line 159 of file CSCDCCExaminer.h.

References fCHAMB_ERR, and nERRORS.

00159 { if(num>=0&&num<nERRORS)   return fCHAMB_ERR[num]; else return std::set<int>(); }

std::set<int> CSCDCCExaminer::chambersWithWarning ( int  num  )  const [inline]

Definition at line 160 of file CSCDCCExaminer.h.

References fCHAMB_WRN, and nWARNINGS.

00160 { if(num>=0&&num<nWARNINGS) return fCHAMB_WRN[num]; else return std::set<int>(); }

long CSCDCCExaminer::check ( const unsigned short *&  buffer,
long  length 
)

bzero(fERROR, sizeof(bool)*nERRORS); bzero(fWARNING, sizeof(bool)*nWARNINGS); bERROR = 0; bWARNING = 0; for(int err=0; err<nERRORS; err++) fCHAMB_ERR[err].clear(); for(int wrn=0; wrn<nWARNINGS; wrn++) fCHAMB_WRN[wrn].clear(); bCHAMB_ERR.clear(); bCHAMB_WRN.clear();

w = buf0[j] & 0x7fff;

w = buf0[j] & 0x7fff;

Definition at line 209 of file CSCDCCExaminer.cc.

References ALCT_CRC, ALCT_WordCount, ALCT_WordsExpected, ALCT_WordsSinceLastHeader, bCHAMB_ERR, bCHAMB_PAYLOAD, bCHAMB_STATUS, bCHAMB_WRN, bDDU_ERR, bDDU_WRN, bERROR, buf0, buf1, buf2, buf_1, buf_2, buffer_start, bWARNING, cerr, CFEB_BSampleCount, CFEB_CRC, CFEB_SampleCount, CFEB_SampleWordCount, checkCrcALCT, checkCrcCFEB, checkCrcTMB, checkDAVs(), checkTriggerHeadersAndTrailers(), clear(), cntCHAMB_Headers, cntCHAMB_Trailers, cntDDU_Headers, cntDDU_Trailers, cout, currentChamber, DAV_ALCT, DAV_CFEB, DAV_DMB, DAV_TMB, DDU_WordCount, DDU_WordsSinceLastHeader, DDU_WordsSinceLastTrailer, dduBuffers, dduOffsets, dduSize, DMB_Active, dmbBuffers, dmbOffsets, dmbSize, end, lat::endl(), err, fALCT_Format2007, fALCT_Header, fCHAMB_ERR, fDCC_Header, fDCC_Trailer, fDDU_Header, fDDU_Trailer, fDMB_Header, fDMB_Trailer, fERROR, find(), fTMB_Format2007, fTMB_Header, fWARNING, i, int, j, modeDDUonly, nDMBs, nERRORS, nWARNINGS, sERROR, sourceID, sWARNING, t, TMB_CRC, TMB_Firmware_Revision, TMB_Tbins, TMB_WordCount, TMB_WordsExpected, TMB_WordsRPC, TMB_WordsSinceLastHeader, tmpbuf, uniqueALCT, uniqueTMB, w, and zeroCounts().

Referenced by CSCHLTMonitorModule::monitorEvent(), CSCMonitorModule::monitorEvent(), cscdqm::EventProcessor::processExaminer(), and CSCDCCUnpacker::produce().

00209                                                                     {
00210   if( length<=0 ) return -1;
00211 
00212   // 'buffer' is a sliding pointer; keep track of the true buffer
00213   buffer_start = buffer;
00214 
00215   while( length>0 ){
00216     // == Store last 4 read buffers in pipeline-like memory (note that memcpy works quite slower!)
00217     buf_2 = buf_1;         //  This bufer was not needed so far
00218     buf_1 = buf0;
00219     buf0  = buf1;
00220     buf1  = buf2;
00221     buf2  = buffer;
00222 
00223     // check for too long event
00224     if(!fERROR[19] && DDU_WordsSinceLastHeader>50000 ){
00225       fERROR[19] = true;
00226       bERROR    |= 0x80000;
00227     }
00228 
00229     // increment counter of 64-bit words since last DDU Header
00230     // this counter is reset if DDU Header is found
00231     if ( fDDU_Header ) { ++DDU_WordsSinceLastHeader; }
00232 
00233     // increment counter of 64-bit words since last DDU Trailer
00234     // this counter is reset if DDU Trailer is found
00235     if ( fDDU_Trailer ) {++DDU_WordsSinceLastTrailer; }
00236 
00237     // increment counter of 16-bit words since last DMB*ALCT Header match
00238     // this counter is reset if ALCT Header is found right after DMB Header
00239     if ( fALCT_Header ) { ALCT_WordsSinceLastHeader = ALCT_WordsSinceLastHeader + 4; }
00240 
00241     // increment counter of 16-bit words since last DMB*TMB Header match
00242     // this counter is reset if TMB Header is found right after DMB Header or ALCT Trailer
00243     if ( fTMB_Header ) { TMB_WordsSinceLastHeader = TMB_WordsSinceLastHeader + 4; }
00244 
00245     // increment counter of 16-bit words since last of DMB Header, ALCT Trailer, TMB Trailer,
00246     // CFEB Sample Trailer, CFEB B-word; this counter is reset by all these conditions
00247     if ( fDMB_Header ) { CFEB_SampleWordCount = CFEB_SampleWordCount + 4; }
00248 
00249     // If DDU header is missing we set unphysical 0xFFF value for DDU id
00250     if( !fDDU_Header ){ sourceID=0xFFF; }
00251 
00252 
00253     if (!modeDDUonly) {
00254       // DCC Header 1 && DCC Header 2
00255       // =VB= Added support for Sep. 2008 CMS DAQ DCC format
00256       if ( ( ( (buf0[3]&0xF000) == 0x5000 && (buf0[0]&0x00FF) == 0x005F )
00257            ||
00258              ( (buf0[3]&0xF000) == 0x5000 && (buf0[0]&0x000F) == 0x0008 ) )
00259            &&
00260           (buf1[3]&0xFF00) == 0xD900 )
00261         {
00262         if( fDCC_Header ){
00263           // == Another DCC Header before encountering DCC Trailer!
00264           fERROR[25]=true;
00265           bERROR|=0x2000000;
00266           fERROR[0]=true;
00267           bERROR|=0x1;
00268           cerr<<"\n\nDCC Header Occurrence ";
00269           cerr<<"  ERROR 25    "<<sERROR[25]<<endl;
00270           fDDU_Header = false;
00271 
00272           // go backward for 3 DDU words ( buf2, buf1, and buf0 )
00273           buffer-=12;
00274           buf_1 = &(tmpbuf[0]);  // Just for safety
00275           buf0  = &(tmpbuf[4]);  // Just for safety
00276           buf1  = &(tmpbuf[8]);  // Just for safety
00277           buf2  = &(tmpbuf[12]); // Just for safety
00278           bzero(tmpbuf,sizeof(unsigned short)*16);
00279           return length+12;
00280         }
00281 
00282     fDCC_Header  = true;
00283     clear();
00284           }
00285         }
00286     // == Check for Format Control Words, set proper flags, perform self-consistency checks
00287 
00288     // C-words anywhere besides DDU Header
00289     if( fDDU_Header && ( (buf0[0]&0xF000)==0xC000 || (buf0[1]&0xF000)==0xC000 || (buf0[2]&0xF000)==0xC000 || (buf0[3]&0xF000)==0xC000 ) &&
00290         ( /*buf_1[0]!=0x8000 ||*/ buf_1[1]!=0x8000 || buf_1[2]!=0x0001 || buf_1[3]!=0x8000 ) ){
00291       fERROR[0]  = true;
00292       bERROR    |= 0x1;
00293       fERROR[20] = true;
00294       bERROR    |= 0x100000;
00295           // fCHAMB_ERR[20].insert(currentChamber);
00296           // bCHAMB_ERR[currentChamber] |= 0x100000;
00297       cerr<<"\nDDU Header Occurrence = "<<cntDDU_Headers;
00298       cerr<<"  ERROR 20 "<<sERROR[20]<<endl;
00299     }
00300 
00301     // == DDU Header found
00302     if( /*buf0[0]==0x8000 &&*/ buf0[1]==0x8000 && buf0[2]==0x0001 && buf0[3]==0x8000 ){
00303       // headerDAV_Active = (buf1[1]<<16) | buf1[0]; // Obsolete since 16.09.05
00305         checkDAVs();
00306         checkTriggerHeadersAndTrailers();
00308 
00309       if( fDDU_Header ){
00310         // == Another DDU Header before encountering DDU Trailer!
00311         fERROR[1]=true;
00312         bERROR|=0x2;
00313         fERROR[0] = true;
00314         bERROR|=0x1;
00315         cerr<<"\n\nDDU Header Occurrence = "<<cntDDU_Headers;
00316         cerr<<"  ERROR 1    "<<sERROR[1]<<endl;
00317         fDDU_Header = false;
00318 
00319         // Part of work for chambers that hasn't been done in absent trailer
00320         if( fDMB_Header || fDMB_Trailer ){
00321           fERROR[5] = true;
00322           bERROR   |= 0x20;
00323           // Since here there are no chances to know what this chamber was, force it to be -2
00324           if( currentChamber == -1 ) currentChamber = -2;
00325           fCHAMB_ERR[5].insert(currentChamber);
00326           bCHAMB_ERR[currentChamber] |= 0x20;
00327           fCHAMB_ERR[0].insert(currentChamber);
00328           bCHAMB_ERR[currentChamber] |= 0x1;
00329           cerr<<"\n\nDDU Header Occurrence = "<<cntDDU_Headers;
00330           cerr<<"  ERROR 5    "<<sERROR[5]<<endl;
00331         }       // One of DMB Trailers is missing ( or both )
00332         fDMB_Header  = false;
00333         fDMB_Trailer = false;
00334 
00335         if( DMB_Active!=nDMBs ){
00336           fERROR[24] = true;
00337           bERROR    |= 0x1000000;
00338         }
00339         DMB_Active = 0;
00340     nDMBs = 0;
00341 
00342         // Unknown chamber denoted as -2
00343         // If it still remains in any of errors - put it in error 0
00344         for(int err=1; err<nERRORS; ++err)
00345           if( fCHAMB_ERR[err].find(-2) != fCHAMB_ERR[err].end() ){
00346             fCHAMB_ERR[0].insert(-2);
00347             bCHAMB_ERR[-2] |= 0x1;
00348           }
00349 
00350         bDDU_ERR[sourceID] |= bERROR;
00351         bDDU_WRN[sourceID] |= bWARNING;
00352 
00353         // go backward for 3 DDU words ( buf2, buf1, and buf0 )
00354         buffer-=12;
00355         buf_1 = &(tmpbuf[0]);  // Just for safety
00356         buf0  = &(tmpbuf[4]);  // Just for safety
00357         buf1  = &(tmpbuf[8]);  // Just for safety
00358         buf2  = &(tmpbuf[12]); // Just for safety
00359         bzero(tmpbuf,sizeof(unsigned short)*16);
00360         return length+12;
00361       }
00362 
00363       // Reset all Error and Warning flags to be false
00371       currentChamber = -1; // Unknown yet
00372 
00373       if( fDDU_Trailer && DDU_WordsSinceLastTrailer != 4 ){
00374         // == Counted extraneous words between last DDU Trailer and this DDU Header
00375         fWARNING[0]=true;
00376         bWARNING|=0x1;
00377         cerr<<"\nDDU Header Occurrence = "<<cntDDU_Headers;
00378         cerr<<"  WARNING 0 "<<sWARNING[0]<<" "<<DDU_WordsSinceLastTrailer<<" extra 64-bit words"<<endl;
00379       }
00380 
00381       sourceID      = ((buf_1[1]&0xF)<<8) | ((buf_1[0]&0xFF00)>>8);
00382       fDDU_Header   = true;
00383       fDDU_Trailer  = false;
00384       DDU_WordCount = 0;
00385       fDMB_Header   = false;
00386       fDMB_Trailer  = false;
00387       fALCT_Header  = false;
00388       fALCT_Format2007= true;
00389       fTMB_Header   = false;
00390       fTMB_Format2007= true;
00391       uniqueALCT    = true;
00392       uniqueTMB     = true;
00393       zeroCounts();
00394 
00395       if (modeDDUonly) {
00396          fDCC_Header  = true;
00397          clear();
00398       }
00399 
00400           dduBuffers[sourceID] = buf_1;
00401       dduOffsets[sourceID] = buf_1-buffer_start;
00402       dduSize   [sourceID] = 0;
00403       dmbBuffers[sourceID].clear();
00404       dmbOffsets[sourceID].clear();
00405       dmbSize   [sourceID].clear();
00406 
00407           bDDU_ERR[sourceID] = 0;
00408       bDDU_WRN[sourceID] = 0;
00409 
00410       nDMBs      = 0;
00411       DMB_Active = buf1[0]&0xF;
00412       DAV_DMB    = buf1[1]&0x7FFF;
00413 
00414       int nDAV_DMBs=0;
00415       for(int bit=0; bit<15; bit++) if( DAV_DMB&(1<<bit) ) nDAV_DMBs++;
00416       if(DMB_Active!=nDAV_DMBs){
00417           fERROR[27] = true;
00418           bERROR    |= 0x8000000;
00419       }
00420 
00421       if( (buf_1[3]&0xF000)!=0x5000 ){
00422         fWARNING[1]=true;
00423         bWARNING|=0x2;
00424         cerr<<"\nDDU Header Occurrence = "<<cntDDU_Headers;
00425                 cerr<<"  WARNING 1 "<<sWARNING[1]<<". What must have been Header 1: 0x"<<std::hex<<buf_1[0]<<" 0x"<<buf_1[1]<<" 0x"<<buf_1[2]<<" 0x"<<buf_1[3]<<std::dec<<endl;
00426       }
00427 
00428       ++cntDDU_Headers;
00429       DDU_WordsSinceLastHeader=0; // Reset counter of DDU Words since last DDU Header
00430       cout<<"\n----------------------------------------------------------"<<endl;
00431       cout<<"DDU  Header Occurrence "<<cntDDU_Headers<< " L1A = " << ( ((buf_1[2]&0xFFFF) + ((buf_1[3]&0x00FF) << 16)) ) <<endl;
00432     }
00433 
00434     // == DMB Header found
00435     if( (buf0[0]&0xF000)==0xA000 && (buf0[1]&0xF000)==0xA000 && (buf0[2]&0xF000)==0xA000 && (buf0[3]&0xF000)==0xA000 ){
00437       checkDAVs();
00438       checkTriggerHeadersAndTrailers();
00440 
00441       if( DDU_WordsSinceLastHeader>3 && !fDMB_Header && !fDMB_Trailer && !nDMBs ){
00442         fERROR[28]=true;
00443         bERROR|=0x10000000;;
00444       }
00445 
00446       if( fDMB_Header || fDMB_Trailer ){ // F or E  DMB Trailer is missed
00447         fERROR[5]=true;
00448         bERROR|=0x20;
00449         fCHAMB_ERR[5].insert(currentChamber);
00450         bCHAMB_ERR[currentChamber] |= 0x20;
00451         fCHAMB_ERR[0].insert(currentChamber);
00452         bCHAMB_ERR[currentChamber] |= 0x1;
00453       }
00454       fDMB_Header  = true;
00455       fDMB_Trailer = false;
00456 
00457       // If previous DMB record was not assigned to any chamber ( it still has -1 indentificator )
00458       // let's free -1 identificator for current use and call undefined chamber from previous record -2
00459       // ( -2 may already exists in this sets but we have nothing to do with it )
00460       for(int err=0; err<nERRORS; ++err)
00461         if( fCHAMB_ERR[err].find(-1) != fCHAMB_ERR[err].end() ){
00462           fCHAMB_ERR[err].erase(-1);
00463           fCHAMB_ERR[err].insert(-2);
00464         }
00465 // Two lines below are commented out because payloads never get filled if 0xA header is missing
00466 //      bCHAMB_PAYLOAD[-2] |= bCHAMB_PAYLOAD[-1];
00467 //      fCHAMB_PAYLOAD[-1] = 0;
00468       bCHAMB_STATUS[-2] |= bCHAMB_STATUS[-1];
00469       bCHAMB_STATUS[-1] = 0;
00470       bCHAMB_ERR[-2] |= bCHAMB_ERR[-1];
00471       bCHAMB_ERR[-1] = 0;
00472       bCHAMB_WRN[-2] |= bCHAMB_WRN[-1];
00473       bCHAMB_WRN[-1] = 0;
00474 
00475       // Chamber id ( DMB_ID + (DMB_CRATE<<4) ) from header
00476       currentChamber = buf0[1]&0x0FFF;
00477       ++cntCHAMB_Headers[currentChamber];
00478       bCHAMB_ERR[currentChamber] |= 0; //Victor's line
00479 
00480       fALCT_Header = false;
00481       fALCT_Format2007= true;
00482       fTMB_Header  = false;
00483       fTMB_Format2007= true;
00484       uniqueALCT   = true;
00485       uniqueTMB    = true;
00486       zeroCounts();
00487       CFEB_CRC                  = 0;
00488 
00489       nDMBs++;
00490 
00491       dmbBuffers[sourceID][currentChamber] = buf0-4;
00492       dmbOffsets[sourceID][currentChamber] = buf0-4-buffer_start;
00493       dmbSize   [sourceID][currentChamber] = 4;
00494 
00495       // Print DMB_ID from DMB Header
00496       cout<< "Crate=" << setw(3) << setfill('0') << ((buf0[1]>>4)&0x00FF) << " DMB="<<setw(2)<<setfill('0')<<(buf0[1]&0x000F)<<" ";
00497       // Print ALCT_DAV and TMB_DAV from DMB Header
00498       //cout<<setw(1)<<((buf0[0]&0x0020)>>5)<<" "<<((buf0[0]&0x0040)>>6)<<" ";
00499       cout<<setw(1)<<((buf0[0]&0x0200)>>9)<<" "<<((buf0[0]&0x0800)>>11)<<" "; //change of format 16.09.05
00500       // Print CFEB_DAV from DMB Header
00501       cout<<setw(1)<<((buf0[0]&0x0010)>>4)<<((buf0[0]&0x0008)>>3)<<((buf0[0]&0x0004)>>2)<<((buf0[0]&0x0002)>>1)<<(buf0[0]&0x0001);
00502       // Print DMB Header Tag
00503       cout << " {";
00504 
00505       // Set variables if we are waiting ALCT, TMB and CFEB records to be present in event
00506       DAV_ALCT = (buf0[0]&0x0200)>>9;
00507       DAV_TMB  = (buf0[0]&0x0800)>>11;
00508       DAV_CFEB = 0;
00509       if( buf0[0]&0x0001 ) ++DAV_CFEB;
00510       if( buf0[0]&0x0002 ) ++DAV_CFEB;
00511       if( buf0[0]&0x0004 ) ++DAV_CFEB;
00512       if( buf0[0]&0x0008 ) ++DAV_CFEB;
00513       if( buf0[0]&0x0010 ) ++DAV_CFEB;
00514       if( DAV_ALCT ) bCHAMB_PAYLOAD[currentChamber] |= 0x20;
00515       if( DAV_TMB  ) bCHAMB_PAYLOAD[currentChamber] |= 0x40;
00516       bCHAMB_PAYLOAD[currentChamber] |= (buf0[0]&0x001f)<<7;
00517       bCHAMB_PAYLOAD[currentChamber] |=((buf_1[2]>>5)&0x001f);
00518           bCHAMB_STATUS [currentChamber] |= (buf0[0]&0x0040)<<16;
00519     }
00520 
00521 
00522     // New ALCT data format:
00523     if( ( buf0[0]==0xDB0A && (buf0[1]&0xF000)==0xD000 && (buf0[2]&0xF000)==0xD000 && (buf0[3]&0xF000)==0xD000)
00524         &&
00525         ( (buf_1[0]&0xF000)==0xA000 && (buf_1[1]&0xF000)==0xA000 && (buf_1[2]&0xF000)==0xA000 && (buf_1[3]&0xF000)==0xA000 ) ){
00526         fALCT_Header              = true;
00527         fALCT_Format2007          = true;
00528         ALCT_CRC                  = 0;
00529         ALCT_WordsSinceLastHeader = 4;
00530 
00531         // Calculate expected number of ALCT words
00532         ALCT_WordsExpected = 12; // header and trailer always exists
00533 
00534         //  Aauxilary variables
00535         //   number of wire groups per layer:
00536         int  nWGs_per_layer = ( (buf1[2]&0x0007) + 1 ) * 16 ;
00537         int  nWG_round_up   = int(nWGs_per_layer/12)+(nWGs_per_layer%3?1:0);
00538         //   configuration present:
00539         bool config_present =  buf1[0]&0x4000;
00540         //   lct overflow:
00541         bool lct_overflow   =  buf1[0]&0x2000;
00542         //   raw overflow:
00543         bool raw_overflow   =  buf1[0]&0x1000;
00544         //   l1a_window:
00545         int  lct_tbins      = (buf1[3]&0x01E0)>>5;
00546         //   fifo_tbins:
00547         int  raw_tbins      = (buf1[3]&0x001F);
00548 
00549         //  Data block sizes:
00550         //   3 words of Vertex ID register + 5 words of config. register bits:
00551         int config_size    = ( config_present ? 3 + 5 : 0 );
00552         //   collision mask register:
00553         int colreg_size    = ( config_present ? nWGs_per_layer/4 : 0 );
00554         //   hot channel mask:
00555         int hot_ch_size    = ( config_present ? nWG_round_up*6 : 0 );
00556         //   ALCT0,1 (best tracks):
00557         int alct_0_1_size  = ( !lct_overflow ? 2*lct_tbins : 0 );
00558         //   raw hit dump size:
00559         int raw_hit_dump_size=(!raw_overflow ? nWG_round_up*6*raw_tbins : 0 );
00560 
00561         ALCT_WordsExpected += config_size + colreg_size + hot_ch_size + alct_0_1_size + raw_hit_dump_size;
00562 
00563         cout<<" <A";
00564     } else {
00565         // Old ALCT data format
00566 
00567         // == ALCT Header found right after DMB Header
00568         //   (check for all currently reserved/fixed bits in ALCT first 4 words)
00569         // if( ( (buf0 [0]&0xF800)==0x6000 && (buf0 [1]&0xFF80)==0x0080 && (buf0 [2]&0xF000)==0x0000 && (buf0 [3]&0xc000)==0x0000 )
00570         if( ( (buf0 [0]&0xF800)==0x6000 && (buf0 [1]&0x8F80)==0x0080 && (buf0 [2]&0x8000)==0x0000 && (buf0 [3]&0xc000)==0x0000 )
00571             &&
00572             ( (buf_1[0]&0xF000)==0xA000 && (buf_1[1]&0xF000)==0xA000 && (buf_1[2]&0xF000)==0xA000 && (buf_1[3]&0xF000)==0xA000 ) ){
00573               fALCT_Header              = true;
00574               fALCT_Format2007          = false;
00575               ALCT_CRC                  = 0;
00576               ALCT_WordsSinceLastHeader = 4;
00577 
00578               // Calculate expected number of ALCT words
00579               if( (buf0[3]&0x0003)==0 ){ ALCT_WordsExpected = 12; }     // Short Readout
00580 
00581               if( (buf0[1]&0x0003)==1 ){                                        // Full Readout
00582                        ALCT_WordsExpected = ((buf0[1]&0x007c) >> 2) *
00583                         ( ((buf0[3]&0x0001)   )+((buf0[3]&0x0002)>>1)+
00584                         ((buf0[3]&0x0004)>>2)+((buf0[3]&0x0008)>>3)+
00585                         ((buf0[3]&0x0010)>>4)+((buf0[3]&0x0020)>>5)+
00586                         ((buf0[3]&0x0040)>>6) ) * 12 + 12;
00587               }
00588               cout<<" <A";
00589         }
00590     }
00591 
00592         // New TMB format
00593     if( (buf0[0]&0xFFFF)==0xDB0C ){
00594         fTMB_Header              = true;
00595         fTMB_Format2007          = true;
00596         TMB_CRC                  = 0;
00597         TMB_WordsSinceLastHeader = 4;
00598         TMB_WordsExpected = 0;
00599 
00600         // Calculate expected number of TMB words (whether RPC included will be known later)
00601         if ( (buf1[1]&0x3000) == 0x3000) { TMB_WordsExpected = 12; }  // Short Header Only
00602         if ( (buf1[1]&0x3000) == 0x0000) { TMB_WordsExpected = 48; }  // Long Header Only
00603 
00604         cout << " <T";
00605     } else {
00606         // == TMB Header found right after DMB Header or right after ALCT Trailer
00607         if(   (buf0 [0]&0xFFFF)==0x6B0C && (
00608                                         ( (buf_1[0]&0xF000)==0xA000 && (buf_1[1]&0xF000)==0xA000 && (buf_1[2]&0xF000)==0xA000 && (buf_1[3]&0xF000)==0xA000 )
00609                                         ||
00610                                         ( (buf_1[0]&0x0800)==0x0000 && (buf_1[1]&0xF800)==0xD000 && (buf_1[2]&0xFFFF)==0xDE0D && (buf_1[3]&0xF000)==0xD000 )
00611                                         // should've been (buf_1[0]&0xF800)==0xD000 - see comments for sERROR[11]
00612                                         ) )
00613         {
00614         //if( (buf_1[2]&0xFFFF)==0xDE0D && (buf_1[3]&0xFC00)!=0xD000 && summer2004 ) ???
00615 
00616             fTMB_Header              = true;
00617             fTMB_Format2007          = false;
00618             TMB_CRC                  = 0;
00619             TMB_WordsSinceLastHeader = 4;
00620 
00621             // Calculate expected number of TMB words (whether RPC included will be known later)
00622             if ( (buf0[1]&0x3000) == 0x3000) { TMB_WordsExpected = 8; }   // Short Header Only
00623             if ( (buf0[1]&0x3000) == 0x0000) { TMB_WordsExpected = 32; }  // Long Header Only
00624 
00625             if ( (buf0[1]&0x3000) == 0x1000) {
00626                 // Full Readout   = 28 + (#Tbins * #CFEBs * 6)
00627                 TMB_Tbins=(buf0[1]&0x001F);
00628                 TMB_WordsExpected = 28 + TMB_Tbins * ((buf1[0]&0x00E0)>>5) * 6;
00629             }
00630 
00631                         cout << " <T";
00632                 }
00633         }
00634     // New TMB format => very long header Find Firmware revision
00635     if ( fTMB_Header && fTMB_Format2007 && TMB_WordsSinceLastHeader==8 ) {
00636         TMB_Firmware_Revision = buf0[3];
00637     }
00638 
00639     // New TMB format => very long header
00640     if ( fTMB_Header && fTMB_Format2007 && TMB_WordsSinceLastHeader==20 ) {
00641         // Full Readout   = 44 + (#Tbins * #CFEBs * 6)
00642         TMB_Tbins=(buf0[3]&0x00F8)>>3;
00643         TMB_WordsExpected = 44 + TMB_Tbins * (buf0[3]&0x0007) * 6;
00644     }
00645 
00646     // == ALCT Trailer found
00647         if(
00648         // New ALCT data format:
00649         ( buf0[0]==0xDE0D && (buf0[1]&0xF800)==0xD000 && (buf0[2]&0xF800)==0xD000 && (buf0[3]&0xF000)==0xD000 && fALCT_Format2007 ) ||
00650         // Old ALCT data format; last check is added to avoid confusion with new TMB header (may not be needed):
00651         ( (buf0[0]&0x0800)==0x0000 && (buf0[1]&0xF800)==0xD000 && (buf0[2]&0xFFFF)==0xDE0D && (buf0[3]&0xF000)==0xD000 && !fALCT_Format2007 && !(fTMB_Header&&fTMB_Format2007) )
00652     ){
00653       // should've been (buf0[0]&0xF800)==0xD000 - see comments for sERROR[11]
00654 
00655       // Second ALCT -> Lost both previous DMB Trailer and current DMB Header
00656       if( !uniqueALCT ) currentChamber = -1;
00657       // Check if this ALCT record have to exist according to DMB Header
00658       if(   DAV_ALCT  ) DAV_ALCT = false; else DAV_ALCT = true;
00659 
00660       if( !fALCT_Header ){
00661         fERROR[8] = true;
00662         bERROR   |= 0x100;
00663         fCHAMB_ERR[8].insert(currentChamber);
00664         bCHAMB_ERR[currentChamber] |= 0x100;
00665         fCHAMB_ERR[0].insert(currentChamber);
00666         bCHAMB_ERR[currentChamber] |= 0x1;
00667       } // ALCT Header is missing
00668 
00669       if( !fALCT_Format2007 && (buf0[0]&0xF800)!=0xD000 ){
00670         fERROR[11] = true;
00671         bERROR    |= 0x800;
00672         fCHAMB_ERR[11].insert(currentChamber);
00673         bCHAMB_ERR[currentChamber] |= 0x800;
00674         fCHAMB_ERR[0].insert(currentChamber);
00675         bCHAMB_ERR[currentChamber] |= 0x1;
00676       } // some bits in 1st D-Trailer are lost
00677 
00678       // Check calculated CRC sum against reported
00679       if( checkCrcALCT ){
00680     unsigned long crc = ( fALCT_Format2007 ? buf0[1] : buf0[0] ) & 0x7ff;
00681     crc |= ((uint32_t)( ( fALCT_Format2007 ? buf0[2] : buf0[1] ) & 0x7ff)) << 11;
00682         if( ALCT_CRC != crc ){
00683           fERROR[10] = true;
00684           bERROR   |= 0x400;
00685           fCHAMB_ERR[10].insert(currentChamber);
00686           bCHAMB_ERR[currentChamber] |= 0x400;
00687           fCHAMB_ERR[0].insert(currentChamber);
00688           bCHAMB_ERR[currentChamber] |= 0x1;
00689         }
00690       }
00691 
00692       fALCT_Header = false;
00693       uniqueALCT   = false;
00694       CFEB_CRC     = 0;
00695       //ALCT_WordCount = (buf0[3]&0x03FF);
00696       ALCT_WordCount = (buf0[3]&0x07FF);
00697       CFEB_SampleWordCount = 0;
00698       cout << "A> ";
00699     }
00700 
00701     // Calculation of CRC sum ( algorithm is written by Madorsky )
00702     if( fALCT_Header && checkCrcALCT ){
00703       for(unsigned short j=0, w=0; j<4; ++j){
00705         w = buf0[j] & (fALCT_Format2007 ? 0xffff : 0x7fff);
00706         for(unsigned long i=15, t=0, ncrc=0; i<16; i--){
00707           t = ((w >> i) & 1) ^ ((ALCT_CRC >> 21) & 1);
00708           ncrc = (ALCT_CRC << 1) & 0x3ffffc;
00709           ncrc |= (t ^ (ALCT_CRC & 1)) << 1;
00710           ncrc |= t;
00711           ALCT_CRC = ncrc;
00712         }
00713       }
00714     }
00715 
00716     // == Find Correction for TMB_WordsExpected due to RPC raw hits,
00717     //    should it turn out to be the new RPC-aware format
00718     if( fTMB_Header && ((buf0[2]&0xFFFF)==0x6E0B) ) {
00719       if (fTMB_Format2007) {
00720         if (TMB_Firmware_Revision >= 0x50c3) { // TMB2007 rev.0x50c3
00721           // On/off * nRPCs * nTimebins * 2 words/RPC/bin
00722           TMB_WordsRPC = ((buf_1[0]&0x0010)>>4) * ((buf_1[0]&0x000c)>>2) * ((buf_1[0]>>5) & 0x1F) * 2;
00723         }
00724         else { // TMB2007 (may not work since TMB_Tbins != RPC_Tbins)
00725           TMB_WordsRPC = ((buf_1[0]&0x0040)>>6) * ((buf_1[0]&0x0030)>>4) * TMB_Tbins * 2;
00726         }
00727       }
00728       else { // Old format
00729         TMB_WordsRPC   = ((buf_1[2]&0x0040)>>6) * ((buf_1[2]&0x0030)>>4) * TMB_Tbins * 2;
00730       }
00731       TMB_WordsRPC += 2; // add header/trailer for block of RPC raw hits
00732     }
00733 
00734     // == TMB Trailer found
00735     if(
00736        // Old TMB data format; last condition in needed not to confuse if with new ALCT data header
00737        ((buf0[0]&0xF000)==0xD000 && (buf0[1]&0xF000)==0xD000 && (buf0[2]&0xFFFF)==0xDE0F && (buf0[3]&0xF000)==0xD000 && !fTMB_Format2007 && !(fALCT_Header&&fALCT_Format2007)) ||
00738        // New TMB data format
00739        ( buf0[0]==        0xDE0F && (buf0[1]&0xF000)==0xD000 && (buf0[2]&0xF000)==0xD000 && (buf0[3]&0xF000)==0xD000 &&  fTMB_Format2007 )
00740     ){
00741 
00742       // Second TMB -> Lost both previous DMB Trailer and current DMB Header
00743       if( !uniqueTMB ) currentChamber = -1;
00744       // Check if this TMB record have to exist according to DMB Header
00745       if(   DAV_TMB  ) DAV_TMB = false; else DAV_TMB = true;
00746 
00747       if(!fTMB_Header){
00748         fERROR[13] = true;
00749         bERROR    |= 0x2000;
00750         fCHAMB_ERR[13].insert(currentChamber);
00751         bCHAMB_ERR[currentChamber] |= 0x2000;
00752         fCHAMB_ERR[0].insert(currentChamber);
00753         bCHAMB_ERR[currentChamber] |= 0x1;
00754       }  // TMB Header is missing
00755 
00756       // Check calculated CRC sum against reported
00757       if( checkCrcTMB ){
00758     unsigned long crc = ( fTMB_Format2007 ? buf0[1]&0x7ff : buf0[0]&0x7ff );
00759     crc |= ((uint32_t)( ( fTMB_Format2007 ? buf0[2]&0x7ff : buf0[1] & 0x7ff ) )) << 11;
00760         if( TMB_CRC != crc ){
00761           fERROR[15] = true;
00762           bERROR    |= 0x8000;
00763           fCHAMB_ERR[15].insert(currentChamber);
00764           bCHAMB_ERR[currentChamber] |= 0x8000;
00765           fCHAMB_ERR[0].insert(currentChamber);
00766           bCHAMB_ERR[currentChamber] |= 0x1;
00767         }
00768       }
00769 
00770       fTMB_Header = false;
00771       uniqueTMB   = false;
00772       CFEB_CRC     = 0;
00773       TMB_WordCount = (buf0[3]&0x07FF);
00774 
00775       // == Correct TMB_WordsExpected
00776       //        1) for 2 optional 0x2AAA and 0x5555 Words in the Trailer
00777       //        2) for extra 4 frames in the new TMB trailer and
00778       //         for RPC raw hit data, if present
00779       //
00780       // If the scope data was enabled in readout, scope data markers (0x6B05
00781       // and 0x6E05) appear before 0x6E0C, and the optional 0x2AAA and 0x5555
00782       // trailer words are suppressed.  So far, we only have data with the
00783       // empty scope content, so more corrections will be needed once
00784       // non-empty scope data is available. -SV, 5 Nov 2008.
00785       //
00786       // If word count is not multiple of 4, add 2 optional words and
00787       // 4 trailer words.
00788       if( buf_1[1]==0x6E0C || buf_1[1]==0x6B05 ) {
00789         TMB_WordsExpected += 6;
00790         // Add RPC counts if RPC raw hits included.
00791         if( buf_1[0]==0x6E04 )
00792           TMB_WordsExpected += TMB_WordsRPC;
00793       }
00794       // If word count is multiple of 4, add 4 trailer words.
00795       else if( buf_1[3]==0x6E0C || buf_1[3]==0x6B05 ) {
00796         TMB_WordsExpected += 4;
00797         // Add RPC counts if RPC raw hits included.
00798         if( buf_1[2]==0x6E04 )
00799           TMB_WordsExpected += TMB_WordsRPC;
00800       }
00801 
00802       CFEB_SampleWordCount = 0;
00803       cout << "T> ";
00804     }
00805 
00806     if( fTMB_Header && checkCrcTMB ){
00807       for(unsigned short j=0, w=0; j<4; ++j){
00809         w = buf0[j] & (fTMB_Format2007 ? 0xffff : 0x7fff);
00810         for(unsigned long i=15, t=0, ncrc=0; i<16; i--){
00811           t = ((w >> i) & 1) ^ ((TMB_CRC >> 21) & 1);
00812           ncrc = (TMB_CRC << 1) & 0x3ffffc;
00813           ncrc |= (t ^ (TMB_CRC & 1)) << 1;
00814           ncrc |= t;
00815           TMB_CRC = ncrc;
00816         }
00817       }
00818     }
00819 
00820 
00821     // == CFEB Sample Trailer found
00822 
00823         if( ((buf0[1]&0xF000)==0x7000) &&
00824                 ((buf0[2]&0xF000)==0x7000) &&
00825                 ((buf0[1]!=0x7FFF) || (buf0[2]!=0x7FFF)) &&
00826                 ( ((buf0[3]&0xFFFF)==0x7FFF) ||   // old format
00827               ( (buf0[3]&buf0[0])==0x0000 && (buf0[3]+buf0[0])==0x7FFF ) // 2007 format
00828               ) ){
00829 
00830       if((CFEB_SampleCount%8)  == 0   ){ cout<<" <"; }
00831       if( CFEB_SampleWordCount == 100 ){ cout<<"+";  }
00832       if( CFEB_SampleWordCount != 100 ){ cout<<"-";
00833       fERROR[16] = true;
00834       bERROR    |= 0x10000;
00835       fCHAMB_ERR[16].insert(currentChamber);
00836       bCHAMB_ERR[currentChamber] |= 0x10000;
00837       fCHAMB_ERR[0].insert(currentChamber);
00838       bCHAMB_ERR[currentChamber] |= 0x1;
00839       }
00840 
00841       ++CFEB_SampleCount;
00842 
00843       if( (CFEB_SampleCount%8)==0 ){
00844         cout<<">";
00845         CFEB_BSampleCount=0;
00846         // Count CFEBs
00847         DAV_CFEB--;
00848       }
00849 
00850       // Check calculated CRC sum against reported
00851       if( checkCrcCFEB && CFEB_CRC!=buf0[0] ){
00852         fERROR[18] = true;
00853         bERROR    |= 0x40000;
00854         fCHAMB_ERR[18].insert(currentChamber);
00855         bCHAMB_ERR[currentChamber] |= 0x40000;
00856         fCHAMB_ERR[0].insert(currentChamber);
00857         bCHAMB_ERR[currentChamber] |= 0x1;
00858       }
00859 
00860       CFEB_CRC = 0;
00861       CFEB_SampleWordCount=0;
00862     }
00863 
00864 
00865     // == CFEB B-word found
00866     if( (buf0[0]&0xF000)==0xB000 && (buf0[1]&0xF000)==0xB000 && (buf0[2]&0xF000)==0xB000 && (buf0[3]&0xF000)==0xB000 ){
00867       bCHAMB_STATUS[currentChamber] |= 0x400000;
00868 
00869       if( (CFEB_SampleCount%8)==0 ){ cout<<" <"; }
00870       cout<<"B";
00871 
00872       ++CFEB_SampleCount;
00873       ++CFEB_BSampleCount;
00874 
00875       if( (CFEB_SampleCount%8)==0 ){
00876         cout << ">";
00877         CFEB_BSampleCount=0;
00878         DAV_CFEB--;
00879       }
00880 
00881       CFEB_SampleWordCount=0;
00882     }
00883 
00884      // == If it is nither ALCT record nor TMB - probably it is CFEB record and we try to count CRC sum.
00885     // It very few words of CFEB occasionaly will be misinterpreted as ALCT or TMB header the result
00886     // for the CRC sum will be wrong, but other errors of Trailers counting will appear as well
00887     if( checkCrcCFEB && fDMB_Header && !fTMB_Header && !fALCT_Header && CFEB_SampleWordCount )
00888       for(int pos=0; pos<4; ++pos)
00889         CFEB_CRC=(buf0[pos]&0x1fff)^((buf0[pos]&0x1fff)<<1)^(((CFEB_CRC&0x7ffc)>>2)|((0x0003&CFEB_CRC)<<13))^((CFEB_CRC&0x7ffc)>>1);
00890 
00891 
00892     // == DMB F-Trailer found
00893     if( (buf0[0]&0xF000)==0xF000 && (buf0[1]&0xF000)==0xF000 && (buf0[2]&0xF000)==0xF000 && (buf0[3]&0xF000)==0xF000 ){
00894       if(!fDMB_Header){
00895         currentChamber = buf0[3]&0x0FFF;
00896         fERROR[6] = true;
00897         bERROR   |= 0x40;
00898         fCHAMB_ERR[6].insert(currentChamber);
00899         bCHAMB_ERR[currentChamber] |= 0x40;
00900         nDMBs++;
00901         // Set variables if we are waiting ALCT, TMB and CFEB records to be present in event
00902         if( buf0[0]&0x0400 ) bCHAMB_PAYLOAD[currentChamber] |= 0x20;
00903         if( buf0[0]&0x0800 ) bCHAMB_PAYLOAD[currentChamber] |= 0x40;
00904         bCHAMB_PAYLOAD[currentChamber] |= (buf0[0]&0x001f)<<7;
00905         bCHAMB_PAYLOAD[currentChamber] |=((buf0[0]>>5)&0x1f);
00906 
00907       } // DMB Header is missing
00908       fDMB_Header  = false;
00909       fDMB_Trailer = true;
00910       uniqueALCT   = true;
00911       uniqueTMB    = true;
00912 
00913       dmbSize[sourceID][currentChamber] = buf0 - dmbBuffers[sourceID][currentChamber];
00914 
00915       // Finally check if DAVs were correct
00916       checkDAVs();
00917 
00918       // If F-Trailer is lost then do necessary work here
00919       if( (buf1[0]&0xF000)!=0xE000 || (buf1[1]&0xF000)!=0xE000 || (buf1[2]&0xF000)!=0xE000 || (buf1[3]&0xF000)!=0xE000 ){
00920         for(int err=1; err<nERRORS; ++err)
00921           if( fCHAMB_ERR[err].find(currentChamber) != fCHAMB_ERR[err].end() ){
00922             fCHAMB_ERR[0].insert(currentChamber);
00923             bCHAMB_ERR[currentChamber] |= 0x1;
00924           }
00925         // Reset chamber id
00926         currentChamber=-1;
00927         /*
00928           for(int err=0; err<nERRORS; err++)
00929           if( fCHAMB_ERR[err].find(-1) != fCHAMB_ERR[err].end() )
00930           fCHAMB_ERR[err].erase(-1);
00931           bCHAMB_ERR[-1] = 0;
00932           bCHAMB_WRN[-1] = 0;
00933         */
00934       }
00935 
00936       // Print DMB F-Trailer marker
00937       cout << " }";
00938     }
00939 
00940     // == DMB E-Trailer found
00941     if( (buf0[0]&0xF000)==0xE000 && (buf0[1]&0xF000)==0xE000 && (buf0[2]&0xF000)==0xE000 && (buf0[3]&0xF000)==0xE000 ){
00942       if( !fDMB_Header && !fDMB_Trailer ) nDMBs++; // both DMB Header and DMB F-Trailer were missing
00943 
00944       bCHAMB_STATUS[currentChamber] |= (buf0[0]&0x0800)>>11;
00945       bCHAMB_STATUS[currentChamber] |= (buf0[0]&0x0400)>>9;
00946       bCHAMB_STATUS[currentChamber] |= (buf0[0]&0x03E0)>>3;
00947       if( fDMB_Trailer ){ // F-Trailer exists
00948         bCHAMB_STATUS[currentChamber] |= (buf_1[2]&0x0002)<<6;
00949         bCHAMB_STATUS[currentChamber] |= (buf_1[2]&0x0001)<<8;
00950         bCHAMB_STATUS[currentChamber] |= (buf_1[3]&0x001f)<<9;
00951         bCHAMB_STATUS[currentChamber] |= (buf_1[3]&0x0040)<<8;
00952         bCHAMB_STATUS[currentChamber] |= (buf_1[3]&0x0020)<<10;
00953                 bCHAMB_STATUS[currentChamber] |= (buf_1[3]&0x0f80)<<9;
00954       }
00955       fDMB_Header  = false;
00956 
00957       // If chamber id is unknown it is time to find it out
00958       if( currentChamber==-1 ){
00959         currentChamber = buf0[1]&0x0FFF;
00960         for(int err=0; err<nERRORS; ++err)
00961           if( fCHAMB_ERR[err].find(-1) != fCHAMB_ERR[err].end() ){
00962             fCHAMB_ERR[err].insert(currentChamber);
00963             fCHAMB_ERR[err].erase(-1);
00964           }
00965     bCHAMB_STATUS[currentChamber] = bCHAMB_STATUS[-1];
00966     bCHAMB_STATUS[-1] = 0;
00967         bCHAMB_ERR[currentChamber] = bCHAMB_ERR[-1];
00968         bCHAMB_ERR[-1] = 0;
00969         bCHAMB_WRN[currentChamber] = bCHAMB_WRN[-1];
00970         bCHAMB_WRN[-1] = 0;
00971       }
00972       ++cntCHAMB_Trailers[buf0[1]&0x0FFF];
00973 
00974       dmbSize[sourceID][currentChamber] = buf0 - dmbBuffers[sourceID][currentChamber];
00975 
00976       // Lost DMB F-Trailer before
00977       if( !fDMB_Trailer ){
00978         fERROR[6] = true;
00979         bERROR   |= 0x40;
00980         fCHAMB_ERR[6].insert(currentChamber);
00981         bCHAMB_ERR[currentChamber] |= 0x40;
00982         fCHAMB_ERR[0].insert(currentChamber);
00983         bCHAMB_ERR[currentChamber] |= 0x1;
00984         // Check if DAVs were correct here
00985         checkDAVs();
00986       }
00987       fDMB_Trailer = false;
00988 
00989      checkTriggerHeadersAndTrailers();
00990 
00991       //
00992       for(int err=0; err<nERRORS; ++err)
00993         if( fCHAMB_ERR[err].find(-1) != fCHAMB_ERR[err].end() ){
00994           fCHAMB_ERR[err].erase(-1);
00995           fCHAMB_ERR[err].insert(-2);
00996         }
00997       bCHAMB_STATUS[-2] |= bCHAMB_STATUS[-1];
00998       bCHAMB_STATUS[-1] = 0;
00999       bCHAMB_ERR[-2] |= bCHAMB_ERR[-1];
01000       bCHAMB_ERR[-1] = 0;
01001       bCHAMB_WRN[-2] |= bCHAMB_WRN[-1];
01002       bCHAMB_WRN[-1] = 0;
01003 
01004       if( currentChamber != -1 )
01005         for(int err=1; err<nERRORS; ++err)
01006           if( fCHAMB_ERR[err].find(currentChamber) != fCHAMB_ERR[err].end() ){
01007             fCHAMB_ERR[0].insert(currentChamber);
01008             bCHAMB_ERR[currentChamber] |= 0x1;
01009           }
01010 
01011       currentChamber=-1;
01012 
01013       // Print DMB E-Trailer marker
01014       cout<<" DMB="<<(buf0[1]&0x000F);
01015       cout << "; "
01016            << ALCT_WordsSinceLastHeader << "-"
01017            << ALCT_WordCount << "-"
01018            << ALCT_WordsExpected
01019            << "      "
01020            << TMB_WordsSinceLastHeader << "-"
01021            << TMB_WordCount << "-"
01022            << TMB_WordsExpected
01023            << endl;
01024     }
01025 
01026     // == DDU Trailer found
01027     if( buf0[0]==0x8000 && buf0[1]==0x8000 && buf0[2]==0xFFFF && buf0[3]==0x8000 ){
01028       // Obsolete since 16.09.05
01029       //                        if( headerDAV_Active != ((buf1[1]<<16) | buf1[0]) ){
01030       //                                fERROR[0]  = true;
01031       //                                fERROR[21] = true;
01032       //                                bERROR|=0x200000;
01033       //                                //cerr<<"  ERROR 21   "<<sERROR[21]<<endl;
01034       //                        }
01035       //                        headerDAV_Active = -1;
01037       checkDAVs();
01038 
01039       checkTriggerHeadersAndTrailers();
01040 
01042 
01043       if( DDU_WordsSinceLastHeader>3 && !nDMBs ){
01044         fERROR[28]=true;
01045         bERROR|=0x10000000;;
01046       }
01047 
01048       if(fDDU_Trailer){
01049         fERROR[2] = true;
01050         bERROR   |= 0x4;
01051       } // DDU Header is missing
01052       fDDU_Trailer=true;
01053       fDDU_Header=false;
01054 
01055       if( fDMB_Header || fDMB_Trailer ){
01056         fERROR[5] = true;
01057         bERROR   |= 0x20;
01058         fCHAMB_ERR[5].insert(currentChamber);
01059         bCHAMB_ERR[currentChamber] |= 0x20;
01060         fCHAMB_ERR[0].insert(currentChamber);
01061         bCHAMB_ERR[currentChamber] |= 0x20;
01062       } // DMB Trailer is missing
01063       fDMB_Header  = false;
01064       fDMB_Trailer = false;
01065 
01066       currentChamber=-1;
01067 
01068       for(int err=0; err<nERRORS; ++err)
01069         if( fCHAMB_ERR[err].find(-1) != fCHAMB_ERR[err].end() ){
01070           fCHAMB_ERR[err].erase(-1);
01071           fCHAMB_ERR[err].insert(-2);
01072         }
01073       bCHAMB_STATUS[-2] |= bCHAMB_STATUS[-1];
01074       bCHAMB_STATUS[-1] = 0;
01075       bCHAMB_ERR[-2] |= bCHAMB_ERR[-1];
01076       bCHAMB_ERR[-1] = 0;
01077       bCHAMB_WRN[-2] |= bCHAMB_WRN[-1];
01078       bCHAMB_WRN[-1] = 0;
01079 
01080       for(int err=1; err<nERRORS; ++err)
01081         if( fCHAMB_ERR[err].find(-2) != fCHAMB_ERR[err].end() ){
01082           fCHAMB_ERR[0].insert(-2);
01083           bCHAMB_ERR[-2] |= 0x1;
01084         }
01085 
01086       dduSize[sourceID] = buf0-dduBuffers[sourceID];
01087 
01088       ++cntDDU_Trailers; // Increment DDUTrailer counter
01089 
01090       // == Combining 2 words into 24bit value
01091       DDU_WordCount = buf2[2] | ((buf2[3] & 0xFF) <<16) ;
01092 
01093       if( (DDU_WordsSinceLastHeader+4) != DDU_WordCount ){
01094         fERROR[4] = true;
01095         bERROR   |= 0x10;
01096       }
01097 
01098       if( DMB_Active!=nDMBs ){
01099         fERROR[24] = true;
01100         bERROR    |= 0x1000000;
01101       }
01102 
01103       cout<<"DDU Trailer Occurrence "<<cntDDU_Trailers<<endl;
01104       cout<<"----------------------------------------------------------"<<endl;
01105       cout<<"DDU 64-bit words = Actual - DDUcounted ="<<DDU_WordsSinceLastHeader+4<<"-"<<DDU_WordCount<<endl;
01106 
01107       // increment statistics Errors and Warnings (i=0 case is handled in DDU Header)
01108       for(int err=1; err<nERRORS; ++err){
01109         if( fERROR[err] ){
01110           fERROR[0] = true;
01111           bERROR |= 0x1;
01112           cerr<<"\nDDU Header Occurrence = "<<cntDDU_Headers;
01113           cerr<<"  ERROR "<<err<<"  " <<sERROR[err]<<endl;
01114         }
01115       }
01116       for(int wrn=1; wrn<nWARNINGS; ++wrn){
01117         if( fWARNING[wrn] ){
01118           cout<<"\nDDU Header Occurrence = "<<cntDDU_Headers;
01119           cout<<"  WARNING "<<wrn<<"  "<<sWARNING[wrn]<<endl;
01120         }
01121       }
01122 
01123       bDDU_ERR[sourceID] |= bERROR;
01124       bDDU_WRN[sourceID] |= bWARNING;
01125 
01126       DDU_WordsSinceLastHeader=0;
01127       DDU_WordsSinceLastTrailer=0;
01128       if (modeDDUonly) {
01129         buffer+=4;
01130         buf_1 = &(tmpbuf[0]);  // Just for safety
01131         buf0  = &(tmpbuf[4]);  // Just for safety
01132         buf1  = &(tmpbuf[8]);  // Just for safety
01133         buf2  = &(tmpbuf[12]); // Just for safety
01134         bzero(tmpbuf, sizeof(short)*16);
01135         return length-4;
01136       }
01137     }
01138 
01139     if (!modeDDUonly) {
01140       // DCC Trailer 1 && DCC Trailer 2
01141       // =VB= Added support for Sep. 2008 CMS DAQ DCC format
01142       // =VB= 04.18.09 Removed (buf2[0]&0x0003) == 0x3 check for old DCC format to satisfy older format of simulated data
01143       if( (buf1[3]&0xFF00) == 0xEF00 &&
01144           ( ( (buf2[3]&0xFF00) == 0xAF00 )
01145           || 
01146             ( (buf2[3]&0xFF00) == 0xA000 && (buf2[0]&0x0003) == 0x0) ) ) {      
01147         if(fDCC_Trailer){
01148           fERROR[26] = true;
01149           bERROR|=0x4000000;
01150         } // DCC Header is missing
01151         fDCC_Trailer=true;
01152         fDCC_Header=false;
01153 
01154         if( fDDU_Header ){
01155           // == DDU Trailer is missing
01156           fERROR[1]=true;
01157           bERROR|=0x2;
01158           fERROR[0] = true;
01159           bERROR|=0x1;
01160         }
01161 
01162         buffer+=4;
01163         buf_1 = &(tmpbuf[0]);  // Just for safety
01164         buf0  = &(tmpbuf[4]);  // Just for safety
01165         buf1  = &(tmpbuf[8]);  // Just for safety
01166         buf2  = &(tmpbuf[12]); // Just for safety
01167         bzero(tmpbuf, sizeof(short)*16);
01168         return length-4;
01169       }
01170     }
01171 
01172     length-=4;
01173     buffer+=4;
01174   }
01175   //Store the tail of the buffer
01176   buf_1 = &(tmpbuf[0]);
01177   buf0  = &(tmpbuf[4]);
01178   buf1  = &(tmpbuf[8]);
01179   buf2  = &(tmpbuf[12]);
01180   memcpy((void*)tmpbuf,(void*)(buffer-16),sizeof(short)*16);
01181 
01182   
01183   if (!modeDDUonly && !fDCC_Trailer && !fDCC_Header) {
01184         fERROR[26] = true;
01185         bERROR|=0x4000000;
01186         fERROR[25] = true;
01187         bERROR|=0x2000000;
01188         fERROR[0]=true;
01189         bERROR|=0x1;
01190         return length;
01191   }
01192 
01193   return -1;
01194 }

void CSCDCCExaminer::checkDAVs (  )  [private]

checks DAV_ALCT, DAV_TMB, and DAV_CFEB

Definition at line 1234 of file CSCDCCExaminer.cc.

References bCHAMB_ERR, bERROR, currentChamber, DAV_ALCT, DAV_CFEB, DAV_TMB, fCHAMB_ERR, and fERROR.

Referenced by check().

01235 {
01236   if( DAV_ALCT ){
01237     fERROR[21] = true;
01238     bERROR   |= 0x200000;
01239     fCHAMB_ERR[21].insert(currentChamber);
01240     bCHAMB_ERR[currentChamber] |= 0x200000;
01241     DAV_ALCT = false;
01242   }
01243   if( DAV_TMB  ){
01244     fERROR[22] = true;
01245     bERROR   |= 0x400000;
01246     fCHAMB_ERR[22].insert(currentChamber);
01247     bCHAMB_ERR[currentChamber] |= 0x400000;
01248     DAV_TMB = false;
01249   }
01250   if( DAV_CFEB && DAV_CFEB!=-16){
01251     fERROR[23] = true;
01252     bERROR   |= 0x800000;
01253     fCHAMB_ERR[23].insert(currentChamber);
01254     bCHAMB_ERR[currentChamber] |= 0x800000;
01255     DAV_CFEB = 0;
01256   }
01257 }

void CSCDCCExaminer::checkTriggerHeadersAndTrailers (  )  [private]

Definition at line 1260 of file CSCDCCExaminer.cc.

References ALCT_WordCount, ALCT_WordsExpected, ALCT_WordsSinceLastHeader, bCHAMB_ERR, bERROR, CFEB_SampleCount, currentChamber, fALCT_Header, fCHAMB_ERR, fERROR, fTMB_Header, TMB_WordCount, TMB_WordsExpected, and TMB_WordsSinceLastHeader.

Referenced by check().

01261 {
01262   if( !fALCT_Header && ( ALCT_WordsSinceLastHeader!=ALCT_WordCount || ALCT_WordsSinceLastHeader!=ALCT_WordsExpected ) ){
01263     fERROR[9] = true;
01264     bERROR   |= 0x200;
01265     fCHAMB_ERR[9].insert(currentChamber);
01266     bCHAMB_ERR[currentChamber] |= 0x200;
01267     ALCT_WordsSinceLastHeader = 0;
01268     ALCT_WordCount            = 0;
01269     ALCT_WordsSinceLastHeader = 0;
01270     ALCT_WordsExpected        = 0;
01271   } // ALCT Word Count Error
01272 
01273   if( !fTMB_Header && ( TMB_WordsSinceLastHeader!=TMB_WordCount || TMB_WordsSinceLastHeader!=TMB_WordsExpected ) ){
01274     fERROR[14] = true;
01275     bERROR    |= 0x4000;
01276     fCHAMB_ERR[14].insert(currentChamber);
01277     bCHAMB_ERR[currentChamber] |= 0x4000;
01278     TMB_WordsSinceLastHeader = 0;
01279     TMB_WordCount            = 0;
01280     TMB_WordsSinceLastHeader = 0;
01281     TMB_WordsExpected        = 0;
01282   } // TMB Word Count Error
01283 
01284   if( (CFEB_SampleCount%8)!=0 ){
01285     fERROR[17] = true;
01286     bERROR    |= 0x20000;
01287     fCHAMB_ERR[17].insert(currentChamber);
01288     bCHAMB_ERR[currentChamber] |= 0x20000;
01289     CFEB_SampleCount = 0;
01290   } // Number of CFEB samples != 8*n
01291 
01292   if(fALCT_Header) {
01293     fERROR[7] = true;  // ALCT Trailer is missing
01294     bERROR   |= 0x80;
01295     fCHAMB_ERR[7].insert(currentChamber);
01296     bCHAMB_ERR[currentChamber] |= 0x80;
01297     ALCT_WordsSinceLastHeader = 0;
01298     ALCT_WordsExpected        = 0;
01299     fALCT_Header = 0;
01300   }
01301 
01302   if(fTMB_Header) {
01303     fERROR[12]=true;        // TMB Trailer is missing
01304     bERROR   |= 0x1000;
01305     fCHAMB_ERR[12].insert(currentChamber);
01306     bCHAMB_ERR[currentChamber] |= 0x1000;
01307     TMB_WordsSinceLastHeader = 0;
01308     TMB_WordsExpected        = 0;
01309     fTMB_Header = false;
01310   }
01311 }

void CSCDCCExaminer::clear ( void   )  [private]

Definition at line 1197 of file CSCDCCExaminer.cc.

References bCHAMB_ERR, bCHAMB_PAYLOAD, bCHAMB_STATUS, bCHAMB_WRN, bDDU_ERR, bDDU_WRN, bERROR, bWARNING, dduBuffers, dduOffsets, dduSize, dmbBuffers, dmbOffsets, dmbSize, err, fCHAMB_ERR, fCHAMB_WRN, fERROR, fWARNING, nERRORS, and nWARNINGS.

Referenced by check(), and CSCDCCExaminer().

01198 {
01199   bzero(fERROR,   sizeof(bool)*nERRORS);
01200   bzero(fWARNING, sizeof(bool)*nWARNINGS);
01201   bERROR = 0; bWARNING = 0;
01202   for(int err=0; err<nERRORS;   ++err) fCHAMB_ERR[err].clear();
01203   for(int wrn=0; wrn<nWARNINGS; ++wrn) fCHAMB_WRN[wrn].clear();
01204   bCHAMB_ERR.clear();
01205   bCHAMB_WRN.clear();
01206   bCHAMB_PAYLOAD.clear();
01207   bCHAMB_STATUS.clear();
01208   bDDU_ERR.clear();
01209   bDDU_WRN.clear();
01210   dduBuffers.clear();
01211   dduOffsets.clear();
01212   dmbBuffers.clear();
01213   dmbOffsets.clear();
01214   dduSize.clear();
01215   dmbSize.clear();
01216 }

void CSCDCCExaminer::crcALCT ( bool  enable  ) 

Definition at line 6 of file CSCDCCExaminer.cc.

References checkCrcALCT, and sERROR.

Referenced by cscdqm::EventProcessor::init(), CSCHLTMonitorModule::monitorEvent(), CSCMonitorModule::monitorEvent(), and CSCDCCUnpacker::produce().

00006                                        {
00007   checkCrcALCT = enable;
00008   if( checkCrcALCT )
00009     sERROR[10] = "ALCT CRC Error                                   ";
00010   else
00011     sERROR[10] = "ALCT CRC Error ( disabled )                      ";
00012 }

void CSCDCCExaminer::crcCFEB ( bool  enable  ) 

Definition at line 22 of file CSCDCCExaminer.cc.

References checkCrcCFEB, and sERROR.

Referenced by cscdqm::EventProcessor::init(), CSCHLTMonitorModule::monitorEvent(), CSCMonitorModule::monitorEvent(), and CSCDCCUnpacker::produce().

00022                                        {
00023   checkCrcCFEB = enable;
00024   if( checkCrcCFEB )
00025     sERROR[18] = "CFEB CRC Error                                   ";
00026   else
00027     sERROR[18] = "CFEB CRC Error ( disabled )                      ";
00028 }

void CSCDCCExaminer::crcTMB ( bool  enable  ) 

Definition at line 14 of file CSCDCCExaminer.cc.

References checkCrcTMB, and sERROR.

Referenced by cscdqm::EventProcessor::init(), CSCHLTMonitorModule::monitorEvent(), CSCMonitorModule::monitorEvent(), and CSCDCCUnpacker::produce().

00014                                       {
00015   checkCrcTMB = enable;
00016   if( checkCrcTMB )
00017     sERROR[15] = "TMB CRC Error                                    ";
00018   else
00019     sERROR[15] = "TMB CRC Error ( disabled )                       ";
00020 }

std::map<short,const unsigned short*> CSCDCCExaminer::DDU_block ( void   )  const [inline]

Definition at line 210 of file CSCDCCExaminer.h.

References dduBuffers.

Referenced by CSCDDUEventData::unpack_data().

00210 { return dduBuffers; }

std::map<short,unsigned long> CSCDCCExaminer::DDU_ptrOffsets ( void   )  const [inline]

Definition at line 213 of file CSCDCCExaminer.h.

References dduOffsets.

00213 { return dduOffsets; }

std::map<short,unsigned long> CSCDCCExaminer::DDU_size ( void   )  const [inline]

Definition at line 216 of file CSCDCCExaminer.h.

References dduSize.

Referenced by CSCDDUEventData::unpack_data().

00216 { return dduSize; }

short CSCDCCExaminer::dduSourceID ( void   )  [inline]

Definition at line 208 of file CSCDCCExaminer.h.

References sourceID.

Referenced by cscdqm::EventProcessor::processExaminer().

00208 { return sourceID; }

std::map<short,std::map<short,const unsigned short*> > CSCDCCExaminer::DMB_block ( void   )  const [inline]

Definition at line 211 of file CSCDCCExaminer.h.

References dmbBuffers.

Referenced by CSCDDUEventData::unpack_data().

00211 { return dmbBuffers; }

std::map<short,std::map<short,unsigned long> > CSCDCCExaminer::DMB_ptrOffsets ( void   )  const [inline]

Definition at line 214 of file CSCDCCExaminer.h.

References dmbOffsets.

00214 { return dmbOffsets; }

std::map<short,std::map<short,unsigned long> > CSCDCCExaminer::DMB_size ( void   )  const [inline]

Definition at line 217 of file CSCDCCExaminer.h.

References dmbSize.

00217 { return dmbSize; }

const char* CSCDCCExaminer::errName ( int  num  )  const [inline]

Definition at line 147 of file CSCDCCExaminer.h.

References nERRORS, and sERROR.

Referenced by CSCDCCUnpacker::produce().

00147 { if(num>=0&&num<nERRORS)   return sERROR[num];   else return ""; }

bool CSCDCCExaminer::error ( int  num  )  const [inline]

Definition at line 156 of file CSCDCCExaminer.h.

References fERROR, and nERRORS.

00156 { if(num>=0&&num<nERRORS)   return fERROR  [num]; else return 0; }

const char* CSCDCCExaminer::errorName ( int  num  )  const [inline]

Definition at line 150 of file CSCDCCExaminer.h.

References nERRORS, and sERROR_.

00150 { if(num>=0&&num<nERRORS)   return sERROR_[num];   else return ""; }

long CSCDCCExaminer::errors ( void   )  const [inline]

Definition at line 144 of file CSCDCCExaminer.h.

References bERROR.

Referenced by CSCHLTMonitorModule::monitorEvent(), CSCMonitorModule::monitorExaminer(), cscdqm::EventProcessor::processExaminer(), and CSCDCCUnpacker::produce().

00144 { return bERROR;   }

std::map<int,long> CSCDCCExaminer::errorsDetailed ( void   )  const [inline]

Definition at line 197 of file CSCDCCExaminer.h.

References bCHAMB_ERR.

Referenced by CSCMonitorModule::monitorExaminer(), and cscdqm::EventProcessor::processExaminer().

00197 { return bCHAMB_ERR; }

long CSCDCCExaminer::errorsForChamber ( int  chamber  )  const [inline]

Definition at line 172 of file CSCDCCExaminer.h.

References bCHAMB_ERR.

Referenced by cscdqm::EventProcessor::processCSC(), and CSCDDUEventData::unpack_data().

00172                                                  {
00173                 std::map<int,long>::const_iterator item = bCHAMB_ERR.find(chamber);
00174                 if( item != bCHAMB_ERR.end() ) return item->second; else return 0;
00175         }

long CSCDCCExaminer::errorsForDDU ( int  dduSourceID  )  const [inline]

Definition at line 182 of file CSCDCCExaminer.h.

References bDDU_ERR.

Referenced by CSCMonitorModule::monitorExaminer(), and cscdqm::EventProcessor::processExaminer().

00182                                                  {
00183                 std::map<int,long>::const_iterator item = bDDU_ERR.find(dduSourceID);
00184                 if( item != bDDU_ERR.end() ) return item->second; else return 0;
00185         }

unsigned long CSCDCCExaminer::getMask (  )  const [inline]

Definition at line 142 of file CSCDCCExaminer.h.

References examinerMask.

Referenced by CSCDDUEventData::unpack_data().

00142 {return examinerMask;}

std::vector<int> CSCDCCExaminer::listOfDDUs ( void   )  const [inline]

Definition at line 190 of file CSCDCCExaminer.h.

References bDDU_ERR.

Referenced by CSCMonitorModule::monitorExaminer(), and cscdqm::EventProcessor::processExaminer().

00190                                               {
00191                 std::vector<int> DDUs;
00192                 std::map<int,long>::const_iterator item = bDDU_ERR.begin();
00193                 while( item != bDDU_ERR.end() ){ DDUs.push_back(item->first); item++; }
00194                 return DDUs;
00195         }

void CSCDCCExaminer::modeDDU ( bool  enable  ) 

Definition at line 30 of file CSCDCCExaminer.cc.

References modeDDUonly, and sERROR.

Referenced by cscdqm::EventProcessor::init().

00030                                        {
00031   modeDDUonly = enable;
00032   if( modeDDUonly) {
00033     sERROR[25] = "DCC Trailer Missing                              ";
00034     sERROR[26] = "DCC Header Missing                               ";
00035   } else {
00036     sERROR[25] = "DCC Trailer Missing (disabled)                   ";
00037     sERROR[26] = "DCC Header Missing (disabled)                    ";
00038   }
00039 
00040 }

OStream& CSCDCCExaminer::output1 ( void   )  [inline]

Definition at line 136 of file CSCDCCExaminer.h.

References cout.

Referenced by cscdqm::EventProcessor::init(), CSCHLTMonitorModule::monitorEvent(), CSCMonitorModule::monitorEvent(), and CSCDCCUnpacker::produce().

00136 { return cout; }

OStream& CSCDCCExaminer::output2 ( void   )  [inline]

Definition at line 137 of file CSCDCCExaminer.h.

References cerr.

Referenced by cscdqm::EventProcessor::init(), CSCHLTMonitorModule::monitorEvent(), CSCMonitorModule::monitorEvent(), and CSCDCCUnpacker::produce().

00137 { return cerr; }

std::map<int,long> CSCDCCExaminer::payloadDetailed ( void   )  const [inline]

Definition at line 199 of file CSCDCCExaminer.h.

References bCHAMB_PAYLOAD.

Referenced by CSCMonitorModule::monitorExaminer(), and cscdqm::EventProcessor::processExaminer().

00199 { return bCHAMB_PAYLOAD; }

long CSCDCCExaminer::payloadForChamber ( int  chamber  )  const [inline]

Definition at line 162 of file CSCDCCExaminer.h.

References bCHAMB_PAYLOAD.

00162                                                   {
00163                 std::map<int,long>::const_iterator item = bCHAMB_PAYLOAD.find(chamber);
00164                 if( item != bCHAMB_PAYLOAD.end() ) return item->second; else return 0;
00165         }

const char* CSCDCCExaminer::payloadName ( int  num  )  const [inline]

Definition at line 153 of file CSCDCCExaminer.h.

References nPAYLOADS, and sDMBExpectedPayload.

00153 { if(num>=0&&num<nPAYLOADS) return sDMBExpectedPayload[num]; else return ""; }

void CSCDCCExaminer::setMask ( unsigned long  mask  )  [inline]

Definition at line 141 of file CSCDCCExaminer.h.

References examinerMask.

Referenced by cscdqm::EventProcessor::processExaminer(), and CSCDCCUnpacker::produce().

00141 {examinerMask=mask;}

std::map<int,long> CSCDCCExaminer::statusDetailed ( void   )  const [inline]

Definition at line 200 of file CSCDCCExaminer.h.

References bCHAMB_STATUS.

Referenced by CSCMonitorModule::monitorExaminer(), and cscdqm::EventProcessor::processExaminer().

00200 { return bCHAMB_STATUS; }

long CSCDCCExaminer::statusForChamber ( int  chamber  )  const [inline]

Definition at line 167 of file CSCDCCExaminer.h.

References bCHAMB_STATUS.

00167                                                  {
00168                 std::map<int,long>::const_iterator item = bCHAMB_STATUS.find(chamber);
00169                 if( item != bCHAMB_STATUS.end() ) return item->second; else return 0;
00170         }

const char* CSCDCCExaminer::statusName ( int  num  )  const [inline]

Definition at line 154 of file CSCDCCExaminer.h.

References nSTATUSES, and sDMBEventStaus.

00154 { if(num>=0&&num<nSTATUSES) return sDMBEventStaus     [num]; else return ""; }

bool CSCDCCExaminer::warning ( int  num  )  const [inline]

Definition at line 157 of file CSCDCCExaminer.h.

References fWARNING, and nWARNINGS.

00157 { if(num>=0&&num<nWARNINGS) return fWARNING[num]; else return 0; }

const char* CSCDCCExaminer::warningName ( int  num  )  const [inline]

Definition at line 151 of file CSCDCCExaminer.h.

References nWARNINGS, and sWARNING_.

00151 { if(num>=0&&num<nWARNINGS) return sWARNING_[num]; else return ""; }

long CSCDCCExaminer::warnings ( void   )  const [inline]

Definition at line 145 of file CSCDCCExaminer.h.

References bWARNING.

Referenced by CSCHLTMonitorModule::monitorEvent(), CSCMonitorModule::monitorExaminer(), and cscdqm::EventProcessor::processExaminer().

00145 { return bWARNING; }

std::map<int,long> CSCDCCExaminer::warningsDetailed ( void   )  const [inline]

Definition at line 198 of file CSCDCCExaminer.h.

References bCHAMB_WRN.

00198 { return bCHAMB_WRN; }

long CSCDCCExaminer::warningsForChamber ( int  chamber  )  const [inline]

Definition at line 177 of file CSCDCCExaminer.h.

References bCHAMB_WRN.

00177                                                    {
00178                 std::map<int,long>::const_iterator item = bCHAMB_WRN.find(chamber);
00179                 if( item != bCHAMB_WRN.end() ) return item->second; else return 0;
00180         }

long CSCDCCExaminer::warningsForDDU ( int  dduSourceID  )  const [inline]

Definition at line 186 of file CSCDCCExaminer.h.

References bDDU_WRN.

00186                                                    {
00187                 std::map<int,long>::const_iterator item = bDDU_WRN.find(dduSourceID);
00188                 if( item != bDDU_WRN.end() ) return item->second; else return 0;
00189         }

const char* CSCDCCExaminer::wrnName ( int  num  )  const [inline]

Definition at line 148 of file CSCDCCExaminer.h.

References nWARNINGS, and sWARNING.

00148 { if(num>=0&&num<nWARNINGS) return sWARNING[num]; else return ""; }

void CSCDCCExaminer::zeroCounts (  )  [private]

Definition at line 1219 of file CSCDCCExaminer.cc.

References ALCT_WordCount, ALCT_WordsExpected, ALCT_WordsSinceLastHeader, CFEB_BSampleCount, CFEB_SampleCount, CFEB_SampleWordCount, TMB_Tbins, TMB_WordCount, TMB_WordsExpected, and TMB_WordsSinceLastHeader.

Referenced by check(), and CSCDCCExaminer().

01220 {
01221   ALCT_WordsSinceLastHeader = 0;
01222   ALCT_WordCount            = 0;
01223   ALCT_WordsExpected        = 0;
01224   TMB_WordsSinceLastHeader  = 0;
01225   TMB_WordCount             = 0;
01226   TMB_WordsExpected         = 0;
01227   TMB_Tbins                 = 0;
01228   CFEB_SampleWordCount      = 0;
01229   CFEB_SampleCount          = 0;
01230   CFEB_BSampleCount         = 0;
01231 }


Member Data Documentation

unsigned long CSCDCCExaminer::ALCT_CRC [private]

Definition at line 114 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

long CSCDCCExaminer::ALCT_WordCount [private]

Definition at line 99 of file CSCDCCExaminer.h.

Referenced by check(), checkTriggerHeadersAndTrailers(), and zeroCounts().

long CSCDCCExaminer::ALCT_WordsExpected [private]

Definition at line 100 of file CSCDCCExaminer.h.

Referenced by check(), checkTriggerHeadersAndTrailers(), and zeroCounts().

long CSCDCCExaminer::ALCT_WordsSinceLastHeader [private]

Definition at line 98 of file CSCDCCExaminer.h.

Referenced by check(), checkTriggerHeadersAndTrailers(), and zeroCounts().

std::map<int,long> CSCDCCExaminer::bCHAMB_ERR [private]

Definition at line 21 of file CSCDCCExaminer.h.

Referenced by check(), checkDAVs(), checkTriggerHeadersAndTrailers(), clear(), errorsDetailed(), and errorsForChamber().

std::map<int,long> CSCDCCExaminer::bCHAMB_PAYLOAD [private]

Definition at line 23 of file CSCDCCExaminer.h.

Referenced by check(), clear(), payloadDetailed(), and payloadForChamber().

std::map<int,long> CSCDCCExaminer::bCHAMB_STATUS [private]

Definition at line 24 of file CSCDCCExaminer.h.

Referenced by check(), clear(), statusDetailed(), and statusForChamber().

std::map<int,long> CSCDCCExaminer::bCHAMB_WRN [private]

Definition at line 22 of file CSCDCCExaminer.h.

Referenced by check(), clear(), warningsDetailed(), and warningsForChamber().

std::map<int,long> CSCDCCExaminer::bDDU_ERR [private]

Definition at line 25 of file CSCDCCExaminer.h.

Referenced by check(), clear(), errorsForDDU(), and listOfDDUs().

std::map<int,long> CSCDCCExaminer::bDDU_WRN [private]

Definition at line 26 of file CSCDCCExaminer.h.

Referenced by check(), clear(), and warningsForDDU().

long CSCDCCExaminer::bERROR [private]

Definition at line 15 of file CSCDCCExaminer.h.

Referenced by check(), checkDAVs(), checkTriggerHeadersAndTrailers(), clear(), and errors().

const unsigned short * CSCDCCExaminer::buf0 [private]

Definition at line 59 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

const unsigned short * CSCDCCExaminer::buf1 [private]

Definition at line 59 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

const unsigned short * CSCDCCExaminer::buf2 [private]

Definition at line 59 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

const unsigned short * CSCDCCExaminer::buf_1 [private]

Definition at line 59 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

const unsigned short* CSCDCCExaminer::buf_2 [private]

Definition at line 59 of file CSCDCCExaminer.h.

Referenced by check().

const unsigned short* CSCDCCExaminer::buffer_start [private]

Definition at line 133 of file CSCDCCExaminer.h.

Referenced by check().

long CSCDCCExaminer::bWARNING [private]

Definition at line 15 of file CSCDCCExaminer.h.

Referenced by check(), clear(), and warnings().

OStream CSCDCCExaminer::cerr [private]

Definition at line 55 of file CSCDCCExaminer.h.

Referenced by check(), CSCDCCExaminer(), and output2().

long CSCDCCExaminer::CFEB_BSampleCount [private]

Definition at line 111 of file CSCDCCExaminer.h.

Referenced by check(), and zeroCounts().

unsigned long CSCDCCExaminer::CFEB_CRC [private]

Definition at line 118 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

long CSCDCCExaminer::CFEB_SampleCount [private]

Definition at line 110 of file CSCDCCExaminer.h.

Referenced by check(), checkTriggerHeadersAndTrailers(), and zeroCounts().

long CSCDCCExaminer::CFEB_SampleWordCount [private]

Definition at line 109 of file CSCDCCExaminer.h.

Referenced by check(), and zeroCounts().

bool CSCDCCExaminer::checkCrcALCT [private]

Definition at line 113 of file CSCDCCExaminer.h.

Referenced by check(), crcALCT(), and CSCDCCExaminer().

bool CSCDCCExaminer::checkCrcCFEB [private]

Definition at line 117 of file CSCDCCExaminer.h.

Referenced by check(), crcCFEB(), and CSCDCCExaminer().

bool CSCDCCExaminer::checkCrcTMB [private]

Definition at line 115 of file CSCDCCExaminer.h.

Referenced by check(), crcTMB(), and CSCDCCExaminer().

std::map<int,long> CSCDCCExaminer::cntCHAMB_Headers

Definition at line 84 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

std::map<int,long> CSCDCCExaminer::cntCHAMB_Trailers

Definition at line 85 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

long CSCDCCExaminer::cntDDU_Headers

Definition at line 82 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

long CSCDCCExaminer::cntDDU_Trailers

Definition at line 83 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

OStream CSCDCCExaminer::cout [private]

Definition at line 55 of file CSCDCCExaminer.h.

Referenced by check(), CSCDCCExaminer(), and output1().

int CSCDCCExaminer::currentChamber [private]

Definition at line 57 of file CSCDCCExaminer.h.

Referenced by check(), checkDAVs(), checkTriggerHeadersAndTrailers(), and CSCDCCExaminer().

bool CSCDCCExaminer::DAV_ALCT [private]

Definition at line 75 of file CSCDCCExaminer.h.

Referenced by check(), checkDAVs(), and CSCDCCExaminer().

int CSCDCCExaminer::DAV_CFEB [private]

Definition at line 77 of file CSCDCCExaminer.h.

Referenced by check(), checkDAVs(), and CSCDCCExaminer().

int CSCDCCExaminer::DAV_DMB [private]

Definition at line 78 of file CSCDCCExaminer.h.

Referenced by check().

bool CSCDCCExaminer::DAV_TMB [private]

Definition at line 76 of file CSCDCCExaminer.h.

Referenced by check(), checkDAVs(), and CSCDCCExaminer().

long CSCDCCExaminer::DDU_WordCount [private]

Definition at line 94 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

long CSCDCCExaminer::DDU_WordMismatch_Occurrences [private]

Definition at line 95 of file CSCDCCExaminer.h.

Referenced by CSCDCCExaminer().

long CSCDCCExaminer::DDU_WordsSinceLastHeader [private]

Definition at line 93 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

long CSCDCCExaminer::DDU_WordsSinceLastTrailer [private]

Definition at line 96 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

std::map<short,const unsigned short*> CSCDCCExaminer::dduBuffers [private]

Definition at line 127 of file CSCDCCExaminer.h.

Referenced by check(), clear(), and DDU_block().

std::map<short,unsigned long> CSCDCCExaminer::dduOffsets [private]

Definition at line 129 of file CSCDCCExaminer.h.

Referenced by check(), clear(), and DDU_ptrOffsets().

std::map<short,unsigned long> CSCDCCExaminer::dduSize [private]

Definition at line 131 of file CSCDCCExaminer.h.

Referenced by check(), clear(), and DDU_size().

int CSCDCCExaminer::DMB_Active [private]

Definition at line 79 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

std::map<short,std::map<short,const unsigned short*> > CSCDCCExaminer::dmbBuffers [private]

Definition at line 128 of file CSCDCCExaminer.h.

Referenced by check(), clear(), and DMB_block().

std::map<short,std::map<short,unsigned long> > CSCDCCExaminer::dmbOffsets [private]

Definition at line 130 of file CSCDCCExaminer.h.

Referenced by check(), clear(), and DMB_ptrOffsets().

std::map<short,std::map<short,unsigned long> > CSCDCCExaminer::dmbSize [private]

Definition at line 132 of file CSCDCCExaminer.h.

Referenced by check(), clear(), and DMB_size().

unsigned long CSCDCCExaminer::examinerMask [private]

Definition at line 122 of file CSCDCCExaminer.h.

Referenced by getMask(), and setMask().

bool CSCDCCExaminer::fALCT_Format2007 [private]

Definition at line 71 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

bool CSCDCCExaminer::fALCT_Header [private]

Definition at line 68 of file CSCDCCExaminer.h.

Referenced by check(), checkTriggerHeadersAndTrailers(), and CSCDCCExaminer().

std::set<int> CSCDCCExaminer::fCHAMB_ERR[29] [private]

Definition at line 19 of file CSCDCCExaminer.h.

Referenced by chambersWithError(), check(), checkDAVs(), checkTriggerHeadersAndTrailers(), and clear().

std::set<int> CSCDCCExaminer::fCHAMB_WRN[5] [private]

Definition at line 20 of file CSCDCCExaminer.h.

Referenced by chambersWithWarning(), and clear().

bool CSCDCCExaminer::fDCC_Header [private]

Definition at line 62 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

bool CSCDCCExaminer::fDCC_Trailer [private]

Definition at line 63 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

bool CSCDCCExaminer::fDDU_Header [private]

Definition at line 64 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

bool CSCDCCExaminer::fDDU_Trailer [private]

Definition at line 65 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

bool CSCDCCExaminer::fDMB_Header [private]

Definition at line 66 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

bool CSCDCCExaminer::fDMB_Trailer [private]

Definition at line 67 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

bool CSCDCCExaminer::fERROR[29] [private]

Definition at line 16 of file CSCDCCExaminer.h.

Referenced by check(), checkDAVs(), checkTriggerHeadersAndTrailers(), clear(), and error().

bool CSCDCCExaminer::fTMB_Format2007 [private]

Definition at line 70 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

bool CSCDCCExaminer::fTMB_Header [private]

Definition at line 69 of file CSCDCCExaminer.h.

Referenced by check(), checkTriggerHeadersAndTrailers(), and CSCDCCExaminer().

bool CSCDCCExaminer::fWARNING[5] [private]

Definition at line 17 of file CSCDCCExaminer.h.

Referenced by check(), clear(), and warning().

bool CSCDCCExaminer::modeDDUonly [private]

Definition at line 120 of file CSCDCCExaminer.h.

Referenced by check(), CSCDCCExaminer(), and modeDDU().

int CSCDCCExaminer::nDMBs [private]

Definition at line 79 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

const unsigned short CSCDCCExaminer::nERRORS

Definition at line 11 of file CSCDCCExaminer.h.

Referenced by chambersWithError(), check(), clear(), errName(), error(), errorName(), CSCMonitorModule::monitorExaminer(), cscdqm::EventProcessor::processExaminer(), and CSCDCCUnpacker::produce().

const unsigned short CSCDCCExaminer::nPAYLOADS

Definition at line 11 of file CSCDCCExaminer.h.

Referenced by payloadName().

const unsigned short CSCDCCExaminer::nSTATUSES

Definition at line 11 of file CSCDCCExaminer.h.

Referenced by cscdqm::EventProcessor::processExaminer(), and statusName().

const unsigned short CSCDCCExaminer::nWARNINGS

Definition at line 11 of file CSCDCCExaminer.h.

Referenced by chambersWithWarning(), check(), clear(), warning(), warningName(), and wrnName().

std::vector<char*> CSCDCCExaminer::sDMBEventStaus [private]

Definition at line 14 of file CSCDCCExaminer.h.

Referenced by CSCDCCExaminer(), and statusName().

std::vector<char*> CSCDCCExaminer::sDMBExpectedPayload [private]

Definition at line 14 of file CSCDCCExaminer.h.

Referenced by CSCDCCExaminer(), and payloadName().

std::vector<char*> CSCDCCExaminer::sERROR [private]

Definition at line 14 of file CSCDCCExaminer.h.

Referenced by check(), crcALCT(), crcCFEB(), crcTMB(), CSCDCCExaminer(), errName(), and modeDDU().

std::vector<char*> CSCDCCExaminer::sERROR_ [private]

Definition at line 14 of file CSCDCCExaminer.h.

Referenced by CSCDCCExaminer(), and errorName().

short CSCDCCExaminer::sourceID [private]

Definition at line 121 of file CSCDCCExaminer.h.

Referenced by check(), CSCDCCExaminer(), and dduSourceID().

std::vector<char*> CSCDCCExaminer::sWARNING [private]

Definition at line 14 of file CSCDCCExaminer.h.

Referenced by check(), CSCDCCExaminer(), and wrnName().

std::vector<char*> CSCDCCExaminer::sWARNING_ [private]

Definition at line 14 of file CSCDCCExaminer.h.

Referenced by CSCDCCExaminer(), and warningName().

unsigned long CSCDCCExaminer::TMB_CRC [private]

Definition at line 116 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

unsigned CSCDCCExaminer::TMB_Firmware_Revision [private]

Definition at line 107 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

long CSCDCCExaminer::TMB_Tbins [private]

Definition at line 105 of file CSCDCCExaminer.h.

Referenced by check(), and zeroCounts().

long CSCDCCExaminer::TMB_WordCount [private]

Definition at line 103 of file CSCDCCExaminer.h.

Referenced by check(), checkTriggerHeadersAndTrailers(), and zeroCounts().

long CSCDCCExaminer::TMB_WordsExpected [private]

Definition at line 104 of file CSCDCCExaminer.h.

Referenced by check(), checkTriggerHeadersAndTrailers(), and zeroCounts().

long CSCDCCExaminer::TMB_WordsRPC [private]

Definition at line 106 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

long CSCDCCExaminer::TMB_WordsSinceLastHeader [private]

Definition at line 102 of file CSCDCCExaminer.h.

Referenced by check(), checkTriggerHeadersAndTrailers(), and zeroCounts().

unsigned short CSCDCCExaminer::tmpbuf[16] [private]

Definition at line 60 of file CSCDCCExaminer.h.

Referenced by check(), and CSCDCCExaminer().

bool CSCDCCExaminer::uniqueALCT [private]

Definition at line 73 of file CSCDCCExaminer.h.

Referenced by check().

bool CSCDCCExaminer::uniqueTMB [private]

Definition at line 73 of file CSCDCCExaminer.h.

Referenced by check().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:10 2009 for CMSSW by  doxygen 1.5.4