PREAN/TFndPreanMan.h

00001 // @(#)fROOT/PREAN:$Name:  $:$Id: TFndPreanMan.h,v 1.33 2007/10/04 14:10:26 Diego_Faso Exp $
00002 // Author: Diego Faso <mailto:faso@to.infn.it>, 2005/06/24
00003 
00004 #ifndef FROOT_TFndPreanMan
00005 #define FROOT_TFndPreanMan
00006 
00007 #include <TString.h>
00008 #include "TFile.h"
00009 
00010 #include "TFndRun.h"
00011 #include "FIN_PHYS.h"
00012 #include "FROOT.h"
00013 
00014 //class TFndPreanHistos;
00015 class TFndPrean;
00016 class TFndGebSpy;
00017 
00018 class TFndPreanMan: public TFndRun
00019 {
00020 public:
00021   /*   enum { */
00022   /*     LUMIN_NONE    =  0,          // No luminosity evaluation */
00023   /*     LUMIN_BHABHA  =  1,          // Luminosity evaluation using Bhabha */
00024   /*     LUMIN_KPKM    =  1 << 1,     // Luminosity evaluation using K+/K- */
00025   /*     LUMIN_KLKS    =  1 << 2,     // Luminosity evaluation using KL/KS */
00026   /*     LUMIN_DEFAULT =  1 << 3 - 1, // Default: all above methods combined */
00027   /*     LUMIN_UNUSED  = -1 << 3 */
00028   /*   }; */
00029   
00030  private:
00031 
00032   TString fCurFidaVer; // current version of fidarc (used for directory structure)
00033   Int_t fNumOfProcessedFidaEvents; // starting from 1 (as for software raw-event)
00034 
00035   Int_t  fJFGES;     // Address-offset for zebra-ges-bank
00036   Int_t  fJFDST;     // Address-offset for zebra-dst-bank
00037 
00038   TFndPrean       *fPrean;  // Preanalysis calculations
00039   //  TFndPreanHistos *fHistos; // Preanalysis histograms collection
00040 
00041   TFile *fCurPreanFile; // current root-file with pre-analysis trees
00042 
00043  protected:
00044   Int_t CloseInterface(); // close shared libraries and delete fProcessRec
00045 
00046  public:
00047   TFndPreanMan(TString msqlhost="$MSQL_DB_HOST",TString data_path="$RDT",Int_t debug_lev=0);
00048   ~TFndPreanMan();
00049 
00050   void SetFidaVersion(TString ver) { fCurFidaVer = ver; }
00051   TString GetCurrentFidaVersion() { return fCurFidaVer; }
00052 
00053   Int_t InitNewPreanRun(TString runtype="ONLM",Int_t runnum=-1); // initialize interface for new run (default: online)
00054   Int_t FinishPreanRun(Bool_t last=kFALSE,Bool_t create_outfile=kTRUE); // reset interface and data members
00055 
00056   TFndPrean *GetPrean() { return fPrean; } // Get the pointer to the preanalysis implementation class
00057 
00058   Int_t GetNextFidaEvent(); // JFGES filling and geometrical hits reconstruction only (read_lib and fidarc)
00059   Int_t ReconstructFidaEvent(); // fidarc event reconstruction and JFDST filling
00060 
00061   Int_t GetNofProcessedFidaEvents() { return fNumOfProcessedFidaEvents; } //Current event (fidarc process)
00062 
00063   //  void InitHistos(); // initialize fHistos and build histograms
00064 
00065   //  UInt_t UpdateScalers();
00066   //  Int_t EvalLuminosity(Int_t Lumin=LUMIN_NONE);  // Pre-Analysis of the current raw event (ROOT)
00067 
00068   void AnalyzeJFGES(); // analyze JFGES zebra banks before processing fidarc event reconstruction
00069   void AnalyzeJFDST(); // analyze JFDST zebra banks
00070 
00071   // --- override support for logging (here TFndPrean is important)
00072   void OpenLogFile(const TString &fdir, const TString &fnam);
00073 
00074 
00076   // hide TFndRun methods that must not be used while running preanalysis
00077   
00078   void CheckRawSwapping()
00079     {
00080       MayNotUse("CheckRawSwapping (working within pre-analysis environment)");
00081       return;
00082     }
00083   
00084   Int_t CreateSocketToDAQ(E_Fnd_DaqRaw_Udp_Ports det_port)
00085     {
00086       det_port = (E_Fnd_DaqRaw_Udp_Ports)0; // suppress CINT warnings
00087       MayNotUse("CreateSocketToDAQ (working within pre-analysis environment)");
00088       return 0;
00089     }
00090 
00091   Int_t ShutdownSocketToDAQ()
00092     {
00093       MayNotUse("ShutdownSocketToDAQ (working within pre-analysis environment)");
00094       return 0;
00095     }
00096 
00097   Int_t CheckSocketToDAQ()
00098     {
00099       MayNotUse("CheckSocketToDAQ (working within pre-analysis environment)");
00100       return 0;
00101     }
00102 
00103   Int_t RecreateSocketToDAQ(E_Fnd_DaqRaw_Udp_Ports det_port)
00104     {
00105       det_port = (E_Fnd_DaqRaw_Udp_Ports)0; // suppress CINT warnings
00106       MayNotUse("RecreateSocketToDAQ (working within pre-analysis environment)");
00107       return 0;
00108     }
00109 
00110   Int_t GetNextEvent(Bool_t fill_hdt=kFALSE)
00111     {
00112       fill_hdt = 0;  // suppress CINT warnings
00113       MayNotUse("GetNextEvent (working within pre-analysis environment)");
00114       return 0;
00115     }
00116   
00117   UInt_t *GetNextRawEvent(Int_t &exit_value)
00118     {
00119       exit_value = 0; // suppress CINT warnings
00120       MayNotUse("GetNextRawEvent (working within pre-analysis environment)");
00121       return 0;
00122     }
00123 
00124   UInt_t *GetNextRawEventFromSocket(int &exit_val)
00125     {
00126       exit_val = 0; // suppress CINT warnings
00127       MayNotUse("GetNextRawEventFromSocket (working within pre-analysis environment)");
00128       return 0;
00129     }
00130 
00131   UInt_t *GetNextRawEventFromFile(int &exit_val)
00132     {
00133       exit_val = 0; // suppress CINT warnings
00134       MayNotUse("GetNextRawEventFromFile (working within pre-analysis environment)");
00135       return 0;
00136     }
00138 
00139 
00140   ClassDef(TFndPreanMan,0) // Pre-analysis manager class: nothing to be saved
00141     };
00142 
00143 #endif  // FROOT_TFndPreanMan

Generated on Tue Oct 16 15:40:47 2007 by  doxygen 1.5.2