ATLAS Offline Software
Loading...
Searching...
No Matches
LArDSPConfig Class Reference

#include <LArDSPConfig.h>

Inheritance diagram for LArDSPConfig:
Collaboration diagram for LArDSPConfig:

Public Types

enum  { PEAKSAMPLE_MASK =0x1F , HGRAMPINTERCEPT_MASK =0x20 , MGRAMPINTERCEPT_MASK =0x40 , LGRAMPINTERCEPT_MASK =0x80 }

Public Member Functions

 LArDSPConfig (const AthenaAttributeList *attrList)
virtual ~LArDSPConfig ()
bool good () const
bool useMGRampInterceptByHash (const IdentifierHash &febHash) const
bool useHGRampInterceptByHash (const IdentifierHash &febHash) const
bool useLGRampInterceptByHash (const IdentifierHash &febHash) const
bool useMGRampIntercept (const HWIdentifier FEBid) const
bool useHGRampIntercept (const HWIdentifier FEBid) const
bool useLGRampIntercept (const HWIdentifier FEBid) const
uint8_t peakSampleByHash (const IdentifierHash &febHash) const
uint8_t peakSample (const HWIdentifier FEBid) const
StatusCode initializeBase ()
bool msgLvl (const MSG::Level lvl) const
 Test the output level.
MsgStream & msg () const
 The standard message stream.
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream.
void setLevel (MSG::Level lvl)
 Change the current logging level.

Protected Member Functions

 LArDSPConfig ()

Protected Attributes

const AthenaAttributeListm_attrList
const uint8_t * m_pBlob
unsigned m_nFebs
bool m_isInitialized
const LArOnlineIDm_onlineHelper

Private Member Functions

void initMessaging () const
 Initialize our message level and MessageSvc.

Private Attributes

std::string m_nm
 Message source name.
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels)
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer.
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging)

Detailed Description

Definition at line 15 of file LArDSPConfig.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
PEAKSAMPLE_MASK 
HGRAMPINTERCEPT_MASK 
MGRAMPINTERCEPT_MASK 
LGRAMPINTERCEPT_MASK 

Definition at line 24 of file LArDSPConfig.h.

24 {
25 //Encoding
26 //0R0P PPPP
27 PEAKSAMPLE_MASK=0x1F,
31 };

Constructor & Destructor Documentation

◆ LArDSPConfig() [1/2]

LArDSPConfig::LArDSPConfig ( )
protected

Definition at line 9 of file LArDSPConfig.cxx.

10 : LArCondFlatBase("LArDSPConfig"),
11 m_attrList(nullptr),m_pBlob(nullptr),m_nFebs(0)
12{}
LArCondFlatBase(const std::string &name)
unsigned m_nFebs
const uint8_t * m_pBlob
const AthenaAttributeList * m_attrList

◆ LArDSPConfig() [2/2]

LArDSPConfig::LArDSPConfig ( const AthenaAttributeList * attrList)

Definition at line 17 of file LArDSPConfig.cxx.

18 : LArCondFlatBase("LArDSPConfig"),
19 m_attrList(attrList),m_pBlob(nullptr),m_nFebs(0)
20{
21 if (initializeBase().isFailure()) return;
22
23 const coral::Blob& myBlob = (*m_attrList)["febdata"].data<coral::Blob>();
24 m_pBlob=static_cast<const uint8_t*>(myBlob.startingAddress());
25 m_nFebs=myBlob.size()/sizeof(uint8_t); //FIXME check if we get the expected value
26 //m_nSamples=m_attr["nSamples"].data<unsigned>();
27}
StatusCode initializeBase()

◆ ~LArDSPConfig()

LArDSPConfig::~LArDSPConfig ( )
virtual

Definition at line 14 of file LArDSPConfig.cxx.

14{}

Member Function Documentation

◆ good()

bool LArDSPConfig::good ( ) const
inline

Definition at line 37 of file LArDSPConfig.h.

37{ return m_isInitialized && m_nFebs>0; }

◆ initializeBase()

StatusCode LArCondFlatBase::initializeBase ( )
inherited

Definition at line 26 of file LArCondFlatBase.cxx.

