Logo ROOT   6.10/09
Reference Guide
TDsKey.h
Go to the documentation of this file.
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:
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
virtual TDsKey & operator=(Int_t from)
Definition: TDsKey.h:34
virtual Int_t IsNull() const
Definition: TDsKey.h:48
virtual void Update(const TDsKey &from, const char *name=0)
to be documented
Definition: TDsKey.cxx:103
virtual ~TDsKey()
Definition: TDsKey.h:31
virtual Bool_t operator==(const TDsKey &from) const
Compare two keys.
Definition: TDsKey.cxx:85
virtual const char * GetName() const
Definition: TDsKey.h:40
Basic string class.
Definition: TString.h:129
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual UInt_t operator[](Int_t i) const
Definition: TDsKey.h:37
Array of integers (32 bits per element).
Definition: TArrayI.h:27
TDsKey(const char *name=0, UInt_t *uk=0, int nk=1)
to be documented
Definition: TDsKey.cxx:23
const UInt_t kUMAX
Definition: TDsKey.h:19
virtual void SetName(const char *name)
Definition: TDsKey.h:39
TArrayI fUrr
Definition: TDsKey.h:25
virtual UInt_t EventNumber() const
Definition: TDsKey.h:42
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual void SetUrr(const UInt_t *key, int nk)
to be documented
Definition: TDsKey.cxx:49
virtual TDsKey & operator=(const TDsKey &from)
to be documented
Definition: TDsKey.cxx:60
virtual UInt_t GetSum() const
to be documented
Definition: TDsKey.cxx:139
TString fName
Definition: TDsKey.h:24
virtual TString GetKey() const
to be documented
Definition: TDsKey.cxx:111
virtual Int_t EOK() const
Definition: TDsKey.h:47
Definition: TDsKey.h:21
virtual void SetKey(const char *key)
to be documented
Definition: TDsKey.cxx:126
virtual UInt_t RunNumber() const
Definition: TDsKey.h:43