ROOT logo
#ifndef HPARSET_H
#define HPARSET_H

#include "TNamed.h"
#include "TArrayI.h"

class HParIo;

class HParSet : public TNamed {
protected:
  Text_t detName[20];      //! name of the detector the container belongs to
  Int_t versions[3];       //! versions of container in the 2 possible inputs
  Bool_t status;           //! static flag 
  Bool_t changed;          //! flag is kTRUE if parameters have changed
  TString paramContext;    // Context/purpose for parameters and conditions
  TString author;          // Author of parameters
  TString description ;    // Description of parameters
public:
  HParSet(const Char_t* name="",const Char_t* title="",const Char_t* context="");
  virtual ~HParSet() {}
  virtual Bool_t init(void) { return init(0); }
  virtual Bool_t init(HParIo* io);
  virtual Bool_t init(HParIo*,Int_t*) { return kFALSE; }
  virtual Int_t write();
  virtual Int_t write(HParIo*) { return kFALSE; }
  virtual void clear() {;}
  virtual void print();
  const Text_t* getDetectorName() {return detName;}
  void resetInputVersions();

  void setInputVersion(Int_t v=-1,Int_t i=0) {
    if (i>=0 && i<3)  versions[i]=v;
  }
  Int_t getInputVersion(Int_t i) {
    if (i>=0 && i<3) return versions[i];
    else return 0;
  }
  void setStatic(Bool_t flag=kTRUE) {status=flag;}
  Bool_t isStatic() {return status;}
  void setChanged(Bool_t flag=kTRUE) {changed=flag;}
  Bool_t hasChanged() {return changed;}

  void setParamContext(const Char_t*);
  const Char_t* getParamContext() const { return paramContext.Data(); }

  void setAuthor(const Char_t* s) {author=s;}
  const Char_t* getAuthor() const { return author.Data(); }

  void setDescription(const Char_t* s) {description=s;}
  const Char_t* getDescription() const { return description.Data(); }

  void copyComment(HParSet& r) {
    author=r.getAuthor();
    description=r.getDescription();
  }

  ClassDef(HParSet,2) // Base class for all parameter containers
};

#endif  /* !HPARSET_H */

 hparset.h:1
 hparset.h:2
 hparset.h:3
 hparset.h:4
 hparset.h:5
 hparset.h:6
 hparset.h:7
 hparset.h:8
 hparset.h:9
 hparset.h:10
 hparset.h:11
 hparset.h:12
 hparset.h:13
 hparset.h:14
 hparset.h:15
 hparset.h:16
 hparset.h:17
 hparset.h:18
 hparset.h:19
 hparset.h:20
 hparset.h:21
 hparset.h:22
 hparset.h:23
 hparset.h:24
 hparset.h:25
 hparset.h:26
 hparset.h:27
 hparset.h:28
 hparset.h:29
 hparset.h:30
 hparset.h:31
 hparset.h:32
 hparset.h:33
 hparset.h:34
 hparset.h:35
 hparset.h:36
 hparset.h:37
 hparset.h:38
 hparset.h:39
 hparset.h:40
 hparset.h:41
 hparset.h:42
 hparset.h:43
 hparset.h:44
 hparset.h:45
 hparset.h:46
 hparset.h:47
 hparset.h:48
 hparset.h:49
 hparset.h:50
 hparset.h:51
 hparset.h:52
 hparset.h:53
 hparset.h:54
 hparset.h:55
 hparset.h:56
 hparset.h:57
 hparset.h:58
 hparset.h:59
 hparset.h:60
 hparset.h:61