Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:26:28

0001 #ifndef RecoParticleFlow_PFProducer_FlaggedPtr_h
0002 #define RecoParticleFlow_PFProducer_FlaggedPtr_h
0003 
0004 template <typename T>
0005 class FlaggedPtr {
0006 public:
0007   FlaggedPtr(T* pointer, bool flag) : pointer_(pointer), flag_(flag) {}
0008   T& operator*() const { return *pointer_; }
0009   T* operator->() const { return pointer_; }
0010   T* get() const { return pointer_; }
0011   bool flag() const { return flag_; }
0012   void setFlag(bool flag) { flag_ = flag; }
0013 
0014 private:
0015   T* pointer_;
0016   bool flag_;
0017 };
0018 
0019 #endif