Skip to content
Snippets Groups Projects
Commit bb5d7dfe authored by Carla Marin Benito's avatar Carla Marin Benito :fast_forward: Committed by Rosen Matev
Browse files

check calo bank size

parent aef19871
No related branches found
No related tags found
1 merge request!3715check calo bank size
......@@ -17,6 +17,7 @@
#include "Gaudi/Accumulators.h"
#include "LHCbAlgs/Transformer.h"
#include "boost/container/small_vector.hpp"
#include <Gaudi/Accumulators/Histogram.h>
namespace {
......@@ -185,8 +186,11 @@ namespace LHCb::Calo {
Gaudi::Property<bool> m_extraHeader{this, "DetectorSpecificHeader", false};
Gaudi::Property<bool> m_cleanCorrupted{this, "CleanWhenCorruption", false};
mutable Gaudi::Accumulators::BinomialCounter<> m_noBanksCounter{this, "No bank found"};
mutable Gaudi::Accumulators::Counter<> m_duplicateADCDigits{this, "# duplicate ADC/Digits"};
mutable Gaudi::Accumulators::BinomialCounter<> m_noBanksCounter{this, "No bank found"};
mutable Gaudi::Accumulators::Counter<> m_duplicateADCDigits{this, "# duplicate ADC/Digits"};
mutable Gaudi::Accumulators::MsgCounter<MSG::ERROR> m_bankSize_error{this, "Banks with wrong size"};
mutable Gaudi::Accumulators::Histogram<1> m_histoWrongSourceID{
this, "WrongBankSourceID", "Wrong bank size", {225, 22550, 22775}};
};
unsigned int fibMask1 = 0xfff000ff;
......@@ -289,6 +293,13 @@ namespace LHCb::Calo {
// ------------------------------------
std::vector<Adc> dataVec;
for ( const auto& bank : banks ) {
//--- check bank size
if ( ( ( bank->version() < 3 && bank->type() == RawBank::Calo ) || bank->version() > 3 ) &&
bank->size() != 156 ) {
++m_bankSize_error;
++m_histoWrongSourceID[bank->sourceID()];
continue;
}
//--- decode the rawbanks
auto dataVecDec = decode_<Decode::Cell>( *bank, status, calo ); // false is to get data, not pinData
dataVec.insert( dataVec.end(), dataVecDec.begin(), dataVecDec.end() );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment