Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77785
b: "refs/heads/CMSSW_7_1_X"
c: f9b19d2
h: "refs/heads/CMSSW_7_1_X"
i:
  77783: a1e4f93
v: v3
  • Loading branch information
Alexandre Sakharov committed Nov 12, 2009
1 parent f1a7af0 commit 907e52e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e
"refs/heads/CMSSW_7_1_X": 9bccf310447e78a1de9a80bad8ae87cc242cc224
"refs/heads/CMSSW_7_1_X": f9b19d23d7e95847422d9e60e89ac525af295b5b
13 changes: 11 additions & 2 deletions trunk/EventFilter/CSCRawToDigi/src/CSCRPCData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ std::vector<int> CSCRPCData::BXN() const {
/// make the two pad words into one and see if it's empty
//int pad = theData[pos] & 0xff + ((theData[pos+1] & 0x3f) << 8);

int bxnnew = (((theData[pos+1] >> 8) & 0x3 )<<2) | ((theData[pos+1]>>6)&0x3) ;
int bxnnew = ((theData[pos+1] >> 8) & 0x7 ) ;
//int bxnnew = (((theData[pos+1] >> 8) & 0x3 )<<2) | ((theData[pos+1]>>6)&0x3) ;

int rpc = (theData[pos] >> 12) & 0x7;
//int tbin = (theData[pos] >> 8) & 0xf;
Expand All @@ -92,16 +93,22 @@ std::vector<CSCRPCDigi> CSCRPCData::digis() const {
std::vector<CSCRPCDigi> result;
int bxnold =0 ;
int bxnnew =0 ;
//int bxnewGreg;
for(int linePair = 0; linePair < ((size_-2)/2); ++linePair) {
// skip header word
int pos = linePair*2 + 1;
// LogTrace("RPC") << "+++ CSCRPCData " << std::hex << theData[pos]
// << " " << theData[pos+1];
if (debug)
LogTrace("CSCRPCData|CSCRawToDigi") << "+++ CSCRPCData " << std::hex << theData[pos]
<< " " << theData[pos+1];
// make the two pad words into one and see if it's empty
int pad = (theData[pos] & 0xff) + ((theData[pos+1] & 0xff) << 8);

bxnnew = (((theData[pos+1] >> 8) & 0x3 )<<2) | ((theData[pos+1]>>6)&0x3) ;
//bxnnew = (((theData[pos+1] >> 8) & 0x3 )<<2) | ((theData[pos+1]>>6)&0x3) ;
bxnnew = ((theData[pos+1] >> 8) & 0x7 ) ;
//LogTrace("RPC") << " " << "bxnnew" << " " << bxnnew;
//LogTrace("RPC") << " " << "bxnnewGreg" << " " << bxnewGreg;
if ( linePair == 0 ) bxnold = bxnnew;
if ( bxnnew - bxnold > 1 )
LogTrace("CSCRPCData|CSCRawToDigi") << "+++ CSCRPCData warning: RPC BXN is incrementing by more than 1 clock cycle";
Expand All @@ -114,10 +121,12 @@ std::vector<CSCRPCDigi> CSCRPCData::digis() const {
int rpc = (theData[pos] >> 12) & 0x7;
int tbin = (theData[pos] >> 8) & 0xf;
int bxn = bxnnew;
//LogTrace("RPC") << " rpc: " << rpc << " bxn: " << bxn << " tbin: " << tbin;
for(int i = 0; i < 16; ++i) {
// if the bit is set, make a digi
if((pad>>i)&1) {
result.push_back(CSCRPCDigi(rpc, i, bxn, tbin));
//LogTrace("RPC") << "digi-->" << " rpc: " << rpc << " i: " << i << " bxn: " << bxn << " tbin: " << tbin;
}
}
}
Expand Down

0 comments on commit 907e52e

Please sign in to comment.