ATLAS Offline Software
Loading...
Searching...
No Matches
LArFillDSPConfig.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6
10
12// Public methods:
14
15// Destructor
18
19// Athena Algorithm's Hooks
22
23
24 StatusCode sc=detStore()->retrieve(m_onlineID);
25 if (sc.isFailure()) {
26 ATH_MSG_ERROR( "Failed to get LArOnlineID" );
27 return sc;
28 }
29
30 const unsigned nFebs=m_onlineID->febHashMax();
31
32
33 LArDSPConfigWrite larDSPConfig;
34
35 for (unsigned iFeb=0;iFeb<nFebs;++iFeb) {
36 const HWIdentifier febId=m_onlineID->feb_Id(iFeb);
37 //bool useMGRampIntercept=(m_onlineID->isEMBchannel(febId) || m_onlineID->isEMECchannel(febId));
38 bool useMGRampIntercept=(m_onlineID->isEMBchannel(febId) || m_onlineID->isEMECOW(febId) );
39 if(m_lowmu) {
40 if(m_onlineID->isFCALchannel(febId)) useMGRampIntercept=true;
41 }
42 uint8_t peakSample=2;
43 if (m_onlineID->isHECchannel(febId)) peakSample=1; //HEC: peak-sample=1
44 larDSPConfig.set(iFeb,peakSample,useMGRampIntercept);
45 }
46
47
48 std::unique_ptr<AthenaAttributeList> pAttrList(larDSPConfig.attributeList());
49 ATH_CHECK(detStore()->record(std::move(pAttrList),m_folderName));
50 ATH_MSG_INFO( "Successfully recorded AthenaAttributeList containing DSP configuration for " << nFebs << " Febs" );
51
52 if (m_dump) {
53 //Crosscheck:
54 const AthenaAttributeList* attrList_read=nullptr;
55 ATH_CHECK(detStore()->retrieve(attrList_read,m_folderName));
56
57 LArDSPConfig config(attrList_read);
58
59 for (auto fit= m_onlineID->feb_begin();fit!=m_onlineID->feb_end();++fit) {
60 unsigned ps=config.peakSample(*fit);
61 bool ic=config.useMGRampIntercept(*fit);
62 std::cout << "FEB " << m_onlineID->channel_name(*fit) << ": peakSample=" << ps << " useMGIntercept=" << ic << std::endl;
63 }
64 }
65 return StatusCode::SUCCESS;
66}
67
68
69
70
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
static Double_t sc
const ServiceHandle< StoreGateSvc > & detStore() const
An AttributeList represents a logical row of attributes in a metadata table.
void set(const IdentifierHash febId, const uint8_t peakSample, const bool useMGRampIntercept)
std::unique_ptr< AthenaAttributeList > attributeList()
virtual StatusCode stop() override
StringProperty m_folderName
BooleanProperty m_dump
const LArOnlineID * m_onlineID
virtual ~LArFillDSPConfig()
Destructor:
BooleanProperty m_lowmu