|
ATLAS Offline Software
|
Go to the documentation of this file.
11 MsgStream &
log)
const
22 unsigned int waveIndex = 0;
23 unsigned int chIndex = 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;
48 if (!(chansSet & (1 << (j - chansOffset)))) {
53 if (j%32 == 31 && j < nChannelsPerFeb-2) {
63 double time = persObj->
m_dt[chIndex];
64 unsigned int f = persObj->
m_flag[chIndex];
67 std::vector<double>
val;
68 std::vector<double>
err;
94 for (
unsigned int i = 0;
i < ncorrs; ++
i){
96 if (chIndex >= persObj->
m_dt.size()) {
97 log << MSG::ERROR <<
"LArPhysWaveSubsetCnv_p1::persToTrans - PhysWave index too large: WaveIndex/sizeInFile "
98 << chIndex <<
" " << persObj->
m_dt.size()<<
" "<<
endmsg;
106 double time = persObj->
m_dt[chIndex];
107 unsigned int f = persObj->
m_flag[chIndex];
110 std::vector<double>
val;
111 std::vector<double>
err;
112 std::vector<int> tri;
115 log << MSG::ERROR <<
"Persistent LArPhysWave object is inconsistent. i=" <<
i <<
" WaveIndes=" << waveIndex <<
" size=" << persObj->
m_vAmplitudes.size() <<
"samples=" << persObj->
m_samples <<
endmsg;
141 MsgStream &
log)
const
151 unsigned int nsubsetsNotEmpty = 0;
152 unsigned int nchans = 0;
155 bool haveSampleSize=
false;
157 std::vector<unsigned int> febsWithSparseData;
158 const auto subsetEnd = transObj->
subsetEnd();
160 subsetIt != subsetEnd;
163 unsigned int nfebChans = subsetIt->second.size();
165 if (nfebChans != 0 && nfebChans != nChannelsPerFeb) {
166 log << MSG::ERROR <<
"LArPhysWaveSubsetCnv_p1::transToPers - found incorrect number of channels per feb: " << nfebChans<<
endmsg;
170 if (nfebChans) ++nsubsetsNotEmpty;
172 bool isSparse =
false;
173 for (
unsigned int j = 0; j < nfebChans; ++j) {
177 if (!isSparse && PW.
isEmpty()) {
179 febsWithSparseData.push_back(subsetIt->first);
185 if (!haveSampleSize) {
191 log << MSG::ERROR <<
"Waves of unequal length found in same conditions channel. Truncating to the shorter of "
208 if (febsWithSparseData.size())
211 persObj->
m_dt.reserve(nchans);
215 persObj->
m_flag.reserve(nchans);
220 subsetIt != subsetEnd;
223 unsigned int nfebChans = subsetIt->second.size();
225 if (nfebChans == 0)
continue;
227 unsigned int febid = subsetIt->first;
231 if (counterSparse < (
int)febsWithSparseData.size() && febid == febsWithSparseData[counterSparse]){
237 unsigned int chansSet = 0;
238 unsigned int chansOffset = 0;
239 for (
unsigned int j = 0; j < nfebChans; ++j){
241 bool saveAmplitudes=
true;
244 if (!subsetIt->second[j].isEmpty()) {
246 assert (j >= chansOffset && (j - chansOffset) <= 31);
247 chansSet |= (1 << (j - chansOffset));
252 saveAmplitudes =
false;
257 if (j == (chansOffset + 31) || j == nfebChans-1 ) {
265 if (saveAmplitudes) {
302 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
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