67 ATH_MSG_ERROR(
"Configuration Problem: Neither doPedstal nor doAutoCorr set!" );
68 return StatusCode::FAILURE;
82 ATH_MSG_ERROR(
"Failed initialize LArConditionsContainer 'm_accu'" );
85 return StatusCode::SUCCESS;
97 ATH_MSG_ERROR(
"Key list is empty! No containers processed!" );
98 return StatusCode::FAILURE;
105 if (
sc.isFailure()) {
106 ATH_MSG_ERROR(
"Failed to retrieve FebErrorSummary object!" );
112 ATH_MSG_WARNING(
"No FebErrorSummaryObject found! Feb errors not checked!" );
119 for (
const std::string& key :
m_keylist) {
122 ATH_MSG_DEBUG(
"Cannot read LArAccumulatedDigitContainer from StoreGate! key=" << key);
123 if ( ( (&key == &
m_keylist.back()) ) && foundkey==0 ){
124 ATH_MSG_ERROR(
"None of the provided LArAccumulatedDigitContainer keys could be read");
125 return StatusCode::FAILURE;
134 ATH_MSG_DEBUG(
"LArAccumulatedDigitContainer (key=" << key <<
") is empty ");
143 if (dg->nTrigger()==0)
continue;
147 const uint16_t febErrs=febErrSum->
feb_error(febid);
149 if (febid!=lastFailedFEB) {
152 <<
" reports error(s):" << febErrSum->
error_to_string(febErrs) <<
". Data ignored." );
162 ATH_MSG_ERROR(
"Failed to accumulate sub-steps! Inconsistent number of ADC samples" );
165 return StatusCode::SUCCESS;
172 std::unique_ptr<LArAutoCorrComplete> larAutoCorrComplete;
173 std::unique_ptr<LArPedestalComplete> larPedestalComplete;
178 larAutoCorrComplete = std::make_unique<LArAutoCorrComplete>();
180 ATH_CHECK( larAutoCorrComplete->initialize() );
186 larPedestalComplete = std::make_unique<LArPedestalComplete>();
188 ATH_CHECK( larPedestalComplete->initialize() );
198 objName=
"pedestal & autocorr";
200 int n_zero,n_min, n_max, n_cur;
201 n_zero=0; n_max=n_min=-1;
203 std::vector<float> cov;
211 if (cell_it==cell_it_e){
214 for (;cell_it!=cell_it_e;cell_it++) {
216 n_cur = dg.nTrigger();
217 if(n_cur==0) { n_zero++;
continue; }
221 if(n_cur<n_min || n_min<0) n_min=n_cur;
222 if(n_cur>n_max || n_max<0) n_max=n_cur;
225 if (larPedestalComplete)
228 if (larAutoCorrComplete) {
230 larAutoCorrComplete->set(chid,gain,cov);
235 ATH_MSG_INFO(
"Gain " << gain <<
" Number of cells with 0 events to compute "<<objName<<
": " << n_zero );
236 ATH_MSG_INFO(
"Gain " << gain <<
" Minimum number of events*samples to compute " <<objName<<
": "<< n_min );
237 ATH_MSG_INFO(
"Gain " << gain <<
" Maximum number of events*samples to compute " <<objName<<
": " <<n_max );
240 ATH_MSG_INFO(
" Summary : Number of cells with " <<objName<<
" value computed : " << NCells );
241 ATH_MSG_INFO(
" Summary : Number of Barrel PS cells side A or C (connected+unconnected): 3904+ 192 = 4096 " );
242 ATH_MSG_INFO(
" Summary : Number of Barrel cells side A or C (connected+unconnected): 50944+2304 = 53248 " );
243 ATH_MSG_INFO(
" Summary : Number of EMEC cells side A or C (connected+unconnected): 31872+3456 = 35328 " );
244 ATH_MSG_INFO(
" Summary : Number of HEC cells side A or C (connected+unconnected): 2816+ 256 = 3072 " );
245 ATH_MSG_INFO(
" Summary : Number of FCAL cells side A or C (connected+unconnected): 1762+ 30 = 1792 " );
247 if (larPedestalComplete) {
252 if (larAutoCorrComplete) {
256 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
const ServiceHandle< StoreGateSvc > & detStore() const
Container class for LArAccumulatedDigit.
Data class for ADC samples and autocorr preprocessed by the DSP.
bool setAddSubStep(const CaloGain::CaloGain gain_value, const HWIdentifier chid, const std::vector< uint64_t > &sampleSum, const std::vector< uint64_t > &sampleSquare, const unsigned nTrigger)
Accumulate new values.
HWIdentifier channelId() const
ConditionsMap::iterator ConditionsMapIterator
Holds information from the FEB Error Summary.
static std::string error_to_string(uint16_t error)
interpret the error in string
uint16_t feb_error(HWIdentifier febid) const
get error for feb
std::vector< std::string > m_keylist
std::string m_groupingType
std::string m_pedContName
~LArPedestalAutoCorrBuilder()
LArPedestalAutoCorrBuilder(const std::string &name, ISvcLocator *pSvcLocator)
const LArOnlineID_Base * m_onlineHelper
virtual StatusCode stop()
uint16_t m_fatalFebErrorPattern
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring