// Author: Andrew M. Rogers, NSCL 07/01/2006
//* Copyright (C) 2006-2008 Andrew M. Rogers

#ifndef __THIRAASIC_H
#define __THIRAASIC_H

#include <iostream>
#include <vector>

#include <TROOT.h>
#include <TBranch.h>
#include <TTree.h>
#include <TObject.h>

#ifndef  __ROOTDEFINE_H
#define  __ROOTDEFINE_H
#include "rootDefine.h"
#endif

using namespace std;

class THiRAChip
{
 private:
  TString name;
 public:
  Short_t ene[32];
  Short_t time[32];

  THiRAChip() {};
  ~THiRAChip() {};

};

class THiRASlot 
{
 private:
  TString name;
 public:
  THiRAChip chip[2];
  Short_t chipNum[2];
  Short_t telenum;
  Short_t facenum;
 
  THiRASlot() {};
  ~THiRASlot() {};
  
};

class THiRATower
{
 private:
  TString name;
  const static Int_t nSlots = 34;

 public:
  vector<Short_t> slotList;
  THiRASlot slot[nSlots];
  Short_t     slotNum[nSlots];
  Short_t     chipNum[nSlots];
  
  THiRATower() {};
  ~THiRATower() {};

};


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// THiRAAsic                                                            //
//                                                                      //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

class THiRAAsic : public TObject {

 private:
  TString    name;                                             //! Object identifier.
  
 public:
  Char_t     *chipMapPath;                                     //! ASIC chip mapping filename.

  THiRATower tower[THIRA_NMBS];                             // HiRA tower member class.

  TBranch    *b_Tower;

  TTree      *fChain;         //! pointer to the analyzed TTree or TChain
  Int_t      fCurrent;        //! current Tree number in a TChain

 public:
  THiRAAsic() {}
  ~THiRAAsic() {}

  void         Initialize(TString iName, Int_t iNum);          // Initialize the class.
  void         InitTree(TTree *tree);                          // Initialize the tree.
  void         InitBranch(TTree *tree);                        // Initialize the branches.
  Bool_t       LoadMap();                                      // Load chip mapping file.
  void         Clear(Option_t *option="");                     // Clear all members.

  ClassDef(THiRAAsic,3)                                        // Tele Class.
  
};


#endif

Last change: Sun Dec 21 12:38:48 2008
Last generated: 2008-12-21 12:38

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.