Nymph  v1.5.2
Flow-Based Data Processing Framework
KTData.hh
Go to the documentation of this file.
1 /*
2  * KTData.hh
3  *
4  * Created on: Aug 24, 2012
5  * Author: nsoblath
6  */
7 
8 #ifndef KTDATA_HH_
9 #define KTDATA_HH_
10 
11 #include "KTExtensibleStruct.hh"
12 
13 #include "KTCutStatus.hh"
14 #include "KTMemberVariable.hh"
15 
16 #include <boost/shared_ptr.hpp>
17 
18 #include <string>
19 
20 namespace Nymph
21 {
22  class KTDataCore
23  {
24  public:
26  virtual ~KTDataCore() {}
27 
28  virtual const std::string& Name() const = 0;
29 
30  };
31 
32  template< class XDerivedType >
33  class KTExtensibleData : public KTExtensibleStruct< XDerivedType, KTDataCore >
34  {
35  public:
37  virtual ~KTExtensibleData() {}
38 
39  const std::string& Name() const;
40 
41  };
42 
43  template< class XDerivedType >
44  inline const std::string& KTExtensibleData< XDerivedType >::Name() const
45  {
46  return XDerivedType::sName;
47  }
48 
49 
50 
51  class KTData : public KTExtensibleData< KTData >
52  {
53  public:
54  KTData();
55  KTData(const KTData& orig);
56  ~KTData();
57 
58  MEMBERVARIABLE(unsigned, Counter);
59  MEMBERVARIABLE(bool, LastData);
60 
62 
63  public:
64  static const std::string sName;
65  };
66 
67  typedef boost::shared_ptr< KTData > KTDataPtr;
68 
69 } /* namespace Nymph */
70 #endif /* KTDATA_HH_ */
#define MEMBERVARIABLE(TYPE, NAME)
const std::string & Name() const
Definition: KTData.hh:44
virtual ~KTDataCore()
Definition: KTData.hh:26
static const std::string sName
Definition: KTData.hh:64
Provides easy access to cut information.
Definition: KTCutStatus.hh:54
virtual ~KTExtensibleData()
Definition: KTData.hh:37
#define MEMBERVARIABLEREF_NOSET(TYPE, NAME)
boost::shared_ptr< KTData > KTDataPtr
Definition: KTData.hh:67
virtual const std::string & Name() const =0