ROOT logo
#ifndef HLOCATION_H
#define HLOCATION_H

#include "TObject.h"
#include "TArrayI.h"
#include "haddef.h"

class HLocation : public TObject {
protected:
  TArrayI fIndexes; //High indexes indicating the location
  Int_t fOffset;    //Less significant index of the location
public:
  HLocation(void) {fOffset=0;}
  HLocation(HLocation &aLoc) : TObject(aLoc) {  fIndexes.Copy(aLoc.fIndexes); }
  ~HLocation(void) {   fIndexes.Reset(); }
  void set(Int_t nInd, Int_t i1=0, Int_t i2=0, Int_t i3=0, Int_t i4=0, Int_t i5=0);
  void setNIndex(Int_t nIdx) {   fIndexes.Set(nIdx); }
  void setOffset(Int_t aOfs) {  fIndexes[fIndexes.fN-1]=aOfs; }
  Int_t getIndex(Int_t aIdx) {  return(fIndexes[aIdx]); }
  Int_t getUncheckedIndex(Int_t aIdx) {return fIndexes.fArray[aIdx];}
  void setIndex(Int_t aIdx,Int_t aValue) {  fIndexes[aIdx]=aValue; }
  Int_t getLinearIndex(TArrayI *sizes);
  Int_t getLinearIndex(Int_t *sizes,Int_t n);
  Int_t getNIndex(void) { return fIndexes.fN; }
  TArrayI* getIndexes(void) { return &fIndexes;}
  Int_t getOffset(void) {  return fIndexes[fIndexes.fN-1]; }
  void incIndex(Int_t nIndex);
  void operator+=(Int_t shift) {  fIndexes[fIndexes.fN-1]+=shift; } 
  Int_t operator++(void) {   return fIndexes[fIndexes.fN-1]++; }
  void operator-=(Int_t shift) {  fIndexes[fIndexes.fN-1]-=shift; } 
  void operator--(void) {   fIndexes[fIndexes.fN-1]--; }
  Int_t &operator[](Int_t aIdx) {return fIndexes.fArray[aIdx];}
  HLocation &operator=(HLocation &loc) {  loc.fIndexes.Copy(fIndexes); return loc; }
  void readIndexes(HLocation &loc);
  void Dump(void);
  ClassDef(HLocation,1) //Indicator for a place in the event
};

#endif /* !HLOCATION_H */
 hlocation.h:1
 hlocation.h:2
 hlocation.h:3
 hlocation.h:4
 hlocation.h:5
 hlocation.h:6
 hlocation.h:7
 hlocation.h:8
 hlocation.h:9
 hlocation.h:10
 hlocation.h:11
 hlocation.h:12
 hlocation.h:13
 hlocation.h:14
 hlocation.h:15
 hlocation.h:16
 hlocation.h:17
 hlocation.h:18
 hlocation.h:19
 hlocation.h:20
 hlocation.h:21
 hlocation.h:22
 hlocation.h:23
 hlocation.h:24
 hlocation.h:25
 hlocation.h:26
 hlocation.h:27
 hlocation.h:28
 hlocation.h:29
 hlocation.h:30
 hlocation.h:31
 hlocation.h:32
 hlocation.h:33
 hlocation.h:34
 hlocation.h:35
 hlocation.h:36
 hlocation.h:37
 hlocation.h:38
 hlocation.h:39