Commit 27abb6cdce7a0be333dd328220fb868e807435ac

Authored by Jürgen Knödlseder
1 parent 29235d91

Add GCTAEventAtom::phase() methods.

inst/cta/include/GCTAEventAtom.hpp
@@ -72,9 +72,11 @@ public: @@ -72,9 +72,11 @@ public:
72 // Other methods 72 // Other methods
73 const int& index(void) const; 73 const int& index(void) const;
74 const unsigned long& event_id(void) const; 74 const unsigned long& event_id(void) const;
75 - const unsigned long& obs_id(void) const; 75 + const unsigned long& obs_id(void) const;
  76 + const float& phase(void) const;
76 void event_id(const unsigned long& id); 77 void event_id(const unsigned long& id);
77 void obs_id(const unsigned long& id); 78 void obs_id(const unsigned long& id);
  79 + void phase(const float& phase);
78 80
79 protected: 81 protected:
80 // Protected methods 82 // Protected methods
@@ -236,6 +238,18 @@ const unsigned long& GCTAEventAtom::obs_id(void) const @@ -236,6 +238,18 @@ const unsigned long& GCTAEventAtom::obs_id(void) const
236 238
237 239
238 /***********************************************************************//** 240 /***********************************************************************//**
  241 + * @brief Return event phase
  242 + *
  243 + * @return Event phase.
  244 + ***************************************************************************/
  245 +inline
  246 +const float& GCTAEventAtom::phase(void) const
  247 +{
  248 + return (m_phase);
  249 +}
  250 +
  251 +
  252 +/***********************************************************************//**
239 * @brief Set event identifier 253 * @brief Set event identifier
240 * 254 *
241 * @param[in] id Event identifier. 255 * @param[in] id Event identifier.
@@ -260,4 +274,17 @@ void GCTAEventAtom::obs_id(const unsigned long& id) @@ -260,4 +274,17 @@ void GCTAEventAtom::obs_id(const unsigned long& id)
260 return; 274 return;
261 } 275 }
262 276
  277 +
  278 +/***********************************************************************//**
  279 + * @brief Set event phase
  280 + *
  281 + * @param[in] phase Event phase.
  282 + ***************************************************************************/
  283 +inline
  284 +void GCTAEventAtom::phase(const float& phase)
  285 +{
  286 + m_phase = phase;
  287 + return;
  288 +}
  289 +
263 #endif /* GCTAEVENTATOM_HPP */ 290 #endif /* GCTAEVENTATOM_HPP */
inst/cta/pyext/GCTAEventAtom.i
1 /*************************************************************************** 1 /***************************************************************************
2 * GCTAEventAtom.i - CTA event atom class * 2 * GCTAEventAtom.i - CTA event atom class *
3 * ----------------------------------------------------------------------- * 3 * ----------------------------------------------------------------------- *
4 - * copyright (C) 2011-2013 by Juergen Knoedlseder * 4 + * copyright (C) 2011-2015 by Juergen Knoedlseder *
5 * ----------------------------------------------------------------------- * 5 * ----------------------------------------------------------------------- *
6 * * 6 * *
7 * This program is free software: you can redistribute it and/or modify * 7 * This program is free software: you can redistribute it and/or modify *
@@ -44,6 +44,7 @@ public: @@ -44,6 +44,7 @@ public:
44 // Implemented pure virtual base class methods 44 // Implemented pure virtual base class methods
45 void clear(void); 45 void clear(void);
46 GCTAEventAtom* clone(void) const; 46 GCTAEventAtom* clone(void) const;
  47 + std::string classname(void) const;
47 const GCTAInstDir& dir(void) const; 48 const GCTAInstDir& dir(void) const;
48 const GEnergy& energy(void) const; 49 const GEnergy& energy(void) const;
49 const GTime& time(void) const; 50 const GTime& time(void) const;
@@ -54,9 +55,11 @@ public: @@ -54,9 +55,11 @@ public:
54 // Other methods 55 // Other methods
55 const int& index(void) const; 56 const int& index(void) const;
56 const unsigned long& event_id(void) const; 57 const unsigned long& event_id(void) const;
57 - const unsigned long& obs_id(void) const; 58 + const unsigned long& obs_id(void) const;
  59 + const float& phase(void) const;
58 void event_id(const unsigned long& id); 60 void event_id(const unsigned long& id);
59 void obs_id(const unsigned long& id); 61 void obs_id(const unsigned long& id);
  62 + void phase(const float& phase);
60 }; 63 };
61 64
62 65