Skip to content

Commit

Permalink
Make static DCCDataUnpacker::silentMode_ std::atomic
Browse files Browse the repository at this point in the history
Given that DCCDatdaUnpacker::silentMode_ is a public global and
could be modified by any thread, this had to be changed to an
std::atomic<bool>.
  • Loading branch information
Dr15Jones committed Mar 7, 2014
1 parent 29c3d3b commit ec4cb81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion EventFilter/EcalRawToDigi/interface/DCCDataUnpacker.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <map>
#include <stdio.h>
#include <stdint.h>
#include <atomic>

//DATA DECODER

Expand Down Expand Up @@ -223,7 +224,7 @@ public :
*/
DCCEventBlock * currentEvent(){ return currentEvent_;}

static bool silentMode_;
static std::atomic<bool> silentMode_;

protected :

Expand Down
2 changes: 1 addition & 1 deletion EventFilter/EcalRawToDigi/src/DCCDataUnpacker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "EventFilter/EcalRawToDigi/interface/EcalElectronicsMapper.h"
#include <set>

bool DCCDataUnpacker::silentMode_ = false;
std::atomic<bool> DCCDataUnpacker::silentMode_(false);

DCCDataUnpacker::DCCDataUnpacker(
EcalElectronicsMapper * mapper, bool hU, bool srpU, bool tccU, bool feU , bool memU, bool syncCheck, bool feIdCheck, bool forceToKeepFRdata
Expand Down

0 comments on commit ec4cb81

Please sign in to comment.