 |
ATLAS Offline Software
|
Go to the documentation of this file.
13 MsgStream &
log)
const
23 unsigned int waveIndex = 0;
26 unsigned int ifebWithData = 0;
29 for (
unsigned int i = 0;
i < nfebids; ++
i, ++subsetIt){
32 unsigned int febid = subsetIt->first;
35 bool hasSparseData =
false;
36 unsigned int chansSet = 0;
37 unsigned int chansOffset = 0;
49 for (
unsigned int j = 0; j < nChannelsPerFeb; ++j){
50 bool copyChannel =
true;
54 if (!(chansSet & (1 << (j - chansOffset)))) {
60 if (j%32 == 31 && j < nChannelsPerFeb-2) {
75 std::vector<double>
val;
76 std::vector<double>
err;
102 for (
unsigned int i = 0;
i < ncorrs; ++
i){
106 <<
"LArCaliWaveSubsetCnv_p1::persToTrans - CaliWave index too large: WaveIndex/sizeInFile "
121 std::vector<double>
val;
122 std::vector<double>
err;
123 std::vector<int> tri;
126 log << MSG::ERROR <<
"Persistent LArCaliWave object is inconsistent. i=" <<
i <<
" WaveIndes="
160 unsigned int nsubsetsNotEmpty = 0;
161 unsigned int nchans = 0;
166 std::vector<unsigned int> febsWithSparseData;
168 const auto subsetEnd = transObj->
subsetEnd();
170 subsetIt != subsetEnd;
173 unsigned int nfebChans = subsetIt->second.size();
176 if (nfebChans != 0 && nfebChans != nChannelsPerFeb) {
177 log << MSG::ERROR <<
"LArCaliWaveSubsetCnv_p1::transToPers - found incorrect number of channels per feb: " << nfebChans<<
endmsg;
181 if (nfebChans) ++nsubsetsNotEmpty;
183 bool isSparse =
false;
184 for (
unsigned int j = 0; j < nfebChans; ++j) {
187 if (!isSparse && CWV.size() == 0) {
189 febsWithSparseData.push_back(subsetIt->first);
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].size() > 0) {
248 assert (j >= chansOffset && (j - chansOffset) <= 31);
249 chansSet |= (1 << (j - chansOffset));
254 saveAmplitudes =
false;
259 if (j == (chansOffset + 31)) {
267 if (saveAmplitudes) {
269 const std::vector<double>&
w=CWV[0].getWave();
270 const std::vector<double>&
e=CWV[0].getErrors();
271 const std::vector<int>&
t=CWV[0].getTriggers();
272 persObj->
m_dt.push_back(CWV[0].getDt());
274 persObj->
m_DAC.push_back(CWV[0].getDAC() | (CWV[0].getIsPulsedInt()<<16));
275 for (
unsigned int k = 0;
k<
w.size(); ++
k){
295 if (CWV.empty())
continue;
298 const std::vector<double>&
w=CWV[0].getWave();
299 const std::vector<double>&
e=CWV[0].getErrors();
300 const std::vector<int>&
t=CWV[0].getTriggers();
301 persObj->
m_dt.push_back(CWV[0].getDt());
303 persObj->
m_DAC.push_back(CWV[0].getDAC() | (CWV[0].getIsPulsedInt()<<16));
305 for (
unsigned int k = 0;
k<
w.size(); ++
k){
void setGroupingType(unsigned int type)
set the type of grouping - defined in LArConditionsContainerBase.h
std::vector< unsigned int > m_corrChannels
std::vector< unsigned int > m_febsWithSparseData
virtual void persToTrans(const LArCWPersType *persObj, LArCWTransType *transObj, MsgStream &log) const override
unsigned channelVectorSize() const
unsigned int subsetSize() const
ConstCorrectionVecIt correctionVecEnd() const
std::vector< int > m_vTriggers
LArConditionsSubset_p1 m_subset
std::vector< float > m_vAmplitudes
std::vector< float > m_dt
std::vector< unsigned int > m_febIds
void initialize(const std::vector< FebId > &ids, unsigned int gain)
Initialize with set of FEB ids.
std::vector< CorrectionPair > CorrectionVec
ChIndex chIndex(const std::string &index)
convert ChIndex name string to enum
virtual void transToPers(const LArCWTransType *transObj, LArCWPersType *persObj, MsgStream &log) const override
unsigned int m_groupingType
unsigned int channel() const
Access to the COOL channel number.
std::vector< float > m_vErrors
void setChannel(unsigned int channel)
set the COOL channel number
std::vector< unsigned > m_flag
template class for use for I/O of conditions data
persistent class container of LArCaliWave data.
This file defines the template class used for I/O of conditions data.
unsigned int gain() const
Access to gain.
size_type correctionVecSize() const
Size of channel set.
const std::vector< bool > & getFlag(const TrigPassFlags *flags, const T *obj, const CONTAINER *container, const size_t position)
Returns the flag at index position.
def time(flags, cells_name, *args, **kw)
ConstSubsetIt subsetBegin() const
Iterators over subset.
ConstSubsetIt subsetEnd() const
ConstCorrectionVecIt correctionVecBegin() const
Iterators over channel set.
void insertCorrections(CorrectionVec &&corrs)
Insert a group of corrections.
unsigned int groupingType() const
Type of grouping - defined in LArConditionsContainerBase.h.