Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

EDControl.h

Go to the documentation of this file.
00001 
00002 /*************************************************************************
00003 
00004  EDControl class.
00005 
00006  Overall control class.  Connects last known raw/recon files, starts the
00007  GUI, opens the canvas and initialises analysis histos.  Responds to
00008  requests made by user via the GUI.
00009 
00010  -------------------------------------
00011 
00012  Authors: N Lumb, Gloria Spandre; INFN-Pisa.
00013 
00014  Start date: Sept. 2001.
00015 
00016 *************************************************************************/
00017 
00018 
00019 
00020 #ifndef EDCONTROL_H
00021 
00022 #define EDCONTROL_H
00023 
00024 
00025 #include <stdlib.h>
00026 #include <iostream.h>
00027 #include <fstream.h>
00028 
00029 
00030 #include "TFile.h"
00031 #include "TTree.h"
00032 #include "TCanvas.h"
00033 #include "digiRootData/DigiEvent.h"
00034 #include "reconRootData/Recon.h"
00035 
00036 #include "bfemDisplay/EDHistos.h"
00037 
00038 
00039 #define CALPEDS_MAY2001 "../calibration/bfem_calpeds.root"
00040 #define CALPEDS_AUG2001 "../calibration/bfem_cal_peds.root"
00041 
00042 #define ACDPEDS "../calibration/bfem_peds_acd.dat"
00043 #define XGTPEDS "../calibration/bfem_peds_xgt.dat"
00044 
00045 #define NACD 13
00046 #define NXGT 4
00047 
00048 #define kForwards kTRUE
00049 #define kBackwards kFALSE
00050 
00051 
00052 
00053 class EDControl {
00054 
00055  private:
00056 
00057   TFile      *m_rawFile;         // input raw file
00058   TFile      *m_reconFile;       // input recon file
00059   TTree      *m_rawTree;         // pointer to the raw TTree
00060   TTree      *m_reconTree;       // pointer to the recon TTree
00061   DigiEvent  *m_event;           // <<======= The new digiclass definition
00062   Recon      *m_recon;
00063 
00064   TObjArray  *m_ped;             // contains 8 TVector with the pedestals of CALlogs (80 logs) 
00065   TObjArray  *m_acdped;          // contains 2 TVector with IDs and pedestals of ACDs subdet
00066   TObjArray  *m_xgtped;          // contains 2 TVector with IDs and pedestals of XGTs subdet
00067 
00068   EDHistos   *m_histos;          // Analysis histograms.
00069 
00070   TCanvas    *m_canvas;          // Display canvas.
00071 
00072   ifstream   m_rawPathFile;      // ASCII file containing name of raw file.
00073   ifstream   m_reconPathFile;    // ASCII file containing name of recon file.
00074   ifstream   m_acdPedFile;       // ASCII file containing ACD peds.
00075   ifstream   m_xgtPedFile;       // ASCII file containing XGT peds.
00076 
00077   Bool_t     m_rawFileExists;
00078   Bool_t     m_reconFileExists;
00079   Bool_t     m_StopDisplayLoop;
00080   Bool_t     m_isRealData;
00081 
00082   Int_t      m_numEntries;   // Maximum number of events that can be processed.
00083 
00084   TObjArray*  ReadCALPed();             // Read pedestals for 80 CALlogs x 2 End x 4 Range 
00085   TObjArray*  ReadACDPed();             // Read pedestals and Ids for 13 ACDs
00086   TObjArray*  ReadXGTPed();             // Read pedestals and Ids for 4 XGTs
00087   
00088 
00089  public:
00090 
00091   EDControl();
00092   ~EDControl();
00093 
00094   void ConnectNewRawFile( Char_t *fname );
00095   void ConnectNewReconFile( Char_t *fname );
00096 
00097   Int_t checkNumEntries();
00098 
00099   void processCommand( Int_t userReq, Int_t evtNo=1000000 );
00100 
00101   // Inline functions.
00102   TTree *getRawTree() { return m_rawTree; }
00103   TTree *getReconTree() { return m_reconTree; }
00104   DigiEvent *getEvent() { return m_event; }
00105   Recon *getRecon() { return m_recon; }
00106 
00107   EDHistos *getHistos() { return m_histos; }
00108   TObjArray *getCALPeds() { return m_ped; }
00109   TObjArray *getACDPeds() { return m_acdped; }
00110   TObjArray *getXGTPeds() { return m_xgtped; }
00111 
00112   void setRawDataType( Bool_t datatype ) { m_isRealData = datatype; }
00113   Bool_t getRawDataType() { return m_isRealData; }
00114 
00115   TCanvas *getCanvas() { return m_canvas; }
00116 
00117   Int_t getEntries() { return m_numEntries; }
00118   
00119 
00120 };
00121 
00122 
00123 #endif
00124 
00125 
00126 
00127 
00128 

Generated at Mon Nov 26 18:20:06 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000