diff --git a/Makefile b/Makefile index 03a70d59f6a85437ed7bae316b4e0c8a678dff52..ed2a5c5ee557fa9f690edc4fd50a4ff3c3b7364b 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ # there must be a corresponding header file (*.h). -SRC = src/THcInterface.cxx src/THcParmList.cxx +SRC = src/THcInterface.cxx src/THcParmList.cxx src/THcAnalyzer.cxx # Name of your package. # The shared library that will be built will get the name lib$(PACKAGE).so diff --git a/src/HallC_LinkDef.h b/src/HallC_LinkDef.h index ef0afaba16449b7735e9b849ac8444b7af41d041..650884020a171d5ab0c461547605b822e9454f69 100644 --- a/src/HallC_LinkDef.h +++ b/src/HallC_LinkDef.h @@ -8,5 +8,6 @@ #pragma link C++ class THcInterface+; #pragma link C++ class THcParmList+; +#pragma link C++ class THcAnalyzer+; #endif diff --git a/src/THcAnalyzer.cxx b/src/THcAnalyzer.cxx new file mode 100644 index 0000000000000000000000000000000000000000..a667d8095658bffc0599e1655409500262bbc70e --- /dev/null +++ b/src/THcAnalyzer.cxx @@ -0,0 +1,67 @@ +//*-- Author : Stephen Wood 13-March-2012 + +////////////////////////////////////////////////////////////////////////// +// +// THcAnalyzer +// +// THcAnalyzer is the base class for a "Hall C analyzer" class. +// An analyzer defines the basic actions to perform during analysis. +// THcAnalyzer is the default analyzer that is used if no user class is +// defined. It performs a standard analysis consisting of +// +// 1. Decoding/Calibrating +// 2. Track Reconstruction +// 3. Physics variable processing +// +// At the end of each step, testing and histogramming are done for +// the appropriate block defined in the global test/histogram lists. +// +// Hall C has their own analyzer class because some things are bound to +// be different. +// +////////////////////////////////////////////////////////////////////////// + +#include "THcAnalyzer.h" +#include "THaBenchmark.h" +#include "TList.h" + +#include <fstream> +#include <algorithm> +#include <iomanip> +#include <cstring> + +using namespace std; + + +// Pointer to single instance of this object +//THcAnalyzer* THcAnalyzer::fgAnalyzer = 0; + +//FIXME: +// do we need to "close" scalers/EPICS analysis if we reach the event limit? + +//_____________________________________________________________________________ +THcAnalyzer::THcAnalyzer() +{ + + THaAnalyzer(); + +} + +//_____________________________________________________________________________ +THcAnalyzer::~THcAnalyzer() +{ + // Destructor. + + Close(); + delete fPostProcess; //deletes PostProcess objects + delete fBench; + delete [] fStages; + delete [] fCounters; + if( fgAnalyzer == this ) + fgAnalyzer = NULL; +} + +//_____________________________________________________________________________ + +ClassImp(THcAnalyzer) + diff --git a/src/THcAnalyzer.h b/src/THcAnalyzer.h new file mode 100644 index 0000000000000000000000000000000000000000..172d12560cea9e381cae9465e9209313b38c8b39 --- /dev/null +++ b/src/THcAnalyzer.h @@ -0,0 +1,29 @@ +#ifndef ROOT_THcAnalyzer +#define ROOT_THcAnalyzer + +////////////////////////////////////////////////////////////////////////// +// +// THcAnalyzer +// +////////////////////////////////////////////////////////////////////////// + +#include "THaAnalyzer.h" + +class THcAnalyzer : public THaAnalyzer { + +public: + + THcAnalyzer(); + virtual ~THcAnalyzer(); + +protected: + +private: + // THcAnalyzer( const THcAnalyzer& ); + // THcAnalyzer& operator=( const THcAnalyzer& ); + + ClassDef(THcAnalyzer,0) //Hall C Analyzer Standard Event Loop + +}; + +#endif