From 59f3cc15d766ec92101ba19f56698885c2cdbe90 Mon Sep 17 00:00:00 2001 From: "Stephen A. Wood" <saw@jlab.org> Date: Wed, 1 Nov 2017 17:55:31 -0400 Subject: [PATCH] Hall C specific Run class THcRun. This will add the Hall C parameter DB (gHCParms) to the Run_Data object The GetHCParms method will retrieve the parameter DB --- examples/hodtest.C | 2 +- src/THcRun.cxx | 38 ++++++++++++++++++++++++++++++++++++++ src/THcRun.h | 30 ++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 src/THcRun.cxx create mode 100644 src/THcRun.h diff --git a/examples/hodtest.C b/examples/hodtest.C index 3044683..cda5065 100644 --- a/examples/hodtest.C +++ b/examples/hodtest.C @@ -93,7 +93,7 @@ char RunFileName[100]; sprintf(RunFileName,RunFileNamePattern,RunNumber); - THaRun* run = new THaRun(RunFileName); + THcRun* run = new THcRun(RunFileName); run->SetRunParamClass("THcRunParameters"); // Perhaps we should make a THcRun that does this diff --git a/src/THcRun.cxx b/src/THcRun.cxx new file mode 100644 index 0000000..025b8d8 --- /dev/null +++ b/src/THcRun.cxx @@ -0,0 +1,38 @@ +/** \class THcRun + \ingroup Base + +\brief Description of a CODA run on disk with Hall C parameter DB + +\author S. A. Wood, 31-October-2017 + +*/ +#include "THcRun.h" +#include "THcGlobals.h" +#include "TSystem.h" + +using namespace std; + +//_____________________________________________________________________________ +THcRun::THcRun( const char* fname, const char* description ) : + THaRun(fname, description) +{ + // Normal & default constructor + + fHcParms = gHcParms; +} + +//_____________________________________________________________________________ +THcRun::~THcRun() +{ + // Destructor. + +} + +//_____________________________________________________________________________ +void THcRun::Print( Option_t* opt ) const +{ + THaRun::Print( opt ); + fHcParms->Print(); +} + +ClassImp(THaRun) diff --git a/src/THcRun.h b/src/THcRun.h new file mode 100644 index 0000000..1ae9873 --- /dev/null +++ b/src/THcRun.h @@ -0,0 +1,30 @@ +#ifndef ROOT_THcRun +#define ROOT_THcRun + +////////////////////////////////////////////////////////////////////////// +// +// THaRun +// +////////////////////////////////////////////////////////////////////////// + +#include "THaRun.h" +#include "THcParmList.h" + +class THcRun : public THaRun { + + public: + THcRun( const char* filename="", const char* description="" ); + // THaRun( const THaRun& run ); + // THaRun( const std::vector<TString>& pathList, const char* filename, + // const char* description="" ); + // virtual THaRun& operator=( const THaRunBase& rhs ); + virtual ~THcRun(); + virtual void Print( Option_t* opt="" ) const; + THcParmList* GetHCParms() const { return fHcParms; } + + private: + THcParmList* fHcParms; /* gHcParms object */ + + ClassDef(THcRun,0); +}; +#endif -- GitLab