Index: trunk/MagicSoft/include-Classes/LinkDef.h
===================================================================
--- trunk/MagicSoft/include-Classes/LinkDef.h	(revision 306)
+++ trunk/MagicSoft/include-Classes/LinkDef.h	(revision 306)
@@ -0,0 +1,27 @@
+#ifdef __CINT__
+#define __CINT__
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+ 
+#pragma link C++ class MRawEvt; 
+#pragma link C++ class MRawPixel;  
+#pragma link C++ class MMcEvt;
+#pragma link C++ class MMcRunHeader;
+#pragma link C++ class MCameraDisplay;
+#pragma link C++ class MCameraPixel;
+#pragma link C++ class MCameraCoord;
+#pragma link C++ class MFastControl;
+#pragma link C++ class MCurrentPixel;
+
+
+//globale Variablen
+//#pragma link C++ global File;
+
+
+#endif
+
+
+
+
Index: trunk/MagicSoft/include-Classes/MMcEvt.cxx
===================================================================
--- trunk/MagicSoft/include-Classes/MMcEvt.cxx	(revision 306)
+++ trunk/MagicSoft/include-Classes/MMcEvt.cxx	(revision 306)
@@ -0,0 +1,165 @@
+#include <iostream.h>
+#include "MMcEvt.h"
+
+
+//==========
+// MMcEvt
+//    
+// This class handles and contains the MonteCarlo information
+// with which the events have been generated
+// This information exists for each event.
+ 
+
+
+ClassImp(MMcEvt)
+
+
+
+MMcEvt::MMcEvt() {
+  //
+  //  default constructor
+  //  set all values to zero
+
+  usPartId = 0  ;
+  fEnergy  = 0. ;
+
+  fTheta   = 0. ;
+  fPhi     = 0. ;
+
+  fCoreD   = 0. ;
+  fCoreX   = 0. ;
+  fCoreY   = 0. ;
+  fImpact  = 0. ;
+
+  usPhotIni      = 0 ;
+  usPassPhotAtm  = 0 ;
+  usPassPhotRef  = 0 ;
+  usPassPhotCone = 0 ;
+  usPhotEl       = 0 ;
+}
+
+MMcEvt::MMcEvt( UShort_t usPId, 
+		Float_t  fEner, 
+		Float_t  fThet, 
+		Float_t  fPhii, 
+		Float_t  fCorD, 
+		Float_t  fCorX, 
+		Float_t  fCorY,
+		Float_t  fImpa, 
+		UShort_t usPin, 
+		UShort_t usPat,  
+		UShort_t usPre, 
+		UShort_t usPco,  
+		UShort_t usPel ) {
+  //
+  //  constuctor II 
+  //
+  //  All datamembers are parameters. 
+  //
+  //  Don't use this memberfunction in analysis
+  //  
+
+  usPartId = usPId  ;
+  fEnergy  = fEner  ;
+
+  fTheta   = fThet ;
+  fPhi     = fPhii ;
+
+  fCoreD   = fCorD ;
+  fCoreX   = fCorX ;
+  fCoreY   = fCorY ;
+  fImpact  = fImpa ;
+
+  usPhotIni      = usPin ;
+  usPassPhotAtm  = usPat ;
+  usPassPhotRef  = usPre ;
+  usPassPhotCone = usPco ;
+  usPhotEl       = usPel ;
+}
+
+
+
+MMcEvt::~MMcEvt() {
+  //
+  //  default destructor
+  //
+}
+
+
+
+
+void MMcEvt::Clear() {
+  //
+  //  
+  //  reset all values to zero
+
+  usPartId = 0  ;
+  fEnergy  = 0. ;
+
+  fTheta   = 0. ;
+  fPhi     = 0. ;
+
+  fCoreD   = 0. ;
+  fCoreX   = 0. ;
+  fCoreY   = 0. ;
+  fImpact  = 0. ;
+
+  usPhotIni      = 0 ;
+  usPassPhotAtm  = 0 ;
+  usPassPhotRef  = 0 ;
+  usPassPhotCone = 0 ;
+  usPhotEl       = 0 ;
+}
+void MMcEvt::Fill( UShort_t usPId, 
+		   Float_t  fEner, 
+		   Float_t  fThet, 
+		   Float_t  fPhii, 
+		   Float_t  fCorD, 
+		   Float_t  fCorX, 
+		   Float_t  fCorY,
+		   Float_t  fImpa, 
+		   UShort_t usPin, 
+		   UShort_t usPat,  
+		   UShort_t usPre, 
+		   UShort_t usPco,  
+		   UShort_t usPel ) {
+  //
+  //  All datamembers are filled with the correspondin parameters. 
+  //
+  //  Don't use this memberfunction in analysis
+  //  
+
+  usPartId = usPId  ;
+  fEnergy  = fEner  ;
+
+  fTheta   = fThet ;
+  fPhi     = fPhii ;
+
+  fCoreD   = fCorD ;
+  fCoreX   = fCorX ;
+  fCoreY   = fCorY ;
+  fImpact  = fImpa ;
+
+  usPhotIni      = usPin ;
+  usPassPhotAtm  = usPat ;
+  usPassPhotRef  = usPre ;
+  usPassPhotCone = usPco ;
+  usPhotEl       = usPel ;
+}
+
+
+
+void MMcEvt::Print(Option_t *Option) {
+  //
+  //  print out the data member on screen
+  //
+  cout <<endl << "Monte Carlo output:" <<endl;
+  cout << " Particle Id    : " << usPartId ; 
+  cout << " Energy (GeV)   : " << fEnergy  ; 
+  cout << " Impactpar. (m) : " << fImpact  ; 
+  cout << " Photoelectrons : " << usPhotEl ; 
+  cout << endl ; 
+}
+
+    
+
Index: trunk/MagicSoft/include-Classes/MMcEvt.h
===================================================================
--- trunk/MagicSoft/include-Classes/MMcEvt.h	(revision 306)
+++ trunk/MagicSoft/include-Classes/MMcEvt.h	(revision 306)
@@ -0,0 +1,108 @@
+#ifndef __MMcEvt__
+#define __MMcEvt__
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>  
+
+#include <iostream.h>
+#include "TObject.h"
+
+
+class MMcEvt : public TObject {
+ private:
+  UShort_t usPartId;     // Type of particle
+  Float_t fEnergy;       // Energy in GeV
+
+  Float_t fTheta;        // Theta angle of event 
+  Float_t fPhi;          // Phi angle of event 
+
+  Float_t fCoreD;        // Core d pos
+  Float_t fCoreX;        // Core x pos
+  Float_t fCoreY;        // Core y pos
+  Float_t fImpact;       // impact parameter
+
+  UShort_t usPhotIni;      // Initial number of photons
+  UShort_t usPassPhotAtm;  // Passed atmosphere
+  UShort_t usPassPhotRef;  // Passed reflector
+  UShort_t usPassPhotCone; // Passed glas
+  UShort_t usPhotEl    ;   // Passed qe
+ 
+
+ public:
+  MMcEvt() ;
+  
+  MMcEvt( UShort_t, 
+	  Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t,
+	  UShort_t, UShort_t, UShort_t, UShort_t, UShort_t ) ; 
+  
+  ~MMcEvt(); 
+
+  void Clear();
+
+  void Fill( UShort_t, 
+	     Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t,
+	     UShort_t, UShort_t, UShort_t, UShort_t, UShort_t ) ; 
+
+
+  void Print(Option_t *);
+
+
+
+/*    Short_t GetPartId() { return usPartId; }       //Get Type of particle */
+/*    Float_t GetEnergy() { return fEnergy; }        //Get Energy */
+
+/*    Float_t GetTheta() { return fTheta; }          //Get Theta angle */
+/*    Float_t GetPhi() { return fPhi ;  }            //Get Phi angle */
+
+/*    Float_t GetCoreD() { return fCoreD; }          //Get Core d pos */
+/*    Float_t GetCoreX() { return fCoreX; }          //Get Core x pos */
+/*    Float_t GetCoreY() { return fCoreY; }          //Get Core y pos */
+/*    Float_t GetImpact() { return fImpact;}         //Get impact parameter */
+
+/*    Short_t GetPhotIni() { return usPhotIni; }           //Get Initial photons */
+/*    Short_t GetPassPhotAtm() { return usPassPhotAtm;}    //Get Passed atmosphere */
+/*    Short_t GetPassPhotRef() { return usPassPhotRef; }   //Get Passed reflector */
+/*    Short_t GetPassPhotCone() { return usPassPhotCone; } //Get Passed glas */
+/*    Short_t GetPhotEl() { return usPhotEl; }             //Get Passed qe */
+
+
+
+ /*  void SetPartId(Short_t PartId)  */
+/*     { usPartId=PartId; }             //Set Type of particle */
+/*   void SetEnergy(Float_t Energy)  */
+/*     { fEnergy=Energy; }              //Set Energy */
+ 
+/*   void SetTheta(Float_t Theta)  */
+/*     { fTheta=Theta; }                //Set Theta angle */
+/*   void SetPhi(Float_t Phi)  */
+/*     { fPhi=Phi;  }                   //Set Phi angle */
+ 
+/*    void SetCoreD(Float_t CoreD)  */
+/*      { fCoreD=CoreD; }                //Set Core d pos */
+/*    void SetCoreX(Float_t CoreX)  */
+/*      { fCoreX=CoreX; }                //Set Core x pos */
+/*    void SetCoreY(Float_t CoreY )  */
+/*      { fCoreY=CoreY; }                //Set Core y pos */
+/*    void SetImpact(Float_t Impact)  */
+/*      { fImpact=Impact;}               //Set impact parameter */
+  
+/*    void SetPhotIni(Short_t PhotIni)  */
+/*      { usPhotIni=PhotIni; }                 //Set Initial photons */
+/*    void SetPassPhotAtm(Short_t PassPhotAtm)  */
+/*      { usPassPhotAtm=PassPhotAtm;}         //Set Passed atmosphere */
+/*    void SetPassPhotRef(Short_t PassPhotRef)  */
+/*      { usPassPhotRef=PassPhotRef ; }       //Set Passed reflector */
+/*    void SetPassPhotCone(Short_t PhotCon)  */
+/*      { usPassPhotCone=PhotCon; }           //Set Passed glas */
+/*    void SetPhotEl(Short_t PhotEl)  */
+/*      { usPhotEl=PhotEl; }                  //Set Passed qe */
+
+
+  ClassDef(MMcEvt, 1)  //Stores Montecarlo Information 
+
+};
+
+#endif
Index: trunk/MagicSoft/include-Classes/MRawEvt.cxx
===================================================================
--- trunk/MagicSoft/include-Classes/MRawEvt.cxx	(revision 306)
+++ trunk/MagicSoft/include-Classes/MRawEvt.cxx	(revision 306)
@@ -0,0 +1,268 @@
+#include <iostream.h>
+#include "TClonesArray.h"
+#include "TString.h"
+#include "TRandom.h"
+
+#include "MRawEvt.h"
+#include "MRawPixel.h"
+
+#include "Mdefine.h"
+//==========
+// MRawEvt 
+//    
+// One Event is a sample of FADC measurements of different Pixels 
+// (Photomultipliers) from the Camera of MAGIC. So all data (FADC) of the 
+// interesting pixels are the modules of an event. To describe pixels the 
+// class MRawPixel is used.  To define a single events
+// some other data members are needed (Time of the events, kind of event..).
+//
+// To describe one event on the level of FADC values the Class MRawEvt is
+// created. It has the following data members: 
+//
+// ----------
+//
+// UInt_t    uiEvtNo    
+//
+// This it the number of the Event in one 
+// data run. The first event in this run get
+// the number zero. The next one is one bigger.
+//
+// Assuming that one run takes 1 hour and a
+// triggerrate of 1kHz the number must be able
+// to reach 3.6e6 Events. To reach this number
+// you need at least 22 bits. This is the reason
+// why we use an integer (of root type UInt_t)
+// with a range to 4.2e9. 
+//
+// ----------
+//
+// ULong_t   ulTimeStamp
+//   
+// Time of the event. 
+// The start point of the time determination can be
+// the millenium. From that start point the time is
+// measured in 200ns-count. One day for example
+// contains 432.e9 counts. An unsigned Long is able to 
+// contain 1.8e19 200ns-counts. This corresponds to 41.e6
+// days. This should be more than the livetime of MAGIC.
+//
+// ----------
+//
+// UChar_t   ucEvtStatus 
+//
+// Status of Event. 
+// This is a Byte (8 bit) to indicated the status of 
+// the event (Pedestal, Calibration, etc). 
+//
+// ----------
+//
+// UShort_t  usTrig1st
+//
+// Number of first level trigger
+// This member counts the number of First Level Trigger
+// between the last and this event. May be that due to 
+// dead time of the DAQ this number is different from 1.
+// If the DAQ is fast enough, this value should be 1. 
+// This may be usefull in GammaRayBursts and if we 
+// apply a data reduction in the DAQ-chain, which selects
+// only good events. 
+//
+// ----------
+//
+// UShort_t  usMultPixel
+//
+// Multiplicity of Pixels
+// Each event consists of a specific number of 
+// pixels. This is the number of pixels in one event. 
+// The array of ClonesPixels (taClonesArray) is of this
+// size. 
+//
+// ----------
+//
+// TClonesArray  *taPixels
+//
+// Array of Pixels 
+// The Clones array is a list of the Pixels used in one
+// event with the information about the Pixels. 
+//
+//
+
+//
+void GetFadcNoise ( UChar_t asF[] ) 
+{
+  static TRandom Gen ; 
+  static Float_t z1, z2 ; 
+  for (Int_t i=0; i<FADC_SLICES; i++ ) {   
+    Gen.Rannor(z1, z2) ;
+    asF[i] = 10 + (UChar_t)(z1*4) ;  
+    // if (asF[i] < 0 ) asF[i] = 0 ; 
+  } 
+} 
+
+ClassImp(MRawEvt) 
+
+MRawEvt::MRawEvt() {
+  //
+  //   Implementation of the default constructor
+  //
+  //   set all member to zero, init the pointer to ClonesArray, 
+
+  uiEvtNo      = 0 ; 
+  ulTimeStamp  = 0 ; 
+  ucEvtStatus  = 0 ; 
+  usTrig1st    = 0 ;
+  usMultPixel  = 0 ; 
+
+  // 
+  //   Then we have to initialize the ClonesArray list for the Pixels. 
+  //   This is neccessary once! 
+  //
+  //   initialize the list to this global pointer
+  
+  taPixels = new TClonesArray ("MRawPixel", 2*CAMERA_PIXELS ) ; 
+
+  cout << " default constructor " << endl ; 
+}
+
+
+MRawEvt::~MRawEvt() {
+  //
+  //   Implementation of the default destructor
+  //
+  delete taPixels ; 
+  cout << " default destructor " << endl ; 
+}
+
+void MRawEvt::Clear() {
+  //
+  //   Implementation of the Clear function
+  //
+  //   Resets all members to zero, clear the list of Pixels
+  //
+  uiEvtNo      = 0 ; 
+  ulTimeStamp  = 0 ; 
+  ucEvtStatus  = 0 ; 
+  usTrig1st    = 0 ;
+  usMultPixel  = 0 ; 
+
+  taPixels->Clear() ; 
+}
+
+
+
+void MRawEvt::Print() {
+  //
+  //  This member function prints all Data of one Event on screen. 
+  //
+
+  // Prints out the data of one Pixel
+  cout << endl << "EventNumber      " << uiEvtNo          ; 
+  cout << endl << "Event Time Stamp " << ulTimeStamp      ;
+  cout << endl << "Event Status     " << (int) ucEvtStatus      ; 
+  cout << endl << "Trigger 1. Level " << usTrig1st        ; 
+  cout << endl << "Number of Pixels " << usMultPixel      ; 
+
+  for (Int_t i=0 ; i<usMultPixel; i++ ) {
+    ((MRawPixel *)taPixels->At(i))->Print() ;    
+  }
+}
+
+
+void MRawEvt::FillRandom ( UInt_t uiN, ULong_t ulT,  UShort_t usMuPi ) {
+  //
+  //  This is neccessary to fill the MRawEvt Class with randomized FADC
+  //  values. The EventNumber, EventTime and the Number of Pixels are given 
+  //  as parameters. 
+  // 
+
+  uiEvtNo      = uiN ; 
+  ulTimeStamp  = ulT ; 
+
+  UChar_t   ucA[FADC_SLICES] ;
+
+  for (UShort_t i = 0 ; i< usMuPi; i++ ) {
+    GetFadcNoise ( ucA ) ;   
+  
+    TClonesArray &caP = *taPixels ;
+    new ( caP[usMultPixel++] ) MRawPixel((usMultPixel), 0, ucA) ; 
+  }
+}
+
+void MRawEvt::FillHeader ( UInt_t uiN, ULong_t ulT ) {
+   
+  uiEvtNo      = uiN ; 
+  ulTimeStamp  = ulT ; 
+  
+  ucEvtStatus  = 0 ; 
+  usTrig1st    = 0 ;
+  usMultPixel  = 0   ; 
+
+  taPixels->Clear()  ; 
+}
+
+void MRawEvt::FillPixel ( UShort_t uiPix, Float_t *array ) {
+  //
+  //  This is to fill the data of one pixel to the MRawEvt Class. 
+  //  The parameters are the pixelnumber and the FADC_SLICES values of ADCs
+  // 
+
+  UChar_t   ucA[FADC_SLICES] ;
+
+  for (UShort_t i = 0 ; i< FADC_SLICES ; i++ ) {
+    ucA[i] = (UShort_t) array[i] ; 
+  } 
+  
+  TClonesArray &caP = *taPixels ;
+  new ( caP[usMultPixel++] ) MRawPixel((uiPix), 0, ucA) ; 
+}
+
+void MRawEvt::FillMontCarl ( UInt_t uiN, ULong_t ulT,  Float_t *array ) {
+  //
+  //  This is neccessary to fill the MRawEvt Class with randomized FADC
+  //  values. The EventNumber, EventTime and the Number of Pixels are given 
+  //  as parameters. 
+  // 
+
+  uiEvtNo      = uiN ; 
+  ulTimeStamp  = ulT ; 
+
+  usMultPixel = 0 ; 
+
+  UChar_t   ucA[FADC_SLICES] ;
+
+  for (UShort_t i = 0 ; i< CAMERA_PIXELS; i++ ) {
+
+    if ( array[i] > 0. ) { 
+      for ( Int_t ii = 0 ; ii < FADC_SLICES ; ii++ ) { 
+	ucA[ii] = 0 ; 
+      }
+      ucA[5] = (UShort_t) (array[i]) ; 
+      
+      TClonesArray &caP = *taPixels ;
+      new ( caP[usMultPixel++] ) MRawPixel(i, 0, ucA) ; 
+    }
+  }
+}
+
+UShort_t MRawEvt::GetMultPixel() {
+  //
+  //  returns the pixel multiplicity of the Event
+  //
+  return usMultPixel;
+}
+
+
+//  void MRawEvt::AddPixel ( UShort_t usP ) {
+//    //
+//    //   Implementation of the AddPixel function
+//    //
+
+//    cout << " need implementation " << endl ;  
+//  }
+
+//  void MRawEvt::AddPixel ( UShort_t usP, UChar_t ucStat, UChar_t ausAR[] ) {
+//    cout << " need implementation 2 " << endl ;  
+//  }
+
+
+
Index: trunk/MagicSoft/include-Classes/MRawEvt.h
===================================================================
--- trunk/MagicSoft/include-Classes/MRawEvt.h	(revision 306)
+++ trunk/MagicSoft/include-Classes/MRawEvt.h	(revision 306)
@@ -0,0 +1,77 @@
+#ifndef __MRawEvt__
+#define __MRawEvt__
+
+#include <iostream.h>
+#include "TObject.h"
+#include "TClonesArray.h"
+
+#include "Mdefine.h" 
+
+class MRawEvt : public TObject { 
+
+ private: 
+  UInt_t        uiEvtNo     ;  // Number of Event
+
+  ULong_t       ulTimeStamp ;  // Time of the Event
+
+  UChar_t       ucEvtStatus ;  // Status of this event (DAQ, Pedestal, ..) 
+ 
+  UShort_t      usTrig1st   ;  // Number of 1st level tiggers between 2 events
+
+  UShort_t      usMultPixel ;  // Multiplicity of the Pixels in this event   
+
+  TClonesArray  *taPixels   ;  // list of the events
+
+ public: 
+
+  MRawEvt() ; 
+
+  ~MRawEvt(); 
+
+  void Clear() ; 
+  
+  void Print() ; 
+
+  void FillRandom( UInt_t, ULong_t, UShort_t   ) ; 
+
+  void FillHeader( UInt_t, ULong_t ) ; 
+
+  void FillPixel(  UShort_t, Float_t * ) ; 
+ 
+  void FillMontCarl ( UInt_t, ULong_t, Float_t * ) ;
+
+  UShort_t GetMultPixel(); 
+
+  TClonesArray *&GetPixelList() {
+  //
+  //   returns a Pointer to the pixel list
+  //
+  return  taPixels ;
+}
+
+
+/*    void AddPixel( UShort_t  ) ;  */
+
+/*    void AddPixel ( UShort_t, UChar_t, UChar_t * ) ;  */
+
+
+  ClassDef ( MRawEvt, 1 )  
+
+};  // end of class definition of MRawEvt
+
+#endif
+
+
+
+
+
+  
+
+
+
+
+  
+
+
+
+
Index: trunk/MagicSoft/include-Classes/MRawPixel.cxx
===================================================================
--- trunk/MagicSoft/include-Classes/MRawPixel.cxx	(revision 306)
+++ trunk/MagicSoft/include-Classes/MRawPixel.cxx	(revision 306)
@@ -0,0 +1,152 @@
+#include <iostream.h>
+
+#include "TClonesArray.h"
+#include "TString.h"
+#include "TRandom.h"
+
+#include "MRawPixel.h"
+
+#include "Mdefine.h"
+
+//==========
+// MRawPixel 
+//    
+// One Event in the Camera of MAGIC consists of measurements of different
+// Photomultiplier. The measurements are taken with FADCs. So the raw 
+// informations of one pixel are the ADC values of the FADCs. MAGIC will
+// measure the amplitude of one Photomulitplier in different branches 
+// - one high and one low gain branch. The first is for small signals, the 
+// other for big signals. With this method it is possible to increase the 
+// dynamic range.  
+//
+// The Class MRawPixel is used to manage this raw information. 
+//
+// The data members are described in detail here: 
+//
+// ---------
+//
+// UShort_t     usPixelId     ;   
+//
+// This is to identify the Pixel.
+// The Camera consists of CAMERA_PIXELS Pixels. Each one has a specific Id.
+// The center of the camera is zero and a spiral numbering is chosen.
+//
+// To reduce the amount of data, we store the information of the 
+// low-gain-branch of the Fadc´s only if there is a signal in. Then the 
+// usPixelId is:
+//                   usPixelId = 10000 + PixelId   . 
+//
+// For the high gain Fadc values the rule is:
+//                   usPixelId = PixelId . 
+//
+//
+// ---------
+//
+// UChar_t      ucPixelStatus ;   
+//
+// The PixelStatus may contain information if the Pixel has triggered 
+// this event. Also the kind of gain-branch (high or low) may be indicated 
+// by one bit of the ucPixelStatus. etc
+//
+// ---------
+//
+// UChar_t      aucFadc[ FADC_SLICES ]  ; 
+//
+// The values of FADC_SLICES fadc-slices. This is the information of the 
+// measured ADC values for one branch (high gain or low gain). The typ of 
+// branch is indicated in the usPixelNumber and in the ucPixelStatus.
+
+ClassImp(MRawPixel) 
+
+
+
+MRawPixel::MRawPixel() {
+  //
+  //  The default constructor sets all members to zero. 
+  //
+    
+    usPixelId     = 0 ; 
+    ucPixelStatus = 0 ; 
+    
+    for (Int_t i = 0; i<FADC_SLICES; i++) 
+      aucFadc[i]   = 0 ; 
+}
+
+
+MRawPixel::MRawPixel(UShort_t PId) {
+  //
+  //  constructor II  overloaded
+  //
+  //  Parameter is the PixelId. All other data member are set to zero
+  
+  usPixelId     = PId ; 
+  ucPixelStatus = 0 ; 
+  
+  for (Int_t i = 0; i<FADC_SLICES; i++) 
+    aucFadc[i]   = 0 ; 
+}
+
+
+MRawPixel::MRawPixel(UShort_t usPId, UChar_t ucSt, UChar_t ucF[]) {
+  //
+  // constructor III overloaded 
+  //
+  // parameters are PixelId, Status and an array with Fadc numbers.
+  
+  usPixelId     = usPId ; 
+  ucPixelStatus = ucSt  ; 
+  
+  for (Int_t i = 0; i<FADC_SLICES; i++) 
+    aucFadc[i]   = ucF[i] ; 
+}
+MRawPixel::~MRawPixel(){
+  //
+  //  default destructor
+  //
+}
+
+void MRawPixel::Clear() {
+  //
+  //  Sets the data member back to zero
+  //
+  usPixelId     = 0 ; 
+  ucPixelStatus = 0 ; 
+  
+  for (Int_t i = 0; i<FADC_SLICES; i++) 
+    aucFadc[i]   = 0 ; 
+} 
+
+
+void MRawPixel::Print() 
+{
+  //
+  //  This member function prints all Data of one Pixel on screen. 
+  //
+
+  cout << endl << "PixId " << usPixelId          ; 
+  cout << " Stat " << (Int_t) ucPixelStatus << " --> "     ;
+
+  for (Int_t i=0 ; i<FADC_SLICES ; i++ ) {
+    cout<<" / " << (int) aucFadc[i] ; 
+  } 
+}
+  
+UShort_t MRawPixel::GetPixelId() {
+  //
+  // returns back the PixelId of the Pixel
+  //
+  return usPixelId;
+}
+
+UChar_t MRawPixel::GetFadcSlice( Int_t iSli ) {
+  //
+  // returns back the fadc content of the slice iSli 
+  //
+  return ( aucFadc[iSli] ) ; 
+}
+
+
+
+
+
+
Index: trunk/MagicSoft/include-Classes/MRawPixel.h
===================================================================
--- trunk/MagicSoft/include-Classes/MRawPixel.h	(revision 306)
+++ trunk/MagicSoft/include-Classes/MRawPixel.h	(revision 306)
@@ -0,0 +1,59 @@
+#ifndef __MRawPixel__
+#define __MRawPixel__
+
+#include <iostream.h>
+#include "TObject.h"
+
+#include "Mdefine.h" 
+
+
+class MRawPixel  : public TObject
+ {
+
+ private: 
+
+  UShort_t     usPixelId     ;           //  Identification of PixelNumber and gain branch
+
+  UChar_t      ucPixelStatus ;           //  The Status of the pixel
+
+  UChar_t      aucFadc[ FADC_SLICES ]  ; // The values of fadc-slices.
+
+ public:
+
+  MRawPixel() ; 
+
+  MRawPixel(UShort_t ) ; 
+
+  MRawPixel(UShort_t , UChar_t , UChar_t * ) ; 
+
+  ~MRawPixel() ; 
+
+  void Clear() ; 
+
+  void Print() ; 
+
+  UShort_t GetPixelId() ; 
+
+  UChar_t GetFadcSlice( Int_t  ) ; 
+
+  ClassDef ( MRawPixel, 1 )
+  
+};  // end of class definition of MRawPixel 
+
+
+#endif
+
+
+
+
+
+  
+
+
+
+
+  
+
+
+
+
Index: trunk/MagicSoft/include-Classes/Mdefine.h
===================================================================
--- trunk/MagicSoft/include-Classes/Mdefine.h	(revision 306)
+++ trunk/MagicSoft/include-Classes/Mdefine.h	(revision 306)
@@ -0,0 +1,41 @@
+//
+//     Mdefine.h
+//
+//     defines some Values for the MAGIC telecope
+//
+
+//     Number of the Pixels in the Camera
+
+#define     CAMERA_PIXELS         919
+
+//     Number of the Slices of one Fadc. Be carefull this is the number of 
+//     slices for one gain branch. We sample two times this number. 
+
+#define     FADC_SLICES            15
+
+//     ParticleId for Monte Carlo simulation
+
+#define  GAMMA 0
+#define  PROTON 14
+#define  HELIUM 402
+#define  OXIGEN 1608
+#define  IRON 5626
+
+
+//---------------------------------------------------------
+// definition of constants
+
+#define TRUE 1
+#define FALSE 0
+
+#define MAX_ADC 30  // nummber of ADC conversions per pixel
+
+//camera dimensions and definitions
+#define PIXEL_DIST  10.0  //cm
+#define CAMERA_COLOR 13   //Background light grey
+#define DEFAULT_COLOR 1 //black
+//#define TRACK_WALL_COLOR 7   //light blue
+#define PIXEL_LINE_COLOR 15 //dark grey
+#define COLORTABLE_START 18 //Begin of colortable
+#define MAX_PH_EL 500 //upper limit for colortable
+
