Skip to content

Commit

Permalink
Merge pull request #2383 from gartung/EventFilter-CSCRawToDigi-static…
Browse files Browse the repository at this point in the history
…s-work

Misc fixes -- change static to static std::atomic<> for debug and firmwareVersion that...
  • Loading branch information
ktf committed Feb 12, 2014
2 parents 6d49765 + e66a1ff commit b87e53e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
5 changes: 3 additions & 2 deletions EventFilter/CSCRawToDigi/interface/CSCALCTHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <bitset>
#include <vector>
#include <iosfwd>
#include <atomic>
#include "DataFormats/CSCDigi/interface/CSCALCTDigi.h"
#include "DataFormats/CSCDigi/interface/CSCALCTStatusDigi.h"
#include "EventFilter/CSCRawToDigi/interface/CSCALCTHeader2006.h"
Expand Down Expand Up @@ -144,8 +145,8 @@ class CSCALCTHeader {
//maximum header size is 116 words
unsigned short int theOriginalBuffer[116];

static bool debug;
static unsigned short int firmwareVersion;
static std::atomic<bool> debug;
static std::atomic<unsigned short int> firmwareVersion;

///size of the 2007 header in words
unsigned short int sizeInWords2007_, bxn0, bxn1;
Expand Down
5 changes: 3 additions & 2 deletions EventFilter/CSCRawToDigi/src/CSCALCTHeader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
#include "EventFilter/CSCRawToDigi/src/bitset_append.h"
#include "EventFilter/CSCRawToDigi/src/cscPackerCompare.h"
#include <iomanip>
#include <atomic>

bool CSCALCTHeader::debug=false;
short unsigned int CSCALCTHeader::firmwareVersion=2007;
std::atomic<bool> CSCALCTHeader::debug{false};
std::atomic<short unsigned int> CSCALCTHeader::firmwareVersion{2007};

CSCALCTHeader::CSCALCTHeader(int chamberType)
: header2006(chamberType),
Expand Down
8 changes: 4 additions & 4 deletions EventFilter/CSCRawToDigi/src/CSCCFEBTimeSlice.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

// a Gray code is An ordering of 2n binary numbers such that
// only one bit changes from one entry to the next
unsigned layerGrayCode[] = {3,1,5,6,4,2};
unsigned layerInverseGrayCode[] = {1,5,0,4,2,3};
unsigned channelGrayCode[] = {0,1,3,2, 6,7,5,4, 12,13,15,14, 10,11,9,8};
unsigned channelInverseGrayCode[] = {0,1,3,2, 7,6,4,5, 15,14,12,13, 8,9,11,10};
const unsigned layerGrayCode[] = {3,1,5,6,4,2};
const unsigned layerInverseGrayCode[] = {1,5,0,4,2,3};
const unsigned channelGrayCode[] = {0,1,3,2, 6,7,5,4, 12,13,15,14, 10,11,9,8};
const unsigned channelInverseGrayCode[] = {0,1,3,2, 7,6,4,5, 15,14,12,13, 8,9,11,10};

CSCCFEBTimeSlice::CSCCFEBTimeSlice()
{
Expand Down

0 comments on commit b87e53e

Please sign in to comment.