1 #include "otsdaq/RootUtilities/DQMHistosBase.h"
2 #include "otsdaq/Macros/CoutMacros.h"
4 #include <TDirectory.h>
14 DQMHistosBase::DQMHistosBase(
void) : theFile_(nullptr), myDirectory_(nullptr) { gStyle->SetPalette(1); }
17 DQMHistosBase::~DQMHistosBase(
void) { closeFile(); }
20 void DQMHistosBase::openFile(std::string fileName)
23 myDirectory_ =
nullptr;
24 theFile_ = TFile::Open(fileName.c_str(),
"RECREATE");
29 void DQMHistosBase::save(
void)
31 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ <<
"Saving file!" << std::endl;
32 if(theFile_ !=
nullptr)
37 void DQMHistosBase::closeFile(
void)
39 if(theFile_ !=
nullptr)
47 TObject* DQMHistosBase::get(std::string name)
49 if(theFile_ !=
nullptr)
50 return theFile_->Get(name.c_str());