Revision 5a21da3b72efd44377f9d4b1a214c8186bac5df3 authored by Rene Brun on 05 March 2004, 07:47:40 UTC, committed by Rene Brun on 05 March 2004, 07:47:40 UTC

git-svn-id: http://root.cern.ch/svn/root/trunk@8328 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent ddc68ca
Raw File
clonesA_Event.h
#include "TTree.h"
#include "Riostream.h"

class TUsrHit:public TObject {
 public:
   TUsrHit(Int_t ev=0);
   virtual ~TUsrHit() {}

 protected:
   Int_t    fEventNumber;       // internal event number
   Int_t    fModuleNumber;      // module serial number
   Int_t    fChannel;           // module channel
   UShort_t fEventTime[3];      // time stamp generated by dgf clock bus (48 bits unsigned!)

   ClassDef(TUsrHit, 1)         // [Analyze] Hit
};

//______________________________________________________

class TUsrHitBuffer:public TObject {
 public:
//                                                                                                                                                                                                                                                             TUsrHitBuffer(){};
   TUsrHitBuffer(Int_t maxent = 10);
   virtual ~TUsrHitBuffer() {
      cout << "~~~~~~dtor TUsrHitBuffer " << this << endl;
      delete fHits;
   }
   

   TUsrHit *AddHit(Int_t ev);
   Int_t GetBufSize() { return fHits->GetSize();}
   TClonesArray *GetCA() { return (fHits);}
   void Clear(Option_t *opt="");

 protected:

   Int_t fNofEntries;           // max number of entries
   Int_t fNofHits;              // current number of hits
   TClonesArray *fHits;         // array containing hit data

   ClassDef(TUsrHitBuffer, 1)   // [Analyze] Hit buffer
};

//______________________________________________________

class TMrbSubevent_Caen:public TObject {

 public:
   TMrbSubevent_Caen() {cout << "ctor  TMrbSubevent_Caen" << this << endl;}
   virtual ~TMrbSubevent_Caen() {}
   void Clear(Option_t *opt="") {fHitBuffer.Clear();};
   TUsrHitBuffer * GetHitBuffer() {return &fHitBuffer;};
 protected:

   Int_t fTimeStamp;            // time stamp, same as fUniqueID
   TUsrHitBuffer fHitBuffer;    // hit buffer to store subevent data

   ClassDef(TMrbSubevent_Caen, 1)	// [Analyze] Base class for subevents: CAEN data stored in hit buffer
};

//______________________________________________________

class TUsrSevtData1:public TMrbSubevent_Caen {
 public:
   TUsrSevtData1() {SetEvent(0);}

   virtual ~TUsrSevtData1() {}
   void  SetEvent(Int_t ev);
   Int_t GetPileup() {return fPileup; };
   
 protected:
   TString fSevtName;           // subevent name
   Int_t fMer;                  // data2.mer
   Int_t fPileup;               // data2.mpileup

   ClassDef(TUsrSevtData1, 1)   // [Analyze] Store CAEN data in hit buffer
};
//______________________________________________________

class TUsrSevtData2:public TMrbSubevent_Caen {
 public:
   TUsrSevtData2() {SetEvent(0);}

   virtual ~TUsrSevtData2() {}
   void  SetEvent(Int_t ev);
   Int_t GetPileup() {return fPileup; };
   
 protected:
   TString fSevtName;           // subevent name
   Int_t fMer;                  // data2.mer
   Int_t fPileup;               // data2.mpileup

   ClassDef(TUsrSevtData2, 1)   // [Analyze] Store CAEN data in hit buffer
};
back to top