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