// $Id: EyeInfoVector.h 2553 2011-10-14 03:37:16Z matevz $ // Copyright (C) 1999-2008, Matevz Tadel. All rights reserved. // This file is part of GLED, released under GNU General Public License version 2. // For the licensing terms see $GLEDSYS/LICENSE or http://www.gnu.org/. #ifndef GledCore_EyeInfoVector_H #define GledCore_EyeInfoVector_H #include // #include #include class EyeInfo; #include class EyeInfoVector : public vector { protected: GMutex mLock; Int_t mRefCnt; public: EyeInfoVector(Int_t s=0) : vector(s), mRefCnt(0) {} ~EyeInfoVector() {} void IncRefCnt() { ++mRefCnt; } void DecRefCnt() { mLock.Lock(); if (--mRefCnt == 0) delete this; else mLock.Unlock(); } static EyeInfoVector* CloneAndAdd(EyeInfoVector* eiv, EyeInfo* ei); static EyeInfoVector* CloneAndRemove(EyeInfoVector* eiv, EyeInfo* ei); #include "EyeInfoVector.h7" ClassDefNV(EyeInfoVector, 0); }; // endclass EyeInfoVector #endif