1 // @(#)root/table:$Id$ 2 // Author: Victor Perevoztchikov (perev@bnl.gov) 01/03/2001 3 4 /************************************************************************* 5 * Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. * 6 * Copyright (C) 2001 [BNL] Brookhaven National Laboratory. * 7 * All rights reserved. * 8 * * 9 * For the licensing terms see $ROOTSYS/LICENSE. * 10 * For the list of contributors see $ROOTSYS/README/CREDITS. * 11 *************************************************************************/ 12 13 #ifndef ROOT_TDsKey 14 #define ROOT_TDsKey 15 16 #include "TString.h" 17 #include "TArrayI.h" 18 19 const UInt_t kUMAX = (UInt_t)(-1); 20 21 class TDsKey 22 { 23 private: 24 TString fName; 25 TArrayI fUrr; 26 27 public: 28 TDsKey(const char *name=0,UInt_t *uk=0,int nk=1); 29 TDsKey(const char *name,UInt_t uk); 30 TDsKey(UInt_t uRun,UInt_t uEvent=0); 31 virtual ~TDsKey(){} 32 virtual TDsKey &operator=( const TDsKey &from); 33 virtual TDsKey &operator=( UInt_t from); 34 virtual TDsKey &operator=( Int_t from){ *this=(UInt_t)from; return *this;} 35 virtual TDsKey &operator=( const char *from); 36 virtual Bool_t operator==(const TDsKey &from) const; 37 virtual UInt_t operator[](Int_t i) const { return fUrr[i]; } 38 virtual void Update(const TDsKey &from,const char *name=0); 39 virtual void SetName(const char *name){fName=name;} 40 virtual const char *GetName() const {return fName;} 41 virtual TString GetKey() const; 42 virtual UInt_t EventNumber() const { return (*this)[1];} 43 virtual UInt_t RunNumber() const { return (*this)[0];} 44 virtual void SetKey(const char *key); 45 virtual void SetUrr(const UInt_t *key,int nk); 46 virtual UInt_t GetSum() const; 47 virtual Int_t EOK() const { return (UInt_t)fUrr[0]==kUMAX;} 48 virtual Int_t IsNull() const { return !fUrr[0];} 49 50 }; 51 52 53 #endif 54