PdbIndex.hh
//-----------------------------------------------------------------------------
//
// The pdbcal package
// Copyright (C) PHENIX collaboration, 1999
//
// Declaration of class PdbIndex
//
// Purpose: User defined storage class
//
// Description:
//
// Author: federica
//-----------------------------------------------------------------------------
#ifndef __PDBINDEX_DDL__
#define __PDBINDEX_DDL__
#include "phool.h"
#include "PdbCalChan.hh"
#include <iostream.h>
class PdbIndex : public PdbCalChan {
public:
PdbIndex();
PdbIndex(int mini, int maxi);
PdbIndex(int mini, int maxi, char* name);
PdbIndex(int mini, int maxi, int val, char* name);
virtual ~PdbIndex();
PdbIndex(const PdbIndex &);
PdbIndex & operator = (const PdbIndex &);
int operator()();
virtual void print() const;
int getMin() const { return theMinimum;}
int getMax() const { return theMaximum;}
int getValue() const { return theValue;}
int getNumberOf() const { return (theMaximum - theMinimum +1);}
void setMin(int val) { theMinimum = val; }
void setMax(int val) { theMaximum = val; }
void setName(char* name);
PHBoolean setValue(int val);
private:
int theMinimum;
int theMaximum;
int theValue;
char theName[20];
};
inline int PdbIndex::operator()()
{
return theValue;
}
#endif /* __PDBINDEX_DDL__ */