ATLAS Offline Software
TIDAFeature.h
Go to the documentation of this file.
1 /* emacs: this is -*- c++ -*- */
15 #ifndef TIDA_FEATURE_H
16 #define TIDA_FEATURE_H
17 
18 #include <iostream>
19 
20 
21 
22 namespace TIDA {
23 
24 
25 
28 
29 class FeatureBase {
30 
31 public:
32 
33  virtual ~FeatureBase() { }
34 
35  virtual void dummy() const = 0;
36 };
37 
38 }
39 
40 
41 inline std::ostream& operator<<( std::ostream& s, const TIDA::FeatureBase& ) {
42  return s;
43 }
44 
45 
46 
47 
48 namespace TIDA {
49 
50 
53 
54 template<typename T>
55 class Feature : public FeatureBase {
56 
57 public:
58 
59  typedef T value_type;
60 
61 public:
62 
63  Feature( T* t ) : m_t(t) { }
64 
65  virtual ~Feature() { }
66 
67  T* cptr() { return m_t; }
68  const T* cptr() const { return m_t; }
69 
70 private:
71 
74  virtual void dummy() const { };
75 
76 private:
77 
78  T* m_t;
79 
80 };
81 
82 }
83 
84 
85 template<typename T>
86 inline std::ostream& operator<<( std::ostream& s, const TIDA::Feature<T>& ) {
87  return s;
88 }
89 
90 
91 
92 #endif // TRACKFEATURE_H
93 
94 
95 
96 
97 
98 
99 
100 
101 
102 
TIDA
Test for xAOD.
Definition: Filter_AcceptAll.h:22
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TIDA::Feature::value_type
T value_type
Definition: TIDAFeature.h:59
TIDA::FeatureBase::~FeatureBase
virtual ~FeatureBase()
Definition: TIDAFeature.h:33
TIDA::Feature::Feature
Feature(T *t)
Definition: TIDAFeature.h:63
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TIDA::Feature::~Feature
virtual ~Feature()
Definition: TIDAFeature.h:65
TIDA::Feature::dummy
virtual void dummy() const
only needed to satify the pure virtual method of the FeatureBase
Definition: TIDAFeature.h:74
TIDA::Feature
actual template of the Feature wrapper - stores a pointer to an object and inherits from FeatureBase
Definition: TIDAFeature.h:55
TIDA::Feature::cptr
const T * cptr() const
Definition: TIDAFeature.h:68
operator<<
std::ostream & operator<<(std::ostream &s, const TIDA::FeatureBase &)
Definition: TIDAFeature.h:41
TIDA::FeatureBase
very basic Feature base class just so that we can store derived classes onto the store
Definition: TIDAFeature.h:29
TIDA::FeatureBase::dummy
virtual void dummy() const =0
TIDA::Feature::m_t
T * m_t
Definition: TIDAFeature.h:74
TIDA::Feature::cptr
T * cptr()
Definition: TIDAFeature.h:67