ATLAS Offline Software
Classes
LArCompactSubset.h File Reference

A more compact way of storing shape/ofc data. More...

#include "LArElecCalib/ILArShape.h"
#include "LArElecCalib/ILArOFC.h"
#include <cstddef>
#include "LArRawConditions/LArCompactSubset.icc"
Include dependency graph for LArCompactSubset.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  LArCompactSubsetConstChannelProxy
 A more compact way of storing shape/ofc data — const portion. More...
 
class  LArCompactSubsetChannelProxy
 A more compact way of storing shape/ofc data — non-const portion. More...
 
class  LArCompactSubsetChannelPointer
 This acts as a pointer to a LArCompactSubsetChannelProxy. More...
 
class  LArCompactSubsetChannelVector
 This acts like a vector of channel objects. More...
 
class  LArCompactSubsetChannelVector::const_iterator
 Iterator for LArCompactSubsetChannelVector. More...
 
class  LArCompactSubsetConstChannelVector
 This acts like a vector of channel objects — const version. More...
 
class  LArCompactSubsetChannelVectorPointer
 This acts as a pointer to a LArCompactSubsetChannelVector. More...
 
class  LArCompactSubsetFebPair
 This acts like a FEB ID/channel vector pair. More...
 
class  LArCompactSubsetConstFebPair
 This acts like a FEB ID/channel vector pair. More...
 
class  LArCompactSubsetVector
 This acts like a vector of FEB ID / channel vector pairs. More...
 
class  LArCompactSubsetVector::iterator
 Iterator class. More...
 
class  LArCompactSubsetVector::const_iterator
 const_iterator class. More...
 

Detailed Description

A more compact way of storing shape/ofc data.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
Apr, 2011 Conditions data are divided into ‘subsets’. Each subset acts as a vector of <FebId, ChannelVector> pairs, where ChannelVector acts as a vector of channel data.

For LArShapeP2 and LArOFCP1, each channel object holds two types of arrays of waves, indexed by time bin. This used to be represented as two vector<vector<float> >'s. This, however, results in a large overhead. So, instead, we combine the data for all channels within a subset into a single object. To preserve the existing interfaces, we need to define a set of proxy objects for accessing the data.

Note that some channels may be missing, so we need to allow for that without allocating the full data for that event.

As part of this we assume that within a subset:

We organize the data like this. We have two floats, giving the time offset and bin width. We have two integers, giving the number of time bins (chanSize) and the number of samples (nSamples).

We have vector of FEB IDs. The length of this vector corresponds to the number of pairs in the subset. We have a corresponding array indices. The channels corresponding to FEB index i have indices indices[i] through indices[i+1] (exclusive). (So there is one more element in indices than there is in feb ids.) Another array of integers, slots, is indexed by the channel index and time bin. This is -1 if no data are present here; otherwise, it gives a ‘slot’ number. Finally, the data themselves are in m_data. This is structured as fixed-size blocks of nWaves * nSamples floats, indexed by the slot number. Currently, nWaves is a compile-time constant of 2.

Here's a brief rundown of the classes here.

LArCompactSubsetVector acts as the vector of pairs. It is also what holds all the data; to that end, it has some extra methods called by the other classes here to access the data. If you access an ‘element’ of this class, you get a...

LArCompactSubsetFebPair or LArCompactSubsetConstFebPair. These act like a pair; with ‘first’ being a reference to a FebId (non-const for the first variant and const for the second variant). ‘second’ is ...

LArCompactSubsetChannelVector, which acts like a vector of channel objects. This holds a pointer to the subset, as well as the feb index. For technical reasons, we also have a LArCompactSubsetChannelVectorPointer, which acts like a pointer to the previous class. If we dereference an element here, we get a...

LArCompactSubsetChannelProxy or LArCompactSubsetConstChannelProxy. This holds a subset pointer and a channel index. This is a proxy to the data for a single channel. We want to be able to use the class we get here as either a LArShapeP2 or a LArOFCP1. To really make that work, we'd need to duplicate all the code for the two cases (either manually or via templates). Since the two classes are really just the same except for the method names, we take the lazy way out here, and just give LArCompactSubsetChannelProxy the methods for both the Shape and OFC interfaces. We also turn out to need a LArCompactSubsetChannelPointer, which acts like a pointer to channel data.

Definition in file LArCompactSubset.h.