Skip to content
Snippets Groups Projects
Commit 0f59907b authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

Added logging.

parent b125a9d8
Branches
Tags
No related merge requests found
......@@ -38,13 +38,8 @@
using namespace std;
THcConfigEvtHandler::THcConfigEvtHandler(const char *name, const char* description)
: THaEvtTypeHandler(name,description)
: hcana::ConfigLogging<THaEvtTypeHandler>(name,description)
{
//Create and return a shared_ptr to a multithreaded console logger.
_logger = spdlog::get("config");
if(!_logger) {
_logger = spdlog::stdout_color_mt("config");
}
}
THcConfigEvtHandler::~THcConfigEvtHandler()
......
......@@ -15,13 +15,9 @@
#include <vector>
#include <map>
#include "spdlog/spdlog.h"
#include "spdlog/sinks/stdout_color_sinks.h" //support for stdout logging
#include "spdlog/sinks/basic_file_sink.h" // support for basic file logging
#include "Logger.h"
class THcConfigEvtHandler : public THaEvtTypeHandler {
private:
std::shared_ptr<spdlog::logger> _logger;
class THcConfigEvtHandler : public hcana::ConfigLogging<THaEvtTypeHandler> {
public:
......
......@@ -26,7 +26,7 @@ using namespace std;
//_____________________________________________________________________________
THcHelicity::THcHelicity( const char* name, const char* description,
THaApparatus* app ):
THaHelicityDet( name, description, app ),
hcana::ConfigLogging<THaHelicityDet>( name, description, app ),
fnQrt(-1), fHelDelay(8), fMAXBIT(30)
{
// for( Int_t i = 0; i < NHIST; ++i )
......@@ -37,7 +37,7 @@ THcHelicity::THcHelicity( const char* name, const char* description,
//_____________________________________________________________________________
THcHelicity::THcHelicity()
: fnQrt(-1), fHelDelay(8), fMAXBIT(30)
: hcana::ConfigLogging<THaHelicityDet>(),fnQrt(-1), fHelDelay(8), fMAXBIT(30)
{
// Default constructor for ROOT I/O
......
......@@ -11,10 +11,11 @@
#include "THaHelicityDet.h"
#include "THcHelicityReader.h"
#include "Logger.h"
class TH1F;
class THcHelicity : public THaHelicityDet, public THcHelicityReader {
class THcHelicity : public hcana::ConfigLogging<THaHelicityDet>, public THcHelicityReader {
public:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment