ATLAS Offline Software
AthenaPoolTestMapData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
15 #ifndef ATHENAPOOLTESTDATA_ATHENAPOOLTESTMAPDATA_H
16 # define ATHENAPOOLTESTDATA_ATHENAPOOLTESTMAPDATA_H
17 
18 //<<<<<< INCLUDES >>>>>>
19 
21 #include <vector>
22 
23 //<<<<<< CLASS DECLARATIONS >>>>>>
24 
33 {
34 
35 public:
36  // A particle link, and the energy (charge) which its hits
37  // contribute to the current RDO.
38  typedef std::pair< AthenaPoolTestMapDataLink, float > Deposit;
39 
41  AthenaPoolTestMapData (const std::vector< Deposit >& deposits, int simDataWord = 0);
42  virtual ~AthenaPoolTestMapData();
43 
44  int word() const; // Get the packed simdata word
45 
46  void deposits(std::vector<Deposit>& deposits) const; // Get the Deposits
47  //std::vector< Deposit > getdeposits() const; // for some reason I can't get this to return by reference! It won't compile. EJWM
48 
49  const std::vector< Deposit >& getdeposits() const;
50 
51 private:
52 
53  int m_word;
54  // Deposit* m_p_deposits; but use vector meantime, needs more work
55  std::vector<Deposit> m_deposits;
56 };
57 
58 
59 //<<<<<< INLINE PUBLIC FUNCTIONS >>>>>>
60 //<<<<<< INLINE MEMBER FUNCTIONS >>>>>>
61 
62 inline int AthenaPoolTestMapData::word() const
63 {
64  return m_word & 0x1fffffff;
65 }
66 
67 inline const std::vector< AthenaPoolTestMapData::Deposit >& AthenaPoolTestMapData::getdeposits() const
68 {
69  return m_deposits;
70 }
71 
72 inline void AthenaPoolTestMapData::deposits(std::vector< AthenaPoolTestMapData::Deposit>& deposits) const
73 {
74  // I really don't understand what the point of this is ... it does EXACTLY the same as the getdeposits() method, just in a different way. EJWM
76  return;
77 }
78 
79 #endif // ATHENAPOOLTESTDATA_ATHENAPOOLTESTMAPDATA_H
AthenaPoolTestMapData::m_word
int m_word
Definition: AthenaPoolTestMapData.h:53
AthenaPoolTestMapData
Definition: AthenaPoolTestMapData.h:33
AthenaPoolTestMapData::AthenaPoolTestMapData
AthenaPoolTestMapData()
Definition: AthenaPoolTestMapData.cxx:20
AthenaPoolTestMapData::deposits
void deposits(std::vector< Deposit > &deposits) const
Definition: AthenaPoolTestMapData.h:72
AthenaPoolTestMapData::Deposit
std::pair< AthenaPoolTestMapDataLink, float > Deposit
Definition: AthenaPoolTestMapData.h:38
AthenaPoolTestMapData::~AthenaPoolTestMapData
virtual ~AthenaPoolTestMapData()
Definition: AthenaPoolTestMapData.cxx:33
AthenaPoolTestMapData::word
int word() const
Definition: AthenaPoolTestMapData.h:62
AthenaPoolTestMapData::m_deposits
std::vector< Deposit > m_deposits
Definition: AthenaPoolTestMapData.h:55
AthenaPoolTestMapData::getdeposits
const std::vector< Deposit > & getdeposits() const
Definition: AthenaPoolTestMapData.h:67