7#include "Identifier/Identifier.h"
18 log << MSG::ERROR <<
"LArRawSCContainer_p1 is inconsistent! " << std::endl;
24 std::vector<int>::const_iterator en_it=pers->
m_energies.begin();
25 std::vector<int>::const_iterator en_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 std::vector<bool>::const_iterator satur_it=pers->
m_satur.begin();
31 std::vector<bool>::const_iterator satur_it_e;
33 for (
unsigned i=0;i<nDigits;i++) {
35 std::vector<int> energies (en_it,en_it_e);
38 std::vector<unsigned short> bcids (bcid_it,bcid_it_e);
41 std::vector<bool> satur (satur_it,satur_it_e);
52 satur_it = satur_it_e;
63 unsigned int nDigits=trans->
size();
65 pers->
m_chan.reserve(nDigits);
70 (*(trans->
begin()))->nsamples()
73 (*(trans->
begin()))->nsamples()
76 (*(trans->
begin()))->nsamples()
79 for (
const LArRawSC* transDigit : *trans) {
80 pers->
m_channelID.push_back(transDigit->hardwareID().get_identifier32().get_compact());
81 pers->
m_chan.push_back(transDigit->chan());
82 pers->
m_sourceId.push_back(transDigit->SourceId());
83 pers->
m_nEnergies.push_back(transDigit->energies().size());
85 transDigit->energies().begin(),
86 transDigit->energies().end());
88 transDigit->bcids().begin(),
89 transDigit->bcids().end());
91 transDigit->satur().begin(),
92 transDigit->satur().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 transToPers(const LArRawSCContainer *trans, LArRawSCContainer_p1 *pers, MsgStream &log) const override
virtual void persToTrans(const LArRawSCContainer_p1 *pers, LArRawSCContainer *trans, MsgStream &log) const override
std::vector< unsigned short > m_nEnergies
std::vector< bool > m_satur
std::vector< unsigned short > m_bcids
std::vector< unsigned int > m_sourceId
std::vector< int > m_energies
std::vector< unsigned short > m_chan
std::vector< unsigned int > m_channelID
Container class for LArRawSC.
Liquid Argon SuperCell raw data.