 |
ATLAS Offline Software
|
Go to the documentation of this file.
11 MsgStream &
log)
const
22 unsigned int waveIndex = 0;
25 unsigned int ifebWithData = 0;
28 for (
unsigned int i = 0;
i < nfebids; ++
i, ++subsetIt){
29 unsigned int febid = subsetIt->first;
31 bool hasSparseData =
false;
32 unsigned int chansSet = 0;
33 unsigned int chansOffset = 0;
45 for (
unsigned int j = 0; j < nChannelsPerFeb; ++j){
46 bool copyChannel =
true;
50 if (!(chansSet & (1 << (j - chansOffset)))) {
55 if (j%32 == 31 && j < nChannelsPerFeb-2) {
69 std::vector<double>
val;
70 std::vector<double>
err;
96 for (
unsigned int i = 0;
i < ncorrs; ++
i){
99 log << MSG::ERROR <<
"LArPhysWaveSubsetCnv_p1::persToTrans - PhysWave index too large: WaveIndex/sizeInFile "
112 std::vector<double>
val;
113 std::vector<double>
err;
114 std::vector<int> tri;
117 log << MSG::ERROR <<
"Persistent LArPhysWave object is inconsistent. i=" <<
i <<
" WaveIndes=" << waveIndex <<
" size=" << persObj->
m_vAmplitudes.size() <<
"samples=" << persObj->
m_samples <<
endmsg;
143 MsgStream &
log)
const
153 unsigned int nsubsetsNotEmpty = 0;
154 unsigned int nchans = 0;
157 bool haveSampleSize=
false;
159 std::vector<unsigned int> febsWithSparseData;
160 const auto subsetEnd = transObj->
subsetEnd();
162 subsetIt != subsetEnd;
165 unsigned int nfebChans = subsetIt->second.size();
167 if (nfebChans != 0 && nfebChans != nChannelsPerFeb) {
168 log << MSG::ERROR <<
"LArPhysWaveSubsetCnv_p1::transToPers - found incorrect number of channels per feb: " << nfebChans<<
endmsg;
172 if (nfebChans) ++nsubsetsNotEmpty;
174 bool isSparse =
false;
175 for (
unsigned int j = 0; j < nfebChans; ++j) {
179 if (!isSparse && PW.
isEmpty()) {
181 febsWithSparseData.push_back(subsetIt->first);
187 if (!haveSampleSize) {
193 log << MSG::ERROR <<
"Waves of unequal length found in same conditions channel. Truncating to the shorter of "
210 if (febsWithSparseData.size())
213 persObj->
m_dt.reserve(nchans);
217 persObj->
m_flag.reserve(nchans);
222 subsetIt != subsetEnd;
225 unsigned int nfebChans = subsetIt->second.size();
227 if (nfebChans == 0)
continue;
229 unsigned int febid = subsetIt->first;
233 if (counterSparse < (
int)febsWithSparseData.size() && febid == febsWithSparseData[counterSparse]){
239 unsigned int chansSet = 0;
240 unsigned int chansOffset = 0;
241 for (
unsigned int j = 0; j < nfebChans; ++j){
243 bool saveAmplitudes=
true;
246 if (!subsetIt->second[j].isEmpty()) {
248 assert (j >= chansOffset && (j - chansOffset) <= 31);
250 chansSet |= (1 << (j - chansOffset));
255 saveAmplitudes =
false;
260 if (j == (chansOffset + 31) || j == nfebChans-1 ) {
268 if (saveAmplitudes) {
305 for (
unsigned int k = 0;
k<
w.size(); ++
k){
void setGroupingType(unsigned int type)
set the type of grouping - defined in LArConditionsContainerBase.h
persistent class container of LArPhysWave data.
std::vector< unsigned int > m_corrChannels
size_t getSize() const
number of time samples
std::vector< unsigned int > m_febsWithSparseData
unsigned getFlag() const
flag: ...
const std::vector< double > & getWave() const
Wave parameters.
unsigned channelVectorSize() const
const double & getDt() const
delta time
unsigned int subsetSize() const
std::vector< int > m_timeOffset
ConstCorrectionVecIt correctionVecEnd() const
std::vector< float > m_vErrors
std::vector< unsigned > m_flag
std::vector< float > m_vAmplitudes
std::vector< unsigned int > m_febIds
void initialize(const std::vector< FebId > &ids, unsigned int gain)
Initialize with set of FEB ids.
bool isEmpty() const
is LArWave uninitialized?
std::vector< CorrectionPair > CorrectionVec
ChIndex chIndex(const std::string &index)
convert ChIndex name string to enum
unsigned int m_groupingType
unsigned int channel() const
Access to the COOL channel number.
int getTimeOffset() const
void setChannel(unsigned int channel)
set the COOL channel number
template class for use for I/O of conditions data
This file defines the template class used for I/O of conditions data.
size_type subsetSize() const
Size of subset.
unsigned int gain() const
Access to gain.
size_type correctionVecSize() const
Size of channel set.
def time(flags, cells_name, *args, **kw)
LArConditionsSubset_p1 m_subset
virtual void transToPers(const LArPWTransType *transObj, LArPWPersType *persObj, MsgStream &log) const override
ConstSubsetIt subsetBegin() const
Iterators over subset.
virtual void persToTrans(const LArPWPersType *persObj, LArPWTransType *transObj, MsgStream &log) const override
ConstSubsetIt subsetEnd() const
std::vector< int > m_vTriggers
ConstCorrectionVecIt correctionVecBegin() const
Iterators over channel set.
void insertCorrections(CorrectionVec &&corrs)
Insert a group of corrections.
const std::vector< double > & getErrors() const
error vector
std::vector< float > m_dt
unsigned int groupingType() const
Type of grouping - defined in LArConditionsContainerBase.h.
const std::vector< int > & getTriggers() const
trigger vector