26 {
27
28 ATH_MSG_DEBUG( "initializeBase " );
29
30 if (m_isInitialized) {
31 ATH_MSG_DEBUG( "already initialized - returning " );
32 return (StatusCode::SUCCESS);
33 }
34 //Get LArOnlineID....
35 SmartIF<StoreGateSvc> detStore{Gaudi::svcLocator()->service("DetectorStore")};
36 ATH_CHECK_WITH_CONTEXT( detStore.isValid(), "LArCondFlatBase" );
37 ATH_CHECK_WITH_CONTEXT( detStore->retrieve(m_onlineHelper,"LArOnlineID"), "LArCondFlatBase" );
38
39 m_isInitialized = true;
40 ATH_MSG_DEBUG( "end initializeBase ");
41 return (StatusCode::SUCCESS);
42}
#define ATH_CHECK_WITH_CONTEXT
Evaluate an expression and check for errors, with an explicitly specified context name.
#define ATH_MSG_DEBUG(x)
const LArOnlineID * m_onlineHelper

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40{
42 // If user did not set an explicit level, set a default
43 if (m_lvl == MSG::NIL) {
44 m_lvl = m_imsg ?
45 static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
46 MSG::INFO;
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 163 of file AthMessaging.h.

164{
165 MsgStream* ms = m_msg_tls.get();
166 if (!ms) {
167 if (!m_initialized.test_and_set()) initMessaging();
168 ms = new MsgStream(m_imsg,m_nm);
169 m_msg_tls.reset( ms );
170 }
171
172 ms->setLevel (m_lvl);
173 return *ms;
174}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
void initMessaging() const
Initialize our message level and MessageSvc.

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 178 of file AthMessaging.h.

179{ return msg() << lvl; }
MsgStream & msg() const
The standard message stream.

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152{
153 if (m_lvl <= lvl) {
154 msg() << lvl;
155 return true;
156 } else {
157 return false;
158 }
159}

◆ peakSample()

uint8_t LArDSPConfig::peakSample ( const HWIdentifier FEBid) const
inline

Definition at line 54 of file LArDSPConfig.h.

54 {
55 return peakSampleByHash(m_onlineHelper->feb_Hash(FEBid));
56 }
uint8_t peakSampleByHash(const IdentifierHash &febHash) const

◆ peakSampleByHash()

uint8_t LArDSPConfig::peakSampleByHash ( const IdentifierHash & febHash) const

Definition at line 29 of file LArDSPConfig.cxx.

29 {
30 return (m_pBlob[febHash] & PEAKSAMPLE_MASK);
31}

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29{
30 m_lvl = lvl;
31}

◆ useHGRampIntercept()

bool LArDSPConfig::useHGRampIntercept ( const HWIdentifier FEBid) const
inline

Definition at line 46 of file LArDSPConfig.h.

46 {
47 return useHGRampInterceptByHash(m_onlineHelper->feb_Hash(FEBid));
48 };
bool useHGRampInterceptByHash(const IdentifierHash &febHash) const

◆ useHGRampInterceptByHash()

bool LArDSPConfig::useHGRampInterceptByHash ( const IdentifierHash & febHash) const

Definition at line 37 of file LArDSPConfig.cxx.

37 {
38 return ((m_pBlob[febHash] & HGRAMPINTERCEPT_MASK) !=0);
39}

◆ useLGRampIntercept()

bool LArDSPConfig::useLGRampIntercept ( const HWIdentifier FEBid) const
inline

Definition at line 49 of file LArDSPConfig.h.

49 {
50 return useLGRampInterceptByHash(m_onlineHelper->feb_Hash(FEBid));
51 };
bool useLGRampInterceptByHash(const IdentifierHash &febHash) const

◆ useLGRampInterceptByHash()

bool LArDSPConfig::useLGRampInterceptByHash ( const IdentifierHash & febHash) const

Definition at line 41 of file LArDSPConfig.cxx.

41 {
42 return ((m_pBlob[febHash] & LGRAMPINTERCEPT_MASK) !=0);
43}

◆ useMGRampIntercept()

bool LArDSPConfig::useMGRampIntercept ( const HWIdentifier FEBid) const
inline

Definition at line 43 of file LArDSPConfig.h.

43 {
44 return useMGRampInterceptByHash(m_onlineHelper->feb_Hash(FEBid));
45 };
bool useMGRampInterceptByHash(const IdentifierHash &febHash) const

◆ useMGRampInterceptByHash()

bool LArDSPConfig::useMGRampInterceptByHash ( const IdentifierHash & febHash) const

Definition at line 33 of file LArDSPConfig.cxx.

33 {
34 return ((m_pBlob[febHash] & MGRAMPINTERCEPT_MASK) !=0);
35}

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_attrList

const AthenaAttributeList* LArDSPConfig::m_attrList
protected

Definition at line 59 of file LArDSPConfig.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

135{ nullptr };

◆ m_isInitialized

bool LArCondFlatBase::m_isInitialized
protectedinherited

Definition at line 23 of file LArCondFlatBase.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

138{ MSG::NIL };

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_nFebs

unsigned LArDSPConfig::m_nFebs
protected

Definition at line 61 of file LArDSPConfig.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_onlineHelper

const LArOnlineID* LArCondFlatBase::m_onlineHelper
protectedinherited

Definition at line 24 of file LArCondFlatBase.h.

◆ m_pBlob

const uint8_t* LArDSPConfig::m_pBlob
protected

Definition at line 60 of file LArDSPConfig.h.


The documentation for this class was generated from the following files: