ana.cxx

Go to the documentation of this file.
00001 // Default program for dealing with various standard TRIUMF VME setups:
00002 // V792, V1190 (VME), L2249 (CAMAC), Agilent current meter
00003 //
00004 //
00005 
00006 #include <stdio.h>
00007 #include <iostream>
00008 #include <time.h>
00009 
00010 #include "TRootanaEventLoop.hxx"
00011 #include "TAnaManager.hxx"
00012 
00013 
00014 class Analyzer: public TRootanaEventLoop {
00015 
00016 
00017 
00018 
00019 public:
00020 
00021         // An analysis manager.  Define and fill histograms in 
00022         // analysis manager.
00023         TAnaManager *anaManager;
00024 
00025   Analyzer() {
00026     //DisableAutoMainWindow();
00027 
00028                 anaManager = 0;
00029     
00030   };
00031 
00032   virtual ~Analyzer() {};
00033 
00034   void Initialize(){
00035 
00036 
00037   }
00038 
00039         void Init(){
00040 
00041                 if(anaManager)
00042                         delete anaManager;
00043                 anaManager = new TAnaManager();
00044         }
00045 
00046 
00047   void BeginRun(int transition,int run,int time){
00048 
00049                 Init();
00050 
00051   }
00052 
00053 
00054   bool ProcessMidasEvent(TDataContainer& dataContainer){
00055 
00056                 if(!anaManager) Init();
00057 
00058                 anaManager->ProcessMidasEvent(dataContainer);
00059 
00060     return true;
00061   }
00062 
00063 
00064 }; 
00065 
00066 
00067 int main(int argc, char *argv[])
00068 {
00069 
00070   Analyzer::CreateSingleton<Analyzer>();
00071   return Analyzer::Get().ExecuteLoop(argc, argv);
00072 
00073 }
00074 

Generated on 12 Feb 2016 for ROOT Analyzer by  doxygen 1.6.1