Commit in lcdd on MAIN | |||
include/lcdd/detectors/CellReadout.hh | +2 | -2 | 1.4 -> 1.5 |
/CellReadout2D.hh | +2 | -2 | 1.4 -> 1.5 |
include/lcdd/geant4/LCDDHeaderRecord.hh | +153 | -47 | 1.2 -> 1.3 |
/PhysVolId.hh | +47 | -15 | 1.2 -> 1.3 |
/PhysVolIdMap.hh | +19 | -11 | 1.3 -> 1.4 |
/PhysicsLimitSet.hh | +85 | -18 | 1.1 -> 1.2 |
/UserRegionInformation.hh | +55 | -12 | 1.1 -> 1.2 |
include/lcdd/hits/CalorimeterHit.hh | +108 | -9 | 1.1 -> 1.2 |
/HitContribution.hh | +2 | -2 | 1.1 -> 1.2 |
/TrackInformation.hh | +150 | -22 | 1.2 -> 1.3 |
/TrackerHit.hh | +108 | -1 | 1.1 -> 1.2 |
include/lcdd/id/Id64bit.hh | +32 | -3 | 1.1 -> 1.2 |
/IdComparator.hh | +20 | -3 | 1.3 -> 1.4 |
/IdFactory.hh | +57 | -25 | 1.2 -> 1.3 |
/IdField.hh | +64 | -19 | 1.1 -> 1.2 |
/IdManager.hh | +75 | -12 | 1.1 -> 1.2 |
/IdSpec.hh | +102 | -30 | 1.1 -> 1.2 |
/IdVec.hh | +65 | -29 | 1.1 -> 1.2 |
src/lcdd/bfield/Cartesian3DMagneticFieldMap.cc | +1 | 1.1 -> 1.2 | |
src/lcdd/detectors/CalorimeterSD.cc | +2 | -2 | 1.2 -> 1.3 |
/OpticalCalorimeterSD.cc | +2 | -2 | 1.1 -> 1.2 |
/UnsegmentedCalorimeterSD.cc | +2 | -2 | 1.1 -> 1.2 |
src/lcdd/geant4/PhysicsLimitSet.cc | +19 | -19 | 1.1 -> 1.2 |
src/lcdd/hits/CalorimeterHit.cc | +2 | -2 | 1.1 -> 1.2 |
src/lcdd/id/IdFactory.cc | +2 | -2 | 1.2 -> 1.3 |
/IdSpec.cc | +3 | -3 | 1.1 -> 1.2 |
/IdVec.cc | +13 | -8 | 1.1 -> 1.2 |
+1192 | -302 |
add yet more doxygen doc; some method and variable renaming
diff -u -r1.4 -r1.5 --- CellReadout.hh 2 Jul 2013 21:19:44 -0000 1.4 +++ CellReadout.hh 3 Jul 2013 23:00:45 -0000 1.5 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/CellReadout.hh,v 1.4 2013/07/02 21:19:44 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/CellReadout.hh,v 1.5 2013/07/03 23:00:45 jeremy Exp $
#ifndef LCDD_DETECTORS_CELLREADOUT_HH #define LCDD_DETECTORS_CELLREADOUT_HH 1
@@ -10,7 +10,7 @@
/** * This is a pure virtual base class for calorimeter cell readouts to implement.
- * @fixme Move to DDSegmentation package.
+ * @todo Move to DDSegmentation package.
*/ class CellReadout {
diff -u -r1.4 -r1.5 --- CellReadout2D.hh 2 Jul 2013 22:57:42 -0000 1.4 +++ CellReadout2D.hh 3 Jul 2013 23:00:45 -0000 1.5 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/CellReadout2D.hh,v 1.4 2013/07/02 22:57:42 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/CellReadout2D.hh,v 1.5 2013/07/03 23:00:45 jeremy Exp $
#ifndef LCDD_DETECTORS_CELLREADOUT2D_HH #define LCDD_DETECTORS_CELLREADOUT2D_HH 1
@@ -12,7 +12,7 @@
/** * @brief A concrete implementation of CellReadout using a 2D grid.
- * @fixme Move to DDSegmentation package.
+ * @todo Move to DDSegmentation package.
*/ class CellReadout2D: public CellReadout {
diff -u -r1.2 -r1.3 --- LCDDHeaderRecord.hh 1 Jul 2013 21:00:42 -0000 1.2 +++ LCDDHeaderRecord.hh 3 Jul 2013 23:00:46 -0000 1.3 @@ -1,154 +1,260 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/geant4/LCDDHeaderRecord.hh,v 1.2 2013/07/01 21:00:42 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/geant4/LCDDHeaderRecord.hh,v 1.3 2013/07/03 23:00:46 jeremy Exp $
#ifndef LCDD_GEANT4_LCDDHEADERRECORD_HH #define LCDD_GEANT4_LCDDHEADERRECORD_HH 1 /**
- * @brief Header record of detector info.
+ * This is the header record for an LCDD geometry. + * @todo Move code to source file.
*/ class LCDDHeaderRecord { public:
+ /** + * Class constructor. + */ + LCDDHeaderRecord() + { + ; + } + + /** + * Class destructor. + */ + virtual ~LCDDHeaderRecord() + { + ; + } + +public: + + /** + * Set the name of the detector. + * @param[in] dn The name of the detector. + */
void setDetectorName(const std::string& dn) {
- m_detectorName = dn;
+ _detectorName = dn;
}
+ /** + * Set the version of the detector. + * @param[in] dv The detector version. + */
void setDetectorVersion(const std::string& dv) {
- m_detectorVersion = dv;
+ _detectorVersion = dv;
}
+ /** + * Set the URL of the input LCDD file. + * @param[in] u The URL of the input file. + */
void setDetectorUrl(const std::string& u) {
- m_detectorUrl = u;
+ _detectorUrl = u;
}
+ /** + * Set the author name. + * @param[in] an The author name. + */
void setAuthorName(const std::string& an) {
- m_authorName = an;
+ _authorName = an;
}
+ /** + * Set the generator name. + * @param[in] gn The generator name. + */
void setGeneratorName(const std::string& gn) {
- m_generatorName = gn;
+ _generatorName = gn;
}
+ /** + * Set the generator version. + * @param[in] gv The generator version. + */
void setGeneratorVersion(const std::string& gv) {
- m_generatorVersion = gv;
+ _generatorVersion = gv;
}
+ /** + * Set the generator checksum. + * @param[in] c The generator checksum. + */
void setGeneratorChecksum(const std::string& c) {
- m_generatorChecksum = c;
+ _generatorChecksum = c;
}
+ /** + * Set the generator input file. + * @param[in] gurl The generator file. + */
void setGeneratorFile(const std::string& gurl) {
- m_generatorFile = gurl;
+ _generatorFile = gurl;
}
+ /** + * Set the author email. + * @param[in] ae The author email. + */
void setAuthorEmail(const std::string& ae) {
- m_authorEmail = ae;
+ _authorEmail = ae;
}
+ /** + * Set the comment. + * @param[in] c The comment. + */
void setComment(const std::string& c) {
- m_comment = c;
+ _comment = c;
}
+ /** + * Set the checksum. + * @param[in] c The checksum. + */
void setChecksum(const std::string& c) {
- m_generatorChecksum = c;
+ _generatorChecksum = c;
}
+ /** + * Get the detector name. + * @return The detector name. + */
const std::string& getDetectorName() const {
- return m_detectorName;
+ return _detectorName;
}
+ /** + * Get the detector version. + * @return The detector version. + */
const std::string& getDetectorVersion() const {
- return m_detectorVersion;
+ return _detectorVersion;
}
+ /** + * Get the detector URL. + * @return The detector URL. + */
const std::string& getDetectorUrl() const {
- return m_detectorUrl;
+ return _detectorUrl;
}
+ /** + * Get the comment. + * @return The comment. + */
const std::string& getComment() const {
- return m_comment;
+ return _comment;
}
+ /** + * Get the author name. + * @return The author name. + */
const std::string& getAuthorName() const {
- return m_authorName;
+ return _authorName;
}
+ /** + * Get the author email. + * @return The author email. + */
const std::string& getAuthorEmail() const {
- return m_authorEmail;
+ return _authorEmail;
}
+ /** + * Get the generator name. + * @return The generator name. + */
const std::string& getGeneratorName() const {
- return m_generatorName;
+ return _generatorName;
}
+ /** + * Get the generator version. + * @return The generator version. + */
const std::string& getGeneratorVersion() const {
- return m_generatorVersion;
+ return _generatorVersion;
}
+ /** + * Get the generator file name. + * @return The generator file name. + */
const std::string& getGeneratorFile() const {
- return m_generatorFile;
+ return _generatorFile;
}
+ /** + * Get the generator checksum. + * @return The generator checksum. + */
const std::string& getGeneratorChecksum() const {
- return m_generatorChecksum;
+ return _generatorChecksum;
}
- void printOut(std::ostream &os)
+ /** + * Print out the header information. + * @param[in] os The output stream. + * @return The same output stream. + */ + std::ostream& printOut(std::ostream &os)
{ os << std::endl << "***** LCDD Header *****" << std::endl;
- os << "detectorName <" << m_detectorName << ">" << std::endl; - os << "detectorVersion <" << m_detectorVersion << ">" << std::endl; - os << "detectorUrl <" << m_detectorUrl << ">" << std::endl; - os << "authorName <" << m_authorName << ">" << std::endl; - os << "authorEmail <" << m_authorEmail << ">" << std::endl; - os << "generatorName <" << m_generatorName << ">" << std::endl; - os << "generatorVersion <" << m_generatorVersion << ">" << std::endl; - os << "generatorFile <" << m_generatorFile << ">" << std::endl; - os << "generatorChecksum <" << m_generatorChecksum << ">" << std::endl; - os << "comment" << std::endl << m_comment << std::endl << "end comment" << std::endl;
+ os << "detectorName <" << _detectorName << ">" << std::endl; + os << "detectorVersion <" << _detectorVersion << ">" << std::endl; + os << "detectorUrl <" << _detectorUrl << ">" << std::endl; + os << "authorName <" << _authorName << ">" << std::endl; + os << "authorEmail <" << _authorEmail << ">" << std::endl; + os << "generatorName <" << _generatorName << ">" << std::endl; + os << "generatorVersion <" << _generatorVersion << ">" << std::endl; + os << "generatorFile <" << _generatorFile << ">" << std::endl; + os << "generatorChecksum <" << _generatorChecksum << ">" << std::endl; + os << "comment" << std::endl << _comment << std::endl << "end comment" << std::endl;
os << "***********************" << std::endl << std::endl;
+ return os;
} private:
- std::string m_detectorName; - std::string m_detectorVersion; - std::string m_detectorUrl; - - std::string m_generatorName; - std::string m_generatorVersion; - std::string m_generatorFile; - std::string m_generatorChecksum; - - std::string m_authorName; - std::string m_authorEmail; - - std::string m_comment;
+ std::string _detectorName; + std::string _detectorVersion; + std::string _detectorUrl; + std::string _generatorName; + std::string _generatorVersion; + std::string _generatorFile; + std::string _generatorChecksum; + std::string _authorName; + std::string _authorEmail; + std::string _comment;
}; #endif
diff -u -r1.2 -r1.3 --- PhysVolId.hh 1 Jul 2013 21:00:42 -0000 1.2 +++ PhysVolId.hh 3 Jul 2013 23:00:46 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/geant4/PhysVolId.hh,v 1.2 2013/07/01 21:00:42 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/geant4/PhysVolId.hh,v 1.3 2013/07/03 23:00:46 jeremy Exp $
#ifndef LCDD_GEANT4_PHYSVOLID_HH #define LCDD_GEANT4_PHYSVOLID_HH 1
@@ -7,63 +7,95 @@
#include <vector> /**
- * @brief Simulator class for physical volume IDs.
+ * This is a class representing physical volume IDs that are attached to individual G4VPhysicalVolume objects.
*/ class PhysVolId {
+
public: typedef int ValueType; typedef std::vector<PhysVolId> PhysVolIds; public:
- PhysVolId() - { - } -
+ /** + * Class constructor. + */ + //PhysVolId() + //{ + //} + + /** + * Class constructor. + * @param[in] val The value of the ID. + * @param[in] fld The name of the ID. + */
PhysVolId(ValueType val, std::string fld) :
- m_value(val), m_fieldName(fld)
+ _value(val), _fieldName(fld)
{ }
+ /** + * Class destructor. + */
virtual ~PhysVolId() { }
+public: + + /** + * Get the value of the ID. + * @return The value of the ID. + */
ValueType getValue() const {
- return m_value;
+ return _value;
}
+ /** + * Get the name of the field. + * @return The name of the field. + */
const std::string& getFieldName() const {
- return m_fieldName;
+ return _fieldName;
}
+ /*
void setFieldName(const std::string& fn) {
- m_fieldName = fn;
+ _fieldName = fn;
} void setValue(ValueType vt) {
- m_value = vt;
+ _value = vt;
}
+ */
+ /** + * Compare this PhysVolId to another based on their values. + * @return True if ID values are equal; false if not. + */
bool operator==(const PhysVolId& right) {
- return (m_value == right.m_value);
+ return (_value == right._value);
}
+ /** + * Compare this PhysVolId to a value. + * @return True if value is equal to this ID; false if not. + */
bool operator==(ValueType vt) {
- return (m_value == vt);
+ return (_value == vt);
} private:
- ValueType m_value; - std::string m_fieldName;
+ ValueType _value; + std::string _fieldName;
}; #endif
diff -u -r1.3 -r1.4 --- PhysVolIdMap.hh 1 Jul 2013 22:10:34 -0000 1.3 +++ PhysVolIdMap.hh 3 Jul 2013 23:00:46 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/geant4/PhysVolIdMap.hh,v 1.3 2013/07/01 22:10:34 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/geant4/PhysVolIdMap.hh,v 1.4 2013/07/03 23:00:46 jeremy Exp $
#ifndef LCDD_GEANT4_PHYSVOLTOIDMAP_HH #define LCDD_GEANT4_PHYSVOLTOIDMAP_HH 1
@@ -13,19 +13,22 @@
#include <vector> #include <map>
-/** - * @brief Maps G4 physical volume ptrs to a vector of associated ints for IDing. - */
+/** Maps G4 physical volume ptrs to a vector of associated ints for IDing. */
typedef std::map<G4VPhysicalVolume*, PhysVolId::PhysVolIds> PhysVolIdMapType; /**
- * @brief Maps pointers of G4VPhysicalVolume objects to PhysVolIds.
+ * This class maps pointers of G4VPhysicalVolume objects to PhysVolIds.
*/ class PhysVolIdMap: private PhysVolIdMapType { public:
+ /** + * Add an ID with a volume key. + * @param[in] pv The G4VPhysicalVolume object. + * @param[in] id The ID associated with the volume. + */
void addPhysVolId(G4VPhysicalVolume* pv, PhysVolId id) { if (!hasPhysVolIds(pv)) {
@@ -36,24 +39,29 @@
idvec.push_back(id); }
+ /** + * Add an empty ID container for a volume key. + * @param[in] pv The volume key. + */
void createPhysVolIds(G4VPhysicalVolume* pv) { PhysVolId::PhysVolIds pvid; (*this)[pv] = pvid; }
- /* - Has vec has been pushed? Does not check whether it is empty, - which caller should check.
+ /** + * Check whether the volume has a key in the map. + * @param[in] pv The G4VPhysicalVolume object. + * @return True if the volume has a key; false if not.
*/ bool hasPhysVolIds(G4VPhysicalVolume* pv) const { return (this->find(pv) != this->end()); }
- /* - The returned ref is not const, because caller can add elements. - Function is not const, because might need to create it on the fly.
+ /** + * Get the PhysVolId objects associated with the volume key. + * @return The list of PhysVolId objects associated with the volume key.
*/ PhysVolId::PhysVolIds& getPhysVolIds(G4VPhysicalVolume* pv) {
diff -u -r1.1 -r1.2 --- PhysicsLimitSet.hh 1 Jul 2013 21:00:42 -0000 1.1 +++ PhysicsLimitSet.hh 3 Jul 2013 23:00:46 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/geant4/PhysicsLimitSet.hh,v 1.1 2013/07/01 21:00:42 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/geant4/PhysicsLimitSet.hh,v 1.2 2013/07/03 23:00:46 jeremy Exp $
#ifndef LCDD_GEANT4_LIMITSET_HH #define LCDD_GEANT4_LIMITSET_HH 1
@@ -17,10 +17,13 @@
class PhysicsLimitSet: public G4UserLimits {
+
public:
+
typedef G4String ParticleType; typedef G4String LimitNameType; typedef G4double LimitValueType;
+
typedef std::map<ParticleType, LimitValueType> LimitMap; typedef std::map<LimitNameType, LimitMap> LimitSetMap; typedef const G4String& LimitNameKeyType;
@@ -42,48 +45,112 @@
static const LimitValueType RANGE_MIN_DEFAULT; public:
+ + /** + * Class constructor. + * @param[in] name The name of the PhysicsLimitSet. + */
PhysicsLimitSet(const G4String& name);
+ + /** + * Class destructor. + */
virtual ~PhysicsLimitSet(); public:
+ /** + * Get the limit set map. + * @return The limit set map. + */
const LimitSetMap& getLimitSetMap() const {
- return m_limitsMap;
+ return _limitsMap;
}
- virtual G4double GetMaxAllowedStep(const G4Track&); - virtual G4double GetUserMaxTrackLength(const G4Track&); - virtual G4double GetUserMaxTime(const G4Track&); - virtual G4double GetUserMinEkine(const G4Track&); - virtual G4double GetUserMinRange(const G4Track&);
+ /** + * Get the max allowed step length. + * @param[in] track A G4Track object. + * @return The max allowed step length (mm). + */ + virtual G4double GetMaxAllowedStep(const G4Track& track); + + /** + * Get the max length. + * @param[in] track A G4Track object. + * @return The max allowed track length (mm). + */ + virtual G4double GetUserMaxTrackLength(const G4Track& track); + + /** + * Get the max time. + * @param[in] track A G4Track object. + * @return The max allowed time for the track. + */ + virtual G4double GetUserMaxTime(const G4Track& track); + + /** + * Get the min kinetic energy. + * @param[in] track A G4Track object. + * @return The min kinetic energy. + */ + virtual G4double GetUserMinEkine(const G4Track& track); + + /** + * Get the min range. + * @param[in] track A G4Track object. + * @return The min range. + */ + virtual G4double GetUserMinRange(const G4Track& track);
- /* Set limits by particle type. */
+ /* + * Set physics limits by particle type. + */
void setLimitForParticle(LimitNameType limitName, ParticleType particleType, LimitValueType limitValue);
- void setName(const G4String& n);
+ /** + * Set the name of this PhysicsLimitSet. + * + */ + //void setName(const G4String& n); + + /** + * Get the name of the PhysicsLimitSet. + * @return The name of this PhysicsLimitSet. + */
G4String& getName(); private: /** * Get the limit value for a particular particle type.
- * @param limitName The name of the limit type (1 of 5 valid types). - * @param particleType Type, e.g. name, of the Geant4 particle. - * @return Value of the limit or LIMIT_NOT_SET if no key exists and ANY_PARTICLE is also not set.
+ * @param[in] limitName The name of the limit type (1 of 5 valid types). + * @param[in] particleType The name of the Geant4 particle. + * @return Value of the limit, or LIMIT_NOT_SET if no key exists and ANY_PARTICLE is also not set.
*/ LimitValueType getLimitForParticle(LimitNameType limitName, ParticleType particleType = ANY_PARTICLE);
- LimitValueType getLimitForParticle(LimitNameType limitName, const G4Track&);
+ /** + * Get the limit value from a track. + * @param[in] limitName The name of the limit. + * @param[in] track A G4Track object. + */ + LimitValueType getLimitForParticle(LimitNameType limitName, const G4Track& track);
- const ParticleType getParticleType(const G4Track&);
+private:
-protected:
+ /** + * Get the particle type from a track. + * @param[in] track A G4Track object. + * @return The particle type. + */ + const ParticleType getParticleType(const G4Track& track);
- /* Map of ( limitName -> particleName -> limitValue ). */ - LimitSetMap m_limitsMap;
+protected:
- G4String m_name;
+ /** A map of limitName => particleName => limitValue */ + LimitSetMap _limitsMap; + G4String _name;
}; #endif
diff -u -r1.1 -r1.2 --- UserRegionInformation.hh 1 Jul 2013 21:00:42 -0000 1.1 +++ UserRegionInformation.hh 3 Jul 2013 23:00:46 -0000 1.2 @@ -1,4 +1,4 @@
-//$Header: /cvs/lcd/lcdd/include/lcdd/geant4/UserRegionInformation.hh,v 1.1 2013/07/01 21:00:42 jeremy Exp $
+//$Header: /cvs/lcd/lcdd/include/lcdd/geant4/UserRegionInformation.hh,v 1.2 2013/07/03 23:00:46 jeremy Exp $
#ifndef LCDD_GEANT4_USERREGIONINFORMATION_HH #define LCDD_GEANT4_USERREGIONINFORMATION_HH 1
@@ -13,76 +13,119 @@
#include <string> /**
- * @brief Implementation of G4VUserRegionInformation.
+ * This class implements the G4VUserRegionInformation interface.
*/ class UserRegionInformation: public G4VUserRegionInformation { public:
+ /** + * Class constructor. + */
UserRegionInformation() : _storeSecondaries(false), _killTracks(false) { }
+ /** + * Class destructor. + */
virtual ~UserRegionInformation() { } public:
+ /** + * Set whether secondary tracks will be stored in this region. + * @param[in] b The store secondaries setting. + */
void setStoreSecondaries(bool b) { _storeSecondaries = b; }
+ /** + * Get store secondaries setting which determines if secondary tracks are stored in this region. + * @return The store secondaries setting. + */
bool getStoreSecondaries() const { return _storeSecondaries; }
+ /** + * Set parameter to kill tracks after their first step into the region. + * @param[in] killTracks The kill tracks setting. + */
void setKillTracks(bool killTracks) { _killTracks = killTracks; }
+ /** + * Get the kill tracks setting. + * @return The kill tracks setting. + */
bool getKillTracks() const { return _killTracks; }
- void setThreshold(G4double t)
+ /** + * Set the energy threshold. + * @param[in] t The energy threshold. + */ + void setThreshold(double t)
{ _threshold = t; }
- G4double getThreshold() const
+ /** + * Get the energy threshold. + * @return The energy threshold. + */ + double getThreshold() const
{ return _threshold; }
- // region info from track
+ /** + * Print out the region information. + * @todo Implement this method. + */ + void Print() const + { + } + +public: + + /** + * A utility method for getting the region information from a track. + * @param[in] aTrack A G4Track object. + * @return The region information. + */
static inline UserRegionInformation* getRegionInformation(const G4Track* aTrack) { return static_cast<UserRegionInformation*>(aTrack->GetLogicalVolumeAtVertex()->GetRegion()->GetUserInformation()); }
- // region info from step point
+ /** + * A utility method for getting the region information from a step point. + * @param[in] aStepPoint A G4StepPoint object. + * @return The region information. + */
static UserRegionInformation* getRegionInformation(const G4StepPoint* aStepPoint) { return static_cast<UserRegionInformation*>(aStepPoint->GetPhysicalVolume()->GetLogicalVolume()->GetRegion()->GetUserInformation()); }
- void Print() const - { - } -
private: bool _storeSecondaries; bool _killTracks;
- - G4double _threshold;
+ double _threshold;
}; #endif
diff -u -r1.1 -r1.2 --- CalorimeterHit.hh 1 Jul 2013 21:00:42 -0000 1.1 +++ CalorimeterHit.hh 3 Jul 2013 23:00:46 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/hits/CalorimeterHit.hh,v 1.1 2013/07/01 21:00:42 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/hits/CalorimeterHit.hh,v 1.2 2013/07/03 23:00:46 jeremy Exp $
#ifndef LCDD_HITS_CALORIMETERHIT_HH #define LCDD_HITS_CALORIMETERHIT_HH 1
@@ -18,89 +18,182 @@
#include <iostream> /**
- * @brief Implementation of G4VHit for calorimeter-type hits.
+ * This class implements G4VHit for calorimeter hits. + * @todo Move code to source file.
*/ class CalorimeterHit: public G4VHit { public:
+ /** + * Class constructor. + */
CalorimeterHit();
+ + /** + * Class destructor. + */ + virtual ~CalorimeterHit(); + + /** + * Copy constructor. + */
CalorimeterHit(const CalorimeterHit &right);
+ + /** + * Qualified constructor. + * @param[in] edep The hit's energy deposition. + * @param[in] globalCellPos The hit's global position. + */
CalorimeterHit(G4double edep, G4ThreeVector globalCellPos);
- virtual ~CalorimeterHit();
+ /** + * Operator overloading for setting contents from another hit. + */
const CalorimeterHit& operator=(const CalorimeterHit &right);
+ + /** + * Operator overloading for comparison of hits. + */
bool operator==(const CalorimeterHit &right);
+ + /** + * Custom new method. + */
inline void *operator new(size_t);
+ + /** + * Custom delete method. + */
inline void operator delete(void *aHit); #ifdef G4VIS_USE void Draw(); #endif
- void printMcpHitContribs(std::ostream&);
+ /** + * Print the hit contributions. + * @param[in] os The output stream. + */ + void printMcpHitContribs(std::ostream& os); + + /** + * Print the hit contribution header. + * @param[in] os The output stream. + */
void printMcpHitContribsHeader(std::ostream&);
+ /** + * Print the contents of this hit. + */
void Print(); public:
+ /** + * Operator overloading of stream operator for printing. + * @param[in] os The output stream. + * @param[in] hit The hit to print. + */
friend std::ostream& operator<<(std::ostream &os, const CalorimeterHit& hit);
+ /** + * Set the hit's position. + * @param[in] posXYZ The hit's global position. + */
void setPos(const G4ThreeVector& posXYZ) { m_pos = posXYZ; }
+ /** + * Set the energy deposition. + * @param[in] ed The energy deposition (GeV). + */
void setEdep(const G4double ed) { m_edep = ed; }
+ /** + * Increment the energy deposition by some amount. + * @param[in] edincr The amount to increment the energy (GeV). + */
void incrEdep(const G4double edincr) { m_edep += edincr; }
+ /** + * Get the global position of the hit. + * @return The global position of the hit. + */
G4ThreeVector getPos() const { return m_pos; }
+ /** + * Get the energy deposition of this hit. + * @return The hit's energy deposition. + */
G4double getEdep() const { return m_edep; }
- void addMcpHitContrib(HitContribution contrib)
+ /** + * Add a hit contribution. + * @param[id] contrib The hit contribution. + */ + void addHitContribution(HitContribution contrib)
{ m_particleList.push_back(contrib); }
- const McpHitContribList& getMcpHitContribList() const
+ /** + * Get the list of hit contributions. + * @return The list of hit contributions. + */ + const HitContributionList& getHitContributions() const
{ return m_particleList; }
- // set value of 64 bit id
+ /** + * Set the value of the 64-bit ID. + * @param[id] id0 The first 32 bits of the ID. + * @param[id] id1 The second 32 bits of the ID. + */
void setId64bit(Id64bit::ElementType id0, Id64bit::ElementType id1) { m_id64.setId0(id0); m_id64.setId1(id1); }
- // get 64 bit id
+ /** + * Get the 64-bit ID. + * @return The 64-bit ID. + */
const Id64bit& getId64bit() const { return m_id64; }
+ /** + * Set the endcap flag. + * @param[id] ec The endcap flag. + */
void setEndcapFlag(bool ec = true) { m_endcap = ec; }
+ /** + * Get the endcap flag. + * @return The endcap flag. + */
bool getEndcapFlag() { return m_endcap;
@@ -121,13 +214,16 @@
bool m_endcap; // List of contributions by MCParticle.
- McpHitContribList m_particleList;
+ HitContributionList m_particleList;
}; typedef G4THitsCollection<CalorimeterHit> (G4CalorimeterHitsCollection); extern G4Allocator<CalorimeterHit> G4CalorimeterHitAllocator;
+/** + * Implementation of custom new operator. + */
inline void* CalorimeterHit::operator new(size_t) { void* aHit;
@@ -135,6 +231,9 @@
return aHit; }
+/** + * Implementation of custom delete operator. + */
inline void CalorimeterHit::operator delete(void *aHit) { G4CalorimeterHitAllocator.FreeSingle((CalorimeterHit*) aHit);
diff -u -r1.1 -r1.2 --- HitContribution.hh 1 Jul 2013 21:00:42 -0000 1.1 +++ HitContribution.hh 3 Jul 2013 23:00:46 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/hits/HitContribution.hh,v 1.1 2013/07/01 21:00:42 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/hits/HitContribution.hh,v 1.2 2013/07/03 23:00:46 jeremy Exp $
#ifndef LCDD_HITS_HITCONTRIBUTION_HH #define LCDD_HITS_HITCONTRIBUTION_HH 1
@@ -85,6 +85,6 @@
float m_position[3]; };
-typedef std::vector<HitContribution> McpHitContribList;
+typedef std::vector<HitContribution> HitContributionList;
#endif
diff -u -r1.2 -r1.3 --- TrackInformation.hh 1 Jul 2013 21:00:42 -0000 1.2 +++ TrackInformation.hh 3 Jul 2013 23:00:46 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/hits/TrackInformation.hh,v 1.2 2013/07/01 21:00:42 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/hits/TrackInformation.hh,v 1.3 2013/07/03 23:00:46 jeremy Exp $
#ifndef LCDD_HITS_TRACKINFORMATION_HH #define LCDD_HITS_TRACKINFORMATION_HH 1
@@ -8,131 +8,253 @@
#include "G4Allocator.hh" /**
- * @brief Implements G4VUserTrackInformation.
+ * This class implements the G4VUserTrackInformation interface. + * @todo Move code to source file.
*/ class TrackInformation: public G4VUserTrackInformation { public:
+ /** + * Tracking status flag. + */
enum ETrackingStatus {
- eNone, eInTrackingRegion, eInNontrackingRegion
+ eNone, + eInTrackingRegion, + eInNontrackingRegion
}; public:
- TrackInformation(); - TrackInformation(const G4Track* aTrack); - TrackInformation(const TrackInformation* aTrackInfo); - virtual ~TrackInformation();
- void setDefaults();
+ /** + * Class constructor. + */ + TrackInformation();
- static void setFromTrackInformation(const TrackInformation* srcTrkInfo, TrackInformation* trgtTrkInfo);
+ /** + * Class destructor. + */ + virtual ~TrackInformation();
- static inline TrackInformation* getTrackInformation(const G4Track* aTrack) - { - return static_cast<TrackInformation*>(aTrack->GetUserInformation()); - }
+ /** + * Copy constructor from the information of another track. + */ + TrackInformation(const G4Track* aTrack);
- static inline TrackInformation* getTrackInformation(const G4Step* aStep) - { - return getTrackInformation(aStep->GetTrack()); - }
+ /** + * Copy constructor from another track information object. + */ + TrackInformation(const TrackInformation* aTrackInfo);
+ /** + * Custom new operator. + */
inline void *operator new(size_t);
+ + /** + * Custom delete operator. + */
inline void operator delete(void *aTrackInfo);
+ + /** + * Overloaded equals operator. + */
inline int operator ==(const TrackInformation& right) const { return (this == &right); }
+ /** + * Overloaded assignment operator for copying. + */
TrackInformation& operator =(const TrackInformation& right);
- // from G4
+ /** + * Print out the track information. + * @todo Implement this method. + */
virtual void Print() const { }
- // get str of tracking status from enum - static const std::string& getTrackingStatusString(ETrackingStatus ts);
+ /** + * Get the string of the status. + * @return The tracking status string. + */
const std::string& getTrackingStatusString() const { return TrackInformation::getTrackingStatusString(getTrackingStatus()); }
-public: -
+ /** + * Get the original track ID. + * @return The original track ID. + */
inline G4int getOriginalTrackID() const { return m_originalTrackID; }
+ /** + * Get the original tracking status. + * @return The original tracking status. + */
inline ETrackingStatus getOriginalTrackingStatus() const { return m_originalTrackingStatus; }
+ /** + * Get the tracking status. + * @return The tracking status. + */
inline ETrackingStatus getTrackingStatus() const { return m_trackingStatus; }
+ /** + * Check if there is a hit on the track. + * @return True if this is a hit on the track; false if not. + */
inline bool hasTrackerHit() const { return m_hasTrackerHit; }
+ /** + * Set has tracker hit. + * @param[id] hasHit Set has tracker hit. + */
inline void setHasTrackerHit(bool hasHit = true) { m_hasTrackerHit = hasHit; }
+ /** + * Set the track ID. + * @param[id] id The track ID. + */
inline void setTrackID(G4int id) { m_originalTrackID = id; }
+ /** + * Set the tracking status. + * @param[id] st The tracking status. + */
inline void setTrackingStatus(ETrackingStatus st) { m_trackingStatus = st; }
+ /** + * Set the original tracking status. + * @param[id] st The tracking status. + */
inline void setOriginalTrackingStatus(ETrackingStatus st) { m_originalTrackingStatus = st; }
+ /** + * Set vertex not endpoint of parent. + * @param[id] val Vertex not endpoint setting. + */
inline void setVertexIsNotEndpointOfParent(bool val = true) { m_vertexIsNotEndpointOfParent = val; }
+ /** + * Get vertex not endpoint of parent setting. + * @return True if vertex not endpoint of parent; false if not. + */
inline bool getVertexIsNotEndpointOfParent() const { return m_vertexIsNotEndpointOfParent; }
+ /** + * Set backscatter setting. + * @param[id] val The backscatter setting. + */
inline void setBackscatter(bool val = true) { m_backscatter = val; }
+ /** + * Get the backscatter setting. + * @return The backscatter setting. + */
inline bool getBackscatter() const { return m_backscatter; }
+ /** + * Set the below threshold setting. + * @param[id] val The below threshold setting. + */
inline void setBelowThreshold(bool val = true) { m_belowThreshold = val; }
+ /** + * Get the below threshold setting. + * @return True if below threshold; false if not. + */
inline bool getBelowThreshold() const { return m_belowThreshold; }
+ /** + * Get the track information from a track. + * @param[in] aTrack The G4Track object. + * @return The track information of the track. + */ + static inline TrackInformation* getTrackInformation(const G4Track* aTrack) + { + return static_cast<TrackInformation*>(aTrack->GetUserInformation()); + } + + /** + * Get the track information a step. + * @param[in] aStep The G4Step object. + * @return The track information from the step. + */ + static inline TrackInformation* getTrackInformation(const G4Step* aStep) + { + return getTrackInformation(aStep->GetTrack()); + } + +private: + + /** + * Set parameters from another track information object. + * @param[id] srcTrackInfo The source track information. + * @param[id] trgtTrkInfo The target track information. + */ + static void setFromTrackInformation(const TrackInformation* srcTrkInfo, TrackInformation* trgtTrkInfo); + + /** + * Reset this track information to defaults. + */ + void setDefaults(); + + /** + * Convert a tracking status to a string. + * @param[id] ts The tracking status. + * @return The tracking status string. + */ + static const std::string& getTrackingStatusString(ETrackingStatus ts); +
private: G4int m_originalTrackID;
@@ -149,6 +271,9 @@
extern G4Allocator<TrackInformation> TrackInformationAllocator;
+/** + * Implementation of custom new operator. + */
inline void* TrackInformation::operator new(size_t) { void* aTrackInfo;
@@ -156,6 +281,9 @@
return aTrackInfo; }
+/** + * Implementation of custom delete operator. + */
inline void TrackInformation::operator delete(void *aTrackInfo) { TrackInformationAllocator.FreeSingle((TrackInformation*) aTrackInfo);
diff -u -r1.1 -r1.2 --- TrackerHit.hh 1 Jul 2013 21:00:42 -0000 1.1 +++ TrackerHit.hh 3 Jul 2013 23:00:46 -0000 1.2 @@ -1,3 +1,5 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/hits/TrackerHit.hh,v 1.2 2013/07/03 23:00:46 jeremy Exp $ +
#ifndef LCDD_HITS_TRACKERHIT_HH #define LCDD_HITS_TRACKERHIT_HH 1
@@ -12,18 +14,36 @@
#include "G4UnitsTable.hh" /**
- * @brief Simulation class for a tracker-type hit.
+ * A tracker hit class that implements the G4VHit interface. + * @todo Move code to source file.
*/ class TrackerHit: public G4VHit { public:
+ + /** + * Class constructor. + */
TrackerHit();
+ /** + * Class destructor. + */
virtual ~TrackerHit();
+ /** + * Custom new operator. + */
inline void *operator new(size_t);
+ + /** + * Custom delete operator. + */
inline void operator delete(void *aHit);
+ /** + * Draw this hit in Geant4 event display. + */
#ifdef G4VIS_USE void Draw(); #endif
@@ -32,71 +52,152 @@
public:
+ /** + * Custom stream operator for printing. + * @param[in] os The output stream. + * @param[in] hit The hit to print. + */
friend std::ostream& operator<<(std::ostream &os, const TrackerHit& hit);
+ /** + * Set the time of the hit. + * @param[in] tdep The time of the hit. + */
void setTdep(const G4double tdep) { m_tdep = tdep; }
+ + /** + * Set the energy deposition. + * @param[in] edep The energy deposition. + */
void setEdep(const G4double edep) { m_edep = edep; }
+ + /** + * Set the global position. + * @param[in] posXYZ The position in global coordinates (mm). + */
void setPos(const G4ThreeVector& posXYZ) { m_pos = posXYZ; }
+ + /** + * Set the momentum. + * @param[in] mom The hit's momentum. + */
void setMomentum(const G4ThreeVector& mom) { m_mom = mom; }
+ + /** + * Set the track ID. + * @param[in] trkID The track ID. + */
void setTrackID(const G4int trkID) { m_trkID = trkID; }
+ + /** + * Set the PDG. + * @param[in] pdg The PDG code. + */
void setPDG(const G4int pdg) { m_PDG = pdg; }
+ + /** + * Set the length of the step. + * @param[in] l The length of the step. + */
void setLength(const G4double l) { m_length = l; }
+ /** + * Get the global time of the hit. + * @return The global time of the hit (ns). + */
G4double getTdep() const { return m_tdep; }
+ + /** + * Get the energy deposition. + * @return The energy deposition. + */
G4double getEdep() const { return m_edep; }
+ + /** + * Set the global position. + * @return The global position. + */
G4ThreeVector getPos() const { return m_pos; }
+ + /** + * Get the momentum. + * @return The momentum. + */
G4ThreeVector getMomentum() const { return m_mom; }
+ + /** + * Get the track ID. + * @return The track ID. + */
G4int getTrackID() const { return m_trkID; }
+ + /** + * Get the PDG code. + * @return The PDG code. + */
G4int getPDG() const { return m_PDG; }
+ + /** + * Get the step length. + * @return The length of the step. + */
G4double getLength() const { return m_length; }
+ /** + * Set the ID. + * @param[id] id1 The ID. + */
void setId(Id64bit::ElementType id1) { m_id64.setId1(id1); }
+ /** + * Get the ID. + * @return The ID as an int. + */
int getId() { return m_id64.getId1();
@@ -120,6 +221,9 @@
extern G4Allocator<TrackerHit> G4TrackerHitAllocator;
+/** + * Implementation of custom new operator. + */
inline void* TrackerHit::operator new(size_t) { void* aHit;
@@ -127,6 +231,9 @@
return aHit; }
+/** + * Implementation of custom delete operator. + */
inline void TrackerHit::operator delete(void *aHit) { G4TrackerHitAllocator.FreeSingle((TrackerHit*) aHit);
diff -u -r1.1 -r1.2 --- Id64bit.hh 26 Jun 2013 01:32:46 -0000 1.1 +++ Id64bit.hh 3 Jul 2013 23:00:46 -0000 1.2 @@ -1,10 +1,10 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/id/Id64bit.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/Id64bit.hh,v 1.2 2013/07/03 23:00:46 jeremy Exp $
#ifndef LCDD_ID64BIT_HH #define LCDD_ID64BIT_HH 1 /**
- @class Id64bit - @brief Packed, 64-bit ID for Lcio output.
+ * A 64-bit bit ID. + * @todo Move code to source file.
*/ class Id64bit {
@@ -14,41 +14,70 @@
typedef int ElementType; public:
+ + /** + * Class constructor. + */
Id64bit() { resetIds(); }
+ /** + * Class destructor. + */
virtual ~Id64bit() { }
+ /** + * Set to default values. + */
void resetIds() { m_ids[0] = 0; m_ids[1] = 0; }
+ /** + * Set the first 32 bits of the ID. + * @param[id] id0 The first 32 bits of the ID. + */
void setId0(ElementType id0) { m_ids[0] = id0; }
+ /** + * Set the second 32 bits of the ID. + * @param[id] id1 The second 32 bits of the ID. + */
void setId1(ElementType id1) { m_ids[1] = id1; }
+ /** + * Get the first 32 bits of the ID. + * @return The first half of the ID. + */
ElementType getId0() const { return m_ids[0]; }
+ /** + * Get the second 32 bits of the ID. + * @return The second half of the ID. + */
ElementType getId1() const { return m_ids[1]; }
+ /** + * Overloaded equals operator. + */
bool operator==(const Id64bit& right) const { return (m_ids[0] == right.m_ids[0] && m_ids[1] == right.m_ids[1]);
diff -u -r1.3 -r1.4 --- IdComparator.hh 1 Jul 2013 22:10:34 -0000 1.3 +++ IdComparator.hh 3 Jul 2013 23:00:46 -0000 1.4 @@ -1,23 +1,40 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdComparator.hh,v 1.3 2013/07/01 22:10:34 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdComparator.hh,v 1.4 2013/07/03 23:00:46 jeremy Exp $
#ifndef LCDD_IDCOMPARATOR_HH #define LCDD_IDCOMPARATOR_HH 1 #include "lcdd/detectors/HitComparator.hh" /**
- * @brief Compare the IDs of two LCDD CalorimeterHit objects.
+ * This class compares the IDs of two CalorimeterHit objects for equality.
*/ class IdComparator: public HitComparator { public:
+ + /** + * Class constructor. + */ + IdComparator() + { + } + + /** + * Class destructor. + */
virtual ~IdComparator() { } public:
- virtual bool compare(const CalorimeterHit& hit1, const CalorimeterHit& hit2)
+ /** + * Compare the IDs of two CalorimeterHit objects. + * @param[id] hit1 The first hit. + * @param[id] hit2 The second hit. + * @return True if the hit's IDs are equal; false if not. + */ + bool compare(const CalorimeterHit& hit1, const CalorimeterHit& hit2)
{ return (hit1.getId64bit() == hit2.getId64bit()); }
diff -u -r1.2 -r1.3 --- IdFactory.hh 1 Jul 2013 21:00:42 -0000 1.2 +++ IdFactory.hh 3 Jul 2013 23:00:46 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdFactory.hh,v 1.2 2013/07/01 21:00:42 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdFactory.hh,v 1.3 2013/07/03 23:00:46 jeremy Exp $
#ifndef LCDD_IDFACTORY_HH #define LCDD_IDFACTORY_HH 1
@@ -21,9 +21,8 @@
class SensitiveDetector; /**
- @class IdFactory - @brief Produce int IDs based on stepping info. - @note Can also convert from an IdVec to Id64bit, packed ID.
+ * This factory class with only static methods produces IDs from step information. + * It can also convert from an unpacked IdVec to a 64 bit packed ID.
*/ class IdFactory {
@@ -33,53 +32,86 @@
static const Bits MASK_ON;
-public:
+private:
- virtual ~IdFactory()
+ /** + * Class constructor. Should not be instantiated. + */ + IdFactory()
{ }
-private: - - // class should not be instantiated - IdFactory()
+ /** + * Class destructor. + */ + virtual ~IdFactory()
{ } public:
- /* Create an Id64bit from the input IdVec and its matching specification. */
+ /* + * Create an Id64bit from the input IdVec and its matching specification. + * @param[in] idvec The vector of field values. + * @param[in] idspec The identifier specification. + */
static Id64bit createId64bit(const IdVec& idvec, IdSpec* idspec); /*
- * TJ's suggestion for making a bit mask. - * @param len length of mask
+ * Make bit mask of a certain length. + * @param[in] len The length of mask
*/ static inline Bits makeBitMask(IdField::SizeType len); /**
- * Check that the given value does not overflow the given mask. - * - * @return If overflow, then returns the bits outside the mask. Otherwise, returns 0.
+ * Check that the given value does not overflow the mask. + * @return If overflow, then returns the bits outside the mask else returns 0.
*/ static inline Bits checkOverflow(Id64bit::ElementType field_val, Bits mask);
- // create IdVec ordered by this SD's idspec, or empty vec if sd does not have an idspec
+ /** + * Create an IdVec ordered by the SD's idspec, or an empty vec if the SD does not have one. + * @param[in] aStep A G4Step object. + * @param[in] sd The SensitiveDetector object. + * @return The vector of ID field values. + */
static IdVec createOrderedIdVec(G4Step* aStep, const SensitiveDetector* sd);
- /* lkp bin value by field name in segmentation */ - static int findFieldIdxInSegmentation(Segmentation*, const std::string& field_name);
+ /** + * Lookup a bin value by field name in the Segmentation. + * @param[in] segmentation The Segmentation object. + * @param[in] field_name The name of the field. + * @return The index of the field in the Segmentation. + */ + static int findFieldIdxInSegmentation(Segmentation* segmentation, const std::string& fieldName);
- /* Check if PV list has PVid with given label. */ - static bool hasPhysVolId(const std::vector<G4VPhysicalVolume*>& pvs, const std::string& field_name);
+ /** + * Check if the volume list has a PhysVolId with the given label. + * @param[in] pvs The list of volumes. + * @param[in] fieldName The name of the field. + * @return True if there is a PhysVolId with given field name in the list; false if not. + */ + static bool hasPhysVolId(const std::vector<G4VPhysicalVolume*>& pvs, const std::string& fieldName);
- // lkp bin value by field name in PV ids - static int findIdInPhysVols(const std::vector<G4VPhysicalVolume*>& pvs, const std::string& field_name);
+ /** + * Lookup a field value by name from the a list of volumes. + * @param[in] pvs The list of volumes. + * @param[in] fieldName The name of the field. + */ + static int findIdInPhysVols(const std::vector<G4VPhysicalVolume*>& pvs, const std::string& fieldName);
- // add physvolids from step to an IdVec
+ /** + * Add PhysVolId values from a step into the ID list. + * @param[in] aStep The G4Step object. + * @param[out] v The list of IDs to fill. + */
static void addPhysVolIds(G4Step* aStep, IdVec& v);
- // list of PVs
+ /** + * Get the list of physical volumes from a step. + * @param[in] The G4Step object. + * @return The list of physical volumes. + */
static std::vector<G4VPhysicalVolume*> getPhysVolList(G4Step* aStep); };
diff -u -r1.1 -r1.2 --- IdField.hh 26 Jun 2013 01:32:46 -0000 1.1 +++ IdField.hh 3 Jul 2013 23:00:46 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdField.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdField.hh,v 1.2 2013/07/03 23:00:46 jeremy Exp $
#ifndef LCDD_IDFIELD_HH #define LCDD_IDFIELD_HH 1
@@ -6,9 +6,8 @@
#include <string> /**
- @class IdField - @brief Field in an IdSpec. - @note Includes start, length, label and signed flag.
+ * An individual field in an identifier specification + * that includes start, length, label and signed flag.
*/ class IdField {
@@ -17,65 +16,111 @@
typedef unsigned short int SizeType; public:
+ + /** + * Class constructor. + */
IdField() { }
- IdField(const std::string& label, SizeType start, SizeType length, bool is_signed) : - m_label(label), m_start(start), m_length(length), m_isSigned(is_signed)
+ /** + * Class destructor. + */ + virtual ~IdField()
{ }
- virtual ~IdField()
+ /** + * Fully qualified constructor. + * @param[in] label The label of the field. + * @param[in] start The start, numbered from 0. + * @param[in] length The length. + * @param[in] isSigned Flag indiciating if signed or not. + */ + IdField(const std::string& label, SizeType start, SizeType length, bool isSigned) : + _label(label), _start(start), _length(length), _isSigned(isSigned)
{ }
+ /** + * Set the label on the field. + * @param[in] l The label. + */
void setLabel(const std::string& l) {
- m_label = l;
+ _label = l;
}
+ /** + * Set the starting bit position of the field. + * @param[in] st The startng bit position. + */
void setStart(SizeType st) {
- m_start = st;
+ _start = st;
}
+ /** + * Set the length of the field. + * @param[in] st The length of the field. + */
void setLength(SizeType st) {
- m_length = st;
+ _length = st;
}
+ /** + * Set if the field is signed or not. + * @param[in] s The signed flag. + */
void setSigned(bool s) {
- m_isSigned = s;
+ _isSigned = s;
}
+ /** + * Get the label. + * @return The label. + */
const std::string& getLabel() {
- return m_label;
+ return _label;
}
+ /** + * Get the starting bit position. + * @return The starting position. + */
SizeType getStart() {
- return m_start;
+ return _start;
}
+ /** + * Get the length. + * @return The length. + */
SizeType getLength() {
- return m_length;
+ return _length;
}
+ /** + * Get the signed flag. + * @return True if field is signed; false if not. + */
bool getSigned() {
- return m_isSigned;
+ return _isSigned;
} private:
- std::string m_label; - SizeType m_start; - SizeType m_length; - bool m_isSigned;
+ std::string _label; + SizeType _start; + SizeType _length; + bool _isSigned;
}; #endif
diff -u -r1.1 -r1.2 --- IdManager.hh 26 Jun 2013 01:32:46 -0000 1.1 +++ IdManager.hh 3 Jul 2013 23:00:46 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdManager.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdManager.hh,v 1.2 2013/07/03 23:00:46 jeremy Exp $
#ifndef LCDD_IDMANAGER_HH #define LCDD_IDMANAGER_HH 1
@@ -12,7 +12,7 @@
// Geant4 #include "G4VPhysicalVolume.hh"
-// std
+// STL
#include <map> #include <string> #include <iostream>
@@ -20,8 +20,8 @@
class G4LogicalVolume; /**
- * @brief Singleton manager class for geometric ids. - * @note Mainly provides utility functions based on G4VPhysicalVolume ptrs.
+ * This is a singleton manager class for geometric ids. + * It mainly provides utility functions based on G4VPhysicalVolume pointers.
*/ class IdManager {
@@ -30,52 +30,115 @@
typedef std::map<std::string, IdSpec*> IdSpecs; public:
+ + /** + * Class destructor. + */
virtual ~IdManager();
+ + /** + * Get the class's singleton instance. + * @return The singleton instance. + */
static IdManager* instance();
-protected:
+private: + + /** + * Class constructor. + * Private as access is through singleton. + */
IdManager(); public:
- // *** idspecs ***
+ /** + * Add an IdSpec by name. + * @param[in] name The name of the IdSpec. + * @param[in] spec The IdSpec. + */
void addIdSpec(const std::string& name, IdSpec* spec);
+ /** + * Get an IdSpec by name. + * @param[in] name The name of the IdSpec. + * @return The IdSpec with name. + */
IdSpec* getIdSpec(const char* name);
+ + /** + * Get an IdSpec by name. + * @param[in] name The name of the IdSpec. + * @return The IdSpec with name. + */
IdSpec* getIdSpec(const std::string& name);
+ /** + * Get an iterator pointing to the first IdSpec. + * @return An iterator pointing to the first IdSpec. + */
IdSpecs::const_iterator getIdSpecsBegin();
+ + /** + * Get an iterator pointing to the end of the IdSpec list. + * @return An iterator pointing to the end of the IdSpec list. + */
IdSpecs::const_iterator getIdSpecsEnd();
+ /** + * Get the map of names to IdSpec objects. + * @return The IdSpec map. + */
const IdSpecs* getIdSpecStore() { return &m_idSpecs; }
- // *** physvolids ***
+ /** + * Add a PhysVolId. + * @param[in] lvMom + * @param[in] childIdx + * @param[in] childId + * @todo This method should be moved to another class. + */
void addPhysVolId(G4LogicalVolume* lvMom, int childIdx, PhysVolId childId);
+ /** + * Check if volume has PhysVolId. + * @param[in] pv The G4VPhysicalVolume object. + * @return True if volume has PhysVolId; false if not. + * @todo This method should be moved to another class. + */
bool hasPhysVolIds(G4VPhysicalVolume* pv) const { return m_physVolIdMap.hasPhysVolIds(pv); }
- // caller cannot directly alter this map
+ /** + * Get the map of PhysVolId objects. + * @todo This method should be moved to another class. + * @return The map of PhysVolId objects. + */
const PhysVolIdMap& getPhysVolIdMap() const { return m_physVolIdMap; }
- /* - This ref should always exist because map's function - will create an empty vec if one does not exist already.
+ /** + * Get the PhysVolId objects for a given physical volume. + * @param[in] pv The G4VPhysicalVolume object. + * @return The PhysVolId objects associated to the volume.
*/ PhysVolId::PhysVolIds& getPhysVolIds(G4VPhysicalVolume* pv) { return m_physVolIdMap.getPhysVolIds(pv); }
+ /** + * Print out the IdVec. + * @param[in] os The output stream. + * @param[in] ids The list of IDs to print. + */
static void printIds(std::ostream& os, const IdVec& ids); private:
diff -u -r1.1 -r1.2 --- IdSpec.hh 26 Jun 2013 01:32:46 -0000 1.1 +++ IdSpec.hh 3 Jul 2013 23:00:46 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdSpec.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdSpec.hh,v 1.2 2013/07/03 23:00:46 jeremy Exp $
#ifndef LCDD_IDSPEC_HH #define LCDD_IDSPEC_HH 1
@@ -13,67 +13,94 @@
#include <assert.h> /**
- * @class IdSpec - * @brief Id specification for a full geometric ID. - * @note Includes a vector of IdFields.
+ * This class is a list of IdField objects that constitution an identifier specification + * for a sensitive detector. + * @todo Move code to source file.
*/ class IdSpec {
+
public: typedef unsigned int SizeType; typedef std::vector<IdField*> IdFields; public:
+ + /** + * Class constructor. + */
IdSpec() { }
+ /** + * Class destructor. + */
virtual ~IdSpec() { deleteIdFields(); }
- void deleteIdFields() - { - if (m_idFields.size() > 0) { - for (IdFields::iterator iter = m_idFields.begin(); iter != m_idFields.end(); iter++) { - delete *iter; - } - m_idFields.clear(); - } - } -
+ /** + * Set the name. + * @param[in] n The name. + */
void setName(const std::string& n) {
- m_name = n;
+ _name = n;
}
+ /** + * Set the total bit length. + * @param[in] st The bit length. + */
void setBitLength(SizeType st) {
- m_bitLength = st;
+ _bitLength = st;
}
+ /** + * Get the bit length. + * @return The bit length of the ID. + */
SizeType getBitLength() const {
- return m_bitLength;
+ return _bitLength;
}
+ /** + * Get the name. + * @return The name. + */
const std::string& getName() const {
- return m_name;
+ return _name;
}
+ /** + * Get the number of fields. + * @return The number of fields. + */
SizeType getNumFields() const {
- return m_idFields.size();
+ return _idFields.size();
}
+ /** + * Add a field to the end of the list. + * @param[in] f The IdField to add. + */
void addIdField(IdField* f) {
- m_idFields.push_back(f);
+ _idFields.push_back(f);
}
+ /** + * Get a field by name. + * @param[in] n The field name. + * @return The field with name or 0 if doesn't exist. + */
IdField* getIdField(const std::string& n) const { IdField* f = 0;
@@ -86,42 +113,87 @@
return f; }
+ /** + * Get a field by index. + * @param[in] st The index of the field. + * @return The field at index. + */
IdField* getIdField(SizeType st) const { // harsh index check!
- assert(st < m_idFields.size());
+ //assert(st < m_idFields.size());
- return m_idFields[st];
+ return _idFields[st];
}
+ /** + * Get the list of fields. + * @return The list of fields. + */
const IdFields& getIdFields() const {
- return m_idFields;
+ return _idFields;
}
+ /** + * Get an iterator pointing to the first IdField. + * @return An iterator pointing to the first IdField. + */
IdFields::const_iterator IdFieldsBegin() const {
- return m_idFields.begin();
+ return _idFields.begin();
}
+ /** + * Get an iterator pointing to the end of the IdField list. + * @return An iterator pointing to the end of the IdField list. + */
IdFields::const_iterator IdFieldsEnd() const {
- return m_idFields.end();
+ return _idFields.end();
}
+ /** + * Get the field's description. + * @return The description of the field. + * @todo Is this by field or the whole IdSpec? + */ + std::string getFieldDescription(); + + /** + * Clear the list of fields. + * @todo Check if this can be removed or made private. + */
void clear() {
- m_idFields.clear();
+ _idFields.clear();
}
+ /** + * Print out the IdSpec information. + * @param[in] os The output stream. + */
void printOut(std::ostream& os) const;
- std::string getFieldDescription();
+private: + + /** + * Delete the fields of this ID. + */ + void deleteIdFields() + { + if (_idFields.size() > 0) { + for (IdFields::iterator iter = _idFields.begin(); iter != _idFields.end(); iter++) { + delete *iter; + } + _idFields.clear(); + } + }
private:
- std::string m_name; - SizeType m_bitLength; - IdFields m_idFields;
+ std::string _name; + SizeType _bitLength; + IdFields _idFields;
}; #endif
diff -u -r1.1 -r1.2 --- IdVec.hh 26 Jun 2013 01:32:46 -0000 1.1 +++ IdVec.hh 3 Jul 2013 23:00:46 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdVec.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdVec.hh,v 1.2 2013/07/03 23:00:46 jeremy Exp $
#ifndef LCDD_IDVEC_HH #define LCDD_IDVEC_HH
@@ -9,13 +9,13 @@
#include <vector> /**
- @class IdVec - @brief A vector of ints representing an unpacked geometric identifier. - @note Inspired by ATLAS's ExpandedIdentifier: - - dist/current/DetectorDescription/Identifier/Identifier-00-06-10/Identifier/ExpandedIdentifier.h
+ * This class is a vector of int values representing an unpacked ID. + * + * @note Inspired by ATLAS's ExpandedIdentifier: + * + * dist/current/DetectorDescription/Identifier/Identifier-00-06-10/Identifier/ExpandedIdentifier.h + *
*/
-
class IdVec {
@@ -25,35 +25,71 @@
typedef std::vector<ElementType>::size_type SizeType; public:
+ + /** + * Class constructor. + */
IdVec();
- ~IdVec();
- // clear fields
+ /** + * Class destructor. + */ + virtual ~IdVec(); + + /** + * Clear the fields from the vector. + * @todo Check if this is used anyplace in the code base. + */
void clear();
- // vec push_back - void push_back(ElementType et); - - // get / set value by field - ElementType getFieldValue(SizeType idx) const; - void setFieldValue(SizeType idx, ElementType et); - - // get element at idx using [] operator - ElementType operator [](SizeType idx) const; - - // iterators - ElementVector::const_iterator getFieldsBegin() const; - ElementVector::const_iterator getFieldsEnd() const; - - // size - SizeType size() const - { - return m_fields.size(); - }
+ /** + * Push a value onto the vector. + * @param[in] et The new value to add. + */ + inline void addFieldValue(ElementType et); + + /** + * Get a value by index. + * @param[in] idx The field index. + * @return The field value. + */ + inline ElementType getFieldValue(SizeType idx) const; + + /** + * Set a value by index. + * @param[in] idx The index. + * @param[in] et The new value. + */ + inline void setFieldValue(SizeType idx, ElementType et); + + /** + * Overloaded operator for accessing value by index. + * @param[in] idx The index. + * @return The value at index. + */ + inline ElementType operator [](SizeType idx) const; + + /** + * Get an iterator pointing to the first field value. + * @return An iterator pointing to the first field value. + */ + inline ElementVector::const_iterator getFieldsBegin() const; + + /** + * Get an iterator pointing to the end of the field value list. + * @return An iterator pointing to the end of the field value list. + */ + inline ElementVector::const_iterator getFieldsEnd() const; + + /** + * Get the size of this vector. + * @return The size of this vector. + */ + inline SizeType size() const;
private:
- ElementVector m_fields;
+ ElementVector _fields;
}; #endif
diff -u -r1.1 -r1.2 --- Cartesian3DMagneticFieldMap.cc 26 Jun 2013 23:50:59 -0000 1.1 +++ Cartesian3DMagneticFieldMap.cc 3 Jul 2013 23:00:46 -0000 1.2 @@ -112,6 +112,7 @@
double *Bfield ) const {
+ /** @todo Add x + y offset. */
double x = point[0]; double y = point[1]; double z = point[2] + _zOffset;
diff -u -r1.2 -r1.3 --- CalorimeterSD.cc 2 Jul 2013 01:46:54 -0000 1.2 +++ CalorimeterSD.cc 3 Jul 2013 23:00:46 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/CalorimeterSD.cc,v 1.2 2013/07/02 01:46:54 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/CalorimeterSD.cc,v 1.3 2013/07/03 23:00:46 jeremy Exp $
// LCDD #include "lcdd/detectors/CalorimeterSD.hh"
@@ -179,7 +179,7 @@
} // add McpHitContrib to this hit, setting info from step info
- thisHit->addMcpHitContrib(HitContribution(aStep));
+ thisHit->addHitContribution(HitContribution(aStep));
return true; }
diff -u -r1.1 -r1.2 --- OpticalCalorimeterSD.cc 2 Jul 2013 22:57:43 -0000 1.1 +++ OpticalCalorimeterSD.cc 3 Jul 2013 23:00:46 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/OpticalCalorimeterSD.cc,v 1.1 2013/07/02 22:57:43 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/OpticalCalorimeterSD.cc,v 1.2 2013/07/03 23:00:46 jeremy Exp $
// LCDD #include "lcdd/detectors/OpticalCalorimeterSD.hh"
@@ -110,7 +110,7 @@
thisHit = fndHit; } // add McpHitContrib to this hit, setting info from step info
- thisHit->addMcpHitContrib(HitContribution(aStep));
+ thisHit->addHitContribution(HitContribution(aStep));
// aTrack->SetTrackStatus(fStopAndKill); // don't step photon any further return true; } // end Cerenkov photon treatment
diff -u -r1.1 -r1.2 --- UnsegmentedCalorimeterSD.cc 1 Jul 2013 21:00:45 -0000 1.1 +++ UnsegmentedCalorimeterSD.cc 3 Jul 2013 23:00:46 -0000 1.2 @@ -1,4 +1,4 @@
-// $Id: UnsegmentedCalorimeterSD.cc,v 1.1 2013/07/01 21:00:45 jeremy Exp $
+// $Id: UnsegmentedCalorimeterSD.cc,v 1.2 2013/07/03 23:00:46 jeremy Exp $
// LCDD #include "lcdd/detectors/UnsegmentedCalorimeterSD.hh"
@@ -62,7 +62,7 @@
m_hitsCollections[0]->insert(thisHit); /* Add an MCParticle contribution for this hit. */
- thisHit->addMcpHitContrib(HitContribution(aStep));
+ thisHit->addHitContribution(HitContribution(aStep));
/* Success. */ return true;
diff -u -r1.1 -r1.2 --- PhysicsLimitSet.cc 1 Jul 2013 21:00:45 -0000 1.1 +++ PhysicsLimitSet.cc 3 Jul 2013 23:00:46 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/geant4/PhysicsLimitSet.cc,v 1.1 2013/07/01 21:00:45 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/geant4/PhysicsLimitSet.cc,v 1.2 2013/07/03 23:00:46 jeremy Exp $
// LCDD #include "lcdd/geant4/PhysicsLimitSet.hh"
@@ -27,13 +27,13 @@
const PhysicsLimitSet::LimitValueType PhysicsLimitSet::RANGE_MIN_DEFAULT = 0.; PhysicsLimitSet::PhysicsLimitSet(const G4String& name) :
- G4UserLimits("G4LimitSet"), m_name(name)
+ G4UserLimits("G4LimitSet"), _name(name)
{
- m_limitsMap[STEP_LENGTH_MAX_KEY] = LimitMap(); - m_limitsMap[TRACK_LENGTH_MAX_KEY] = LimitMap(); - m_limitsMap[TIME_MAX_KEY] = LimitMap(); - m_limitsMap[EKIN_MIN_KEY] = LimitMap(); - m_limitsMap[RANGE_MIN_KEY] = LimitMap();
+ _limitsMap[STEP_LENGTH_MAX_KEY] = LimitMap(); + _limitsMap[TRACK_LENGTH_MAX_KEY] = LimitMap(); + _limitsMap[TIME_MAX_KEY] = LimitMap(); + _limitsMap[EKIN_MIN_KEY] = LimitMap(); + _limitsMap[RANGE_MIN_KEY] = LimitMap();
} PhysicsLimitSet::~PhysicsLimitSet()
@@ -77,8 +77,8 @@
void PhysicsLimitSet::setLimitForParticle(LimitNameType limitName, ParticleType particleType, LimitValueType limitValue) {
- if (m_limitsMap.find(limitName) != m_limitsMap.end()) { - m_limitsMap[limitName][particleType] = limitValue;
+ if (_limitsMap.find(limitName) != _limitsMap.end()) { + _limitsMap[limitName][particleType] = limitValue;
} else { G4Exception("", "", FatalException, "Invalid limits map."); }
@@ -89,12 +89,12 @@
//std::cout << "G4LimitSet::getLimitForParticle()" << std::endl; //std::cout << "limitName, particleType: " << limitName << " " << particleType << std::endl; LimitValueType limitValue = 0;
- if (m_limitsMap.find(limitName) != m_limitsMap.end()) { - if (m_limitsMap[limitName].find(particleType) != m_limitsMap[limitName].end()) { - limitValue = m_limitsMap[limitName][particleType];
+ if (_limitsMap.find(limitName) != _limitsMap.end()) { + if (_limitsMap[limitName].find(particleType) != _limitsMap[limitName].end()) { + limitValue = _limitsMap[limitName][particleType];
} else {
- if ((m_limitsMap[limitName].find(ANY_PARTICLE) != m_limitsMap[limitName].end())) { - limitValue = m_limitsMap[limitName][ANY_PARTICLE];
+ if ((_limitsMap[limitName].find(ANY_PARTICLE) != _limitsMap[limitName].end())) { + limitValue = _limitsMap[limitName][ANY_PARTICLE];
} else { limitValue = LIMIT_NOT_SET; }
@@ -111,13 +111,13 @@
return getLimitForParticle(limitName, getParticleType(aTrack)); }
-void PhysicsLimitSet::setName(const G4String& n) -{ - m_name = n; -}
+//void PhysicsLimitSet::setName(const G4String& n) +//{ +// _name = n; +//}
G4String& PhysicsLimitSet::getName() {
- return m_name;
+ return _name;
}
diff -u -r1.1 -r1.2 --- CalorimeterHit.cc 1 Jul 2013 21:00:45 -0000 1.1 +++ CalorimeterHit.cc 3 Jul 2013 23:00:46 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/hits/CalorimeterHit.cc,v 1.1 2013/07/01 21:00:45 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/hits/CalorimeterHit.cc,v 1.2 2013/07/03 23:00:46 jeremy Exp $
// LCDD #include "lcdd/hits/CalorimeterHit.hh"
@@ -75,7 +75,7 @@
{ printMcpHitContribsHeader(os);
- for (McpHitContribList::iterator iter = m_particleList.begin(); iter != m_particleList.end(); iter++) {
+ for (HitContributionList::iterator iter = m_particleList.begin(); iter != m_particleList.end(); iter++) {
(*iter).printOut(os); } }
diff -u -r1.2 -r1.3 --- IdFactory.cc 1 Jul 2013 21:00:45 -0000 1.2 +++ IdFactory.cc 3 Jul 2013 23:00:46 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdFactory.cc,v 1.2 2013/07/01 21:00:45 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdFactory.cc,v 1.3 2013/07/03 23:00:46 jeremy Exp $
// Uncomment to enable verbose debug output from this class. //#define ID_DEBUG 1
@@ -269,7 +269,7 @@
#endif // Push back zero as the default value for field not found.
- ids.push_back(bin_val);
+ ids.addFieldValue(bin_val);
#ifdef ID_DEBUG G4cout << "set bin val: " << bin_val << G4endl << G4endl;
diff -u -r1.1 -r1.2 --- IdSpec.cc 26 Jun 2013 23:51:01 -0000 1.1 +++ IdSpec.cc 3 Jul 2013 23:00:46 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdSpec.cc,v 1.1 2013/06/26 23:51:01 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdSpec.cc,v 1.2 2013/07/03 23:00:46 jeremy Exp $
// LCDD #include "lcdd/id/IdSpec.hh"
@@ -12,8 +12,8 @@
{ os << std::endl;
- os << "IdSpec: " << m_name << std::endl; - os << "bitLength: " << m_bitLength << std::endl;
+ os << "IdSpec: " << _name << std::endl; + os << "bitLength: " << _bitLength << std::endl;
static const int def_width = 15;
diff -u -r1.1 -r1.2 --- IdVec.cc 26 Jun 2013 23:51:01 -0000 1.1 +++ IdVec.cc 3 Jul 2013 23:00:46 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdVec.cc,v 1.1 2013/06/26 23:51:01 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdVec.cc,v 1.2 2013/07/03 23:00:46 jeremy Exp $
// LCDD #include "lcdd/id/IdVec.hh"
@@ -13,22 +13,22 @@
void IdVec::clear() {
- m_fields.clear();
+ _fields.clear();
}
-void IdVec::push_back(ElementType et)
+void IdVec::addFieldValue(ElementType et)
{
- m_fields.push_back(et);
+ _fields.push_back(et);
} IdVec::ElementType IdVec::getFieldValue(SizeType idx) const {
- return m_fields.at(idx);
+ return _fields.at(idx);
} void IdVec::setFieldValue(SizeType idx, ElementType et) {
- m_fields.insert(m_fields.begin() + idx, et);
+ _fields.insert(_fields.begin() + idx, et);
} IdVec::ElementType IdVec::operator [](SizeType idx) const
@@ -38,10 +38,15 @@
IdVec::ElementVector::const_iterator IdVec::getFieldsBegin() const {
- return m_fields.begin();
+ return _fields.begin();
} IdVec::ElementVector::const_iterator IdVec::getFieldsEnd() const {
- return m_fields.end();
+ return _fields.end(); +} + +IdVec::SizeType IdVec::size() const +{ + return _fields.size();
}
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1