|
ATLAS Offline Software
|
Go to the documentation of this file.
23 m_all_febs.insert(
id.get_identifier32().get_compact());
81 return StatusCode::SUCCESS ;
93 ATH_CHECK( febErrorSummary.
record (std::make_unique<LArFebErrorSummary>()) );
102 unsigned int nbSamplesFirst=0;
105 ATH_MSG_DEBUG(
" LArFebHeaderContainer Size = "<< hdrCont->size() );
107 std::set<unsigned int> all_febs;
114 int nbOfFebsInError = 0;
116 for (
const auto*
const it : *hdrCont) {
122 all_febs.erase(int_id);
130 const std::vector<uint16_t>& sca =
it->SCA();
135 bool typeMism =
false;
137 if (eventTypeFirst == 999)
138 eventTypeFirst = eventType;
139 if (eventType != eventTypeFirst)
142 std::bitset<32> rodstatusbits(rodstatus);
144 bool scaOutOfRange =
false;
145 bool badNbOfSp =
false;
147 bool checkSumErr =
false;
151 if (nbSamplesFirst == 0) {
153 if (eventType == 2 && (!sca.empty()))
154 nbSamplesFirst = sca.size();
156 if (eventType == 4 && (
it->NbSamples() != 0))
157 nbSamplesFirst =
it->NbSamples();
160 if (eventType == 2) {
161 if (nbSamplesFirst != sca.size() && !sca.empty())
163 for (
unsigned int i = 0;
i < sca.size(); ++
i) {
165 scaOutOfRange =
true;
168 if (eventType == 4 && (nbSamplesFirst !=
it->NbSamples()) && (
it->NbSamples() != 0))
172 if (eventType == 2 && sca.empty())
174 if (eventType == 4 && (
it->RodResults1Size() == 0))
178 if (!
it->ChecksumVerification())
180 if (eventType == 4) {
182 if ((
it->FormatVersion() & 0xF) <= 11)
183 expSize1 =
it->NbSweetCells1() + 83 + (
int)ceilf((
it->NbSamples() + 1) / 2.0);
184 if ((
it->FormatVersion() & 0xF) >= 12)
185 expSize1 =
it->NbSweetCells1() + 84 + (
int)ceilf((
it->NbSamples() + 1) / 2.0);
186 if (expSize1 !=
it->RodResults1Size()) {
189 int nbOf32bits = (
it->NbSweetCells2() *
it->NbSamples() + 1) / 2.0;
190 if (nbOf32bits !=
it->RodResults2Size()) {
204 if (rodstatusbits[6])
207 if (rodstatusbits[2] || rodstatusbits[7])
210 if (rodstatusbits[3] || rodstatusbits[8])
222 if (rodstatusbits[5])
225 if (rodstatusbits[24])
243 const LArBadFeb febStatus = badFebs->status(febid);
245 if (err_toignore > 0) {
247 errw = errw & (~erri);
252 std::lock_guard lock(
m_mtx);
254 if (errw & (1 <<
i)) {
257 ++(m_errsPerFeb[int_id]);
264 ATH_MSG_DEBUG(
" failed to insert the error into LArFebErrorSummary " << std::hex << febid << std::dec);
268 const LArBadFeb febStatus = badFebs->status(febid);
270 nbOfFebsInError += 1;
278 for (
auto it : all_febs) {
280 const LArBadFeb febStatus = badFebs->status(febid);
282 ATH_MSG_DEBUG(
" This FEB is not read out 0x" << std::hex <<
it << std::dec);
315 return StatusCode::SUCCESS;
321 return v_feb.find(hid) != v_feb.end();
327 ATH_MSG_INFO(
" In finalize: Number of Errors for each type" );
334 for (
auto feb_err : m_errsPerFeb) {
339 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
bool set_feb_error(unsigned int febid, uint16_t e)
Add another FEB error record, return true if added successfully.
std::atomic< int > m_missingFebsWarns
SG::ReadCondHandleKey< LArBadFebCont > m_bfKey
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
SG::WriteHandleKey< LArFebErrorSummary > m_writeKey
bool updateEventFlagBit(const EventFlagSubDet subDet, const size_t bit) const
Change detector flags with update semantics.
SG::WriteDecorHandleKey< xAOD::EventInfo > m_eventInfoDecorKey
bool deadReadout() const
FEB is not sending readout data, but the L1 trigger path is working.
Gaudi::Property< std::set< unsigned int > > m_knownSCACStatus
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
bool msgLvl(const MSG::Level lvl) const
Gaudi::Property< bool > m_checkAllFeb
static bool masked(unsigned int hid, const std::set< unsigned int > &v_feb)
static std::string error_to_string(uint16_t error)
interpret the error in string
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
@ LAr
The LAr calorimeter.
value_type get_compact() const
Get the compact id.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
@ Error
The sub-detector issued an error.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
bool isFCALchannel(const HWIdentifier id) const
Gaudi::Property< std::set< unsigned int > > m_knownZeroSample
bool isEMECchannel(const HWIdentifier id) const override final
id_range feb_range() const
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< std::set< unsigned int > > m_knownEvtId
bool deadAll() const
FEB is completely missing, e.g. powered off.
Handle class for adding a decoration to an object.
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual StatusCode finalize() override final
unsigned int ignoreErrors() const
Gaudi::Property< int > m_warnLimit
bool inError() const
FEB has readout errors, cannot be used.
const LArOnlineID * m_onlineHelper
Gaudi::Property< int > m_minFebsInError
Minimum number of FEBs in error to trigger EventInfo::LArError Defined as 1 by default/bulk,...
bool isEMBchannel(const HWIdentifier id) const
bool deactivatedInOKS() const
Deactivated in OKS.
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
std::set< unsigned int > m_all_febs
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
virtual StatusCode initialize() override final
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< LArFebHeaderContainer > m_readKey
bool isPS(const HWIdentifier id) const
Gaudi::Property< std::string > m_partition
bool updateErrorState(const EventFlagSubDet subDet, const EventFlagErrorState state) const
Update the error state for one particular sub-detector.
bool isHECchannel(const HWIdentifier id) const override final
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
virtual StatusCode execute(const EventContext &ctx) const override final