ROOT logo
// File: showerunpacker.h
//
// Author: Leszek Kidon
// Last update: 25/5/2000
//

#ifndef HShowerUnpacker_H
#define HShowerUnpacker_H

#include "haddef.h"
#include "hldsubevt.h"
#include "hldunpack.h"
#include "hlocation.h"
#include "showerdef.h"

//default unpacker 

class HShowerRawHist;

class HShowerUnpacker: public HldUnpack {



public:

  HShowerUnpacker(Int_t nSubId);
  ~HShowerUnpacker();

  virtual Int_t getSubEvtId()  { return m_nSubId; }

  Int_t execute();
  Bool_t init(void);
  Bool_t reinit(void);
  Bool_t finalize(void);

private:

  Int_t fillData(class HLocation &loc, Int_t nCharge, Int_t nEvtId);

  Int_t dump();

  HLocation m_loc; //!Location of object to be unpacked.
  HLocation m_zeroLoc; //!


   class SHeader {

      Bool_t fEmpty;
      UInt_t fSize;
      UInt_t fSource;

      public:

      SHeader() { reset(); }
      ~SHeader() {}

      void reset() { fSize   = 0; fSource = 0; }
      void getEvent(UInt_t word) { fSize   = (word >> 16) & 0xFFFF; fSource = word & 0xFFFF; }

      Bool_t  empty()  const {
         return fEmpty;
      }
      UInt_t getSize()   const {
         return fSize;
      }
      UInt_t getSource() const {
         return fSource;
      }

   };

   struct DataWord {

      UInt_t sector;
      UInt_t module;
      UInt_t column;
      UInt_t row;
      UInt_t charge;

   } fDataWord;       

  Int_t m_nSubId;

  UInt_t  fEventNr;              //! current event #

  HShowerRawHist* m_pHist;
  ClassDef(HShowerUnpacker,0)		// unpack Shower data
};



#endif /* !HShowerUnpacker_H */



 hshowerunpacker.h:1
 hshowerunpacker.h:2
 hshowerunpacker.h:3
 hshowerunpacker.h:4
 hshowerunpacker.h:5
 hshowerunpacker.h:6
 hshowerunpacker.h:7
 hshowerunpacker.h:8
 hshowerunpacker.h:9
 hshowerunpacker.h:10
 hshowerunpacker.h:11
 hshowerunpacker.h:12
 hshowerunpacker.h:13
 hshowerunpacker.h:14
 hshowerunpacker.h:15
 hshowerunpacker.h:16
 hshowerunpacker.h:17
 hshowerunpacker.h:18
 hshowerunpacker.h:19
 hshowerunpacker.h:20
 hshowerunpacker.h:21
 hshowerunpacker.h:22
 hshowerunpacker.h:23
 hshowerunpacker.h:24
 hshowerunpacker.h:25
 hshowerunpacker.h:26
 hshowerunpacker.h:27
 hshowerunpacker.h:28
 hshowerunpacker.h:29
 hshowerunpacker.h:30
 hshowerunpacker.h:31
 hshowerunpacker.h:32
 hshowerunpacker.h:33
 hshowerunpacker.h:34
 hshowerunpacker.h:35
 hshowerunpacker.h:36
 hshowerunpacker.h:37
 hshowerunpacker.h:38
 hshowerunpacker.h:39
 hshowerunpacker.h:40
 hshowerunpacker.h:41
 hshowerunpacker.h:42
 hshowerunpacker.h:43
 hshowerunpacker.h:44
 hshowerunpacker.h:45
 hshowerunpacker.h:46
 hshowerunpacker.h:47
 hshowerunpacker.h:48
 hshowerunpacker.h:49
 hshowerunpacker.h:50
 hshowerunpacker.h:51
 hshowerunpacker.h:52
 hshowerunpacker.h:53
 hshowerunpacker.h:54
 hshowerunpacker.h:55
 hshowerunpacker.h:56
 hshowerunpacker.h:57
 hshowerunpacker.h:58
 hshowerunpacker.h:59
 hshowerunpacker.h:60
 hshowerunpacker.h:61
 hshowerunpacker.h:62
 hshowerunpacker.h:63
 hshowerunpacker.h:64
 hshowerunpacker.h:65
 hshowerunpacker.h:66
 hshowerunpacker.h:67
 hshowerunpacker.h:68
 hshowerunpacker.h:69
 hshowerunpacker.h:70
 hshowerunpacker.h:71
 hshowerunpacker.h:72
 hshowerunpacker.h:73
 hshowerunpacker.h:74
 hshowerunpacker.h:75
 hshowerunpacker.h:76
 hshowerunpacker.h:77
 hshowerunpacker.h:78
 hshowerunpacker.h:79
 hshowerunpacker.h:80
 hshowerunpacker.h:81
 hshowerunpacker.h:82
 hshowerunpacker.h:83
 hshowerunpacker.h:84
 hshowerunpacker.h:85
 hshowerunpacker.h:86
 hshowerunpacker.h:87
 hshowerunpacker.h:88
 hshowerunpacker.h:89
 hshowerunpacker.h:90
 hshowerunpacker.h:91
 hshowerunpacker.h:92
 hshowerunpacker.h:93
 hshowerunpacker.h:94
 hshowerunpacker.h:95