21 sc =
detStore()->retrieve(ll,
"LArOnline_SuperCellID");
24 return StatusCode::FAILURE;
35 return StatusCode::FAILURE;
65 return StatusCode::SUCCESS;
73 const EventContext& ctx = Gaudi::Hive::currentContext();
78 ATH_MSG_WARNING (
"Unable to retrieve LArAccumulatedCalibDigitContainer with key " <<
m_contKey <<
" from DetectorStore. " );
79 return StatusCode::SUCCESS;
82 accuDigitContainer = Hdl.
cptr();
90 return StatusCode::SUCCESS;
92 ATH_MSG_DEBUG (
"LArAccumulatedCalibDigitContainer with key=" <<
m_contKey <<
" has " <<accuDigitContainer->
size() <<
" entries" );
95 for (;it!=it_e;++it) {
97 if ( !(*it) )
continue;
104 m_DAC = (*it)->DAC();
109 unsigned int trueMaxSample = (*it)->nsamples();
114 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 " );
120 const std::vector<unsigned long>& sampleSum = (*it)->sampleSum();
121 const std::vector<unsigned long>& sampleSum2 = (*it)->sample2Sum();
122 const std::vector<float>&
mean = (*it)->mean();
123 const std::vector<float>& RMSv = (*it)->RMS();
125 for(
unsigned int j=0;j<trueMaxSample;j++){
126 m_Sum[j] = sampleSum[j];
147 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
virtual StatusCode execute() override final
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
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="")