Class Reference for E1039 Core & Analysis Software
SQHitVector.h
Go to the documentation of this file.
1 /*
2  * HitVector.h
3  *
4  * Created on: Oct 29, 2017
5  * Author: yuhw@nmsu.edu
6  */
7 
8 #ifndef _H_SQHitVector_H_
9 #define _H_SQHitVector_H_
10 
11 
12 #include <phool/PHObject.h>
13 
14 #include <vector>
15 #include <iostream>
16 
17 #include "SQHit.h"
18 
20 
32 class SQHitVector : public PHObject {
33 
34 public:
35 
36  typedef std::vector<SQHit*> HitVector;
37  typedef std::vector<SQHit*>::const_iterator ConstIter;
38  typedef std::vector<SQHit*>::iterator Iter;
39 
40  virtual ~SQHitVector() {}
41 
42  virtual void identify(std::ostream& os = std::cout) const {
43  os << "SQHitVector base class" << std::endl;
44  }
45  virtual void Reset() = 0;
46  virtual int isValid() const = 0;
47  virtual SQHitVector* Clone() const = 0;
48 
49  virtual bool empty() const = 0;
50  virtual size_t size() const = 0;
51  virtual void clear() = 0;
52 
53  virtual const SQHit* at(const size_t idkey) const = 0;
54  virtual SQHit* at(const size_t idkey) = 0;
55  virtual void push_back(const SQHit *hit) = 0;
56  virtual size_t erase(const size_t idkey) = 0;
57  virtual Iter erase(Iter pos) = 0;
58 
59  virtual ConstIter begin() const = 0;
60  virtual ConstIter end() const = 0;
61 
62  virtual Iter begin() = 0;
63  virtual Iter end() = 0;
64 
65 protected:
67 
68 private:
69 
70  ClassDef(SQHitVector, 1);
71 };
72 
73 
74 
75 #endif /* _H_SQHitVector_H_ */
An SQ interface class to hold a list of SQHit objects.
Definition: SQHitVector.h:32
virtual SQHitVector * Clone() const =0
virtual size_t erase(const size_t idkey)=0
std::vector< SQHit * > HitVector
Definition: SQHitVector.h:36
virtual void Reset()=0
Clear Event.
virtual Iter erase(Iter pos)=0
virtual int isValid() const =0
isValid returns non zero if object contains vailid data
virtual Iter end()=0
virtual void identify(std::ostream &os=std::cout) const
Definition: SQHitVector.h:42
virtual Iter begin()=0
std::vector< SQHit * >::const_iterator ConstIter
Definition: SQHitVector.h:37
virtual SQHit * at(const size_t idkey)=0
virtual ConstIter end() const =0
virtual ConstIter begin() const =0
virtual const SQHit * at(const size_t idkey) const =0
virtual ~SQHitVector()
Definition: SQHitVector.h:40
virtual void push_back(const SQHit *hit)=0
virtual bool empty() const =0
std::vector< SQHit * >::iterator Iter
Definition: SQHitVector.h:38
virtual size_t size() const =0
virtual void clear()=0
An SQ interface class to hold one detector hit.
Definition: SQHit.h:20