Skip to content
Snippets Groups Projects

LArHVData: put current and hv into the same obj, saves memory

Merged Walter Lampl requested to merge wlampl/athena:LArHVMapOptimize into master
5 files
+ 58
130
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -19,19 +19,15 @@ class LArHVData {
friend class LArHVCondAlg; //The conditions alg filling this object
public:
LArHVData() { }
~LArHVData () { }
LArHVData() = default;
~LArHVData () = default;
/** @brief struct for HV and weight pair
/** @brief struct for HV, current and weight
*/
struct HV_t {
HV_t(float ihv, float icurr, float iweight) :
hv(ihv),current(icurr),weight(iweight) {};
float hv;
float weight;
};
/** @brief struct for Current and weight pair
*/
struct CURRENT_t {
float current;
float weight;
};
@@ -40,19 +36,16 @@ class LArHVData {
/** brief Given a Offline Readout ID, return values of HV and Weight
*/
StatusCode getHV(const Identifier& id, std::vector< HV_t > & v ) const ;
/** Given a Offline Readout ID, return values of Current and Weight
*/
StatusCode getCurrent(const Identifier& id, std::vector< CURRENT_t > & v ) const ;
const std::vector<LArHVData::HV_t> & getHV(const Identifier& id) const;
typedef std::map<Identifier, std::vector<HV_t> > hvMap;
typedef std::map<Identifier, std::vector<CURRENT_t> > currMap;
private:
hvMap m_voltage;
currMap m_current;
std::set<Identifier> m_updatedCells;
const std::vector<LArHVData::HV_t> m_empty;
};
inline
Loading