1 | #ifndef DMM_CERENKOVIMAGE_H |
---|
2 | #define DMM_CERENKOVIMAGE_H 1 |
---|
3 | /*! |
---|
4 | \class CerenkovImage CerenkovImage.h |
---|
5 | "DMM/CerenkovImage.h" |
---|
6 | \brief Memory & Storable description of a collection of WC Digits |
---|
7 | \author J.E Campagne |
---|
8 | */ |
---|
9 | |
---|
10 | // DMM |
---|
11 | #include "DMM/BaseData.h" |
---|
12 | #include "DMM/WCDigit.h" |
---|
13 | |
---|
14 | //OSC |
---|
15 | #include "Slash/Store/IStorable.h" |
---|
16 | |
---|
17 | namespace MEMPHYS { |
---|
18 | namespace DMM { |
---|
19 | |
---|
20 | class IDataServices; |
---|
21 | |
---|
22 | class CerenkovImage : public BaseData, virtual public Slash::Store::IStorable { |
---|
23 | |
---|
24 | public: |
---|
25 | typedef boost::shared_ptr<CerenkovImage> SharedPtr; |
---|
26 | typedef boost::weak_ptr<CerenkovImage> WeakPtr; |
---|
27 | typedef std::vector<SharedPtr> VecOfSharedPtr; |
---|
28 | typedef std::vector<WeakPtr> VecOfWeakPtr; |
---|
29 | |
---|
30 | //@name IStorable inheritence |
---|
31 | //@{ |
---|
32 | virtual void* cast(const std::string& aClass) const; |
---|
33 | virtual bool visit(Slash::Store::IConstVisitor&) const; |
---|
34 | virtual bool read(Slash::Store::IVisitor&); |
---|
35 | //@} |
---|
36 | |
---|
37 | //@name BaseData inheritence |
---|
38 | //@{ |
---|
39 | virtual void dump(std::ostream& f, const std::string& option = ""); |
---|
40 | //@} |
---|
41 | |
---|
42 | |
---|
43 | //!Constructor |
---|
44 | CerenkovImage(IDataServices& aService); |
---|
45 | //!CCtor |
---|
46 | CerenkovImage(const CerenkovImage& aCerenkovImage); |
---|
47 | //!Assignment |
---|
48 | CerenkovImage& operator=(const CerenkovImage& aCerenkovImage); |
---|
49 | |
---|
50 | //!Destructor |
---|
51 | virtual ~CerenkovImage() { |
---|
52 | std::cout << "Destroy CerenkovImage("<<this<<")"<<std::endl; |
---|
53 | } |
---|
54 | //! Use the copy constructor to clone |
---|
55 | //JEC See if useful CerenkovImage* clone() const {return new CerenkovImage(*this);} |
---|
56 | |
---|
57 | |
---|
58 | //! @name Accessors |
---|
59 | //@{ |
---|
60 | //! Update digits |
---|
61 | void setDigits(const WCDigit::VecOfSharedPtr& value) { m_digits = value; } |
---|
62 | void addDigit(const WCDigit::SharedPtr& value) { m_digits.push_back(value); } |
---|
63 | //! Retreive digits |
---|
64 | const WCDigit::VecOfSharedPtr& digits() const { return m_digits; } |
---|
65 | //@} |
---|
66 | |
---|
67 | protected: |
---|
68 | //! Container of WCDigits |
---|
69 | WCDigit::VecOfSharedPtr m_digits; |
---|
70 | |
---|
71 | }; |
---|
72 | |
---|
73 | }//DMM |
---|
74 | }//MEMPHYS |
---|
75 | |
---|
76 | #endif // DMM_CERENKOVIMAGE_H |
---|