21 sc =
detStore()->retrieve(ll,
"LArOnline_SuperCellID");
24 return StatusCode::FAILURE;
35 return StatusCode::FAILURE;
65 return StatusCode::SUCCESS;
77 ATH_MSG_WARNING (
"Unable to retrieve LArAccumulatedCalibDigitContainer with key " <<
m_contKey <<
" from DetectorStore. " );
78 return StatusCode::SUCCESS;
81 accuDigitContainer = Hdl.
cptr();
89 return StatusCode::SUCCESS;
91 ATH_MSG_DEBUG (
"LArAccumulatedCalibDigitContainer with key=" <<
m_contKey <<
" has " <<accuDigitContainer->
size() <<
" entries" );
94 for (;it!=it_e;++it) {
96 if ( !(*it) )
continue;
103 m_DAC = (*it)->DAC();
108 unsigned int trueMaxSample = (*it)->nsamples();
113 ATH_MSG_WARNING (
"The number of samples in data is larger than the one specified by JO: " << trueMaxSample <<
" > " <<
m_Nsamples <<
" --> only " <<
m_Nsamples <<
" will be available in the ntuple " );
119 const std::vector<unsigned long>& sampleSum = (*it)->sampleSum();
120 const std::vector<unsigned long>& sampleSum2 = (*it)->sample2Sum();
121 const std::vector<float>&
mean = (*it)->mean();
122 const std::vector<float>& RMSv = (*it)->RMS();
124 for(
unsigned int j=0;j<trueMaxSample;j++){
125 m_Sum[j] = sampleSum[j];
146 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
const ServiceHandle< StoreGateSvc > & detStore() const
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
Container class for LArAccumulatedCalibDigit.
NTuple::Array< float > m_Mean
NTuple::Item< long > m_DAC
Gaudi::Property< std::vector< unsigned int > > m_keepFT
Gaudi::Property< bool > m_keepPulsed
LArAverages2Ntuple(const std::string &name, ISvcLocator *pSvcLocator)
NTuple::Item< long > m_Nsteps
NTuple::Item< unsigned long long > m_EventNum
NTuple::Array< unsigned int > m_SumSq
NTuple::Item< long > m_delay
virtual StatusCode initialize() override final
NTuple::Item< long > m_Ntrigger
NTuple::Array< float > m_RMS
unsigned long long m_event
NTuple::Item< long > m_isPulsed
NTuple::Item< unsigned long long > m_IEvent
SG::ReadHandleKey< LArAccumulatedCalibDigitContainer > m_contKey
Gaudi::Property< unsigned int > m_Nsamples
const LArOnlineID_Base * m_onlineHelper
NTuple::Array< unsigned int > m_Sum
virtual StatusCode execute(const EventContext &ctx) override final
Execute method.
NTuple::Item< unsigned long > m_StepIndex
NTuple::Item< long > m_ntNsamples
Gaudi::Property< bool > m_isSC
bool fillFromIdentifier(const HWIdentifier &id)
LArCond2NtupleBase(const std::string &name, ISvcLocator *pSvcLocator)
Helper for the Liquid Argon Calorimeter cell identifiers.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
void mean(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")