7#include "Identifier/Identifier.h"
18 log << MSG::ERROR <<
"LArSCDigitContainer_p1 is inconsistent! " << std::endl;
24 std::vector<unsigned short>::const_iterator sample_it=pers->
m_samples.begin();
25 std::vector<unsigned short>::const_iterator sample_it_e;
27 std::vector<unsigned short>::const_iterator bcid_it=pers->
m_bcids.begin();
28 std::vector<unsigned short>::const_iterator bcid_it_e;
30 for (
unsigned i=0;i<nDigits;i++) {
32 std::vector<short> samples (sample_it,sample_it_e);
35 std::vector<unsigned short> bcids (bcid_it,bcid_it_e);
39 std::move(samples), std::move(bcids) ));
41 sample_it = sample_it_e;
53 unsigned int nDigits=trans->
size();
55 pers->
m_chan.reserve(nDigits);
60 (*(trans->
begin()))->nsamples()
63 (*(trans->
begin()))->nsamples()
67 pers->
m_channelID.push_back(transDigit->hardwareID().get_identifier32().get_compact());
68 pers->
m_chan.push_back(transDigit->Channel());
69 pers->
m_sourceId.push_back(transDigit->SourceId());
70 pers->
m_nSamples.push_back(transDigit->samples().size());
72 transDigit->samples().begin(),
73 transDigit->samples().end());
75 transDigit->BCId().begin(),
76 transDigit->BCId().end());
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
value_type push_back(value_type pElem)
Add an element to 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.
void clear()
Erase all the elements in the collection.
virtual void persToTrans(const LArSCDigitContainer_p1 *pers, LArSCDigitContainer *trans, MsgStream &log) const override
virtual void transToPers(const LArSCDigitContainer *trans, LArSCDigitContainer_p1 *pers, MsgStream &log) const override
std::vector< unsigned char > m_chan
std::vector< unsigned short > m_bcids
std::vector< unsigned short > m_samples
std::vector< unsigned int > m_channelID
std::vector< unsigned short > m_nSamples
std::vector< unsigned int > m_sourceId
Container class for LArSCDigit.
Base class for LArDigits taken by LATOME.