Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 4, 2023
1 parent 41047ff commit 24d4d4e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion inc/TRestDetectorReadout.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class TRestDetectorReadout : public TRestMetadata {

void Draw();

void Export(const std::string &fileName);
void Export(const std::string& fileName);

// Constructor
TRestDetectorReadout();
Expand Down
2 changes: 1 addition & 1 deletion pipeline/readout/PrintReadout.C
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void PrintReadout(TString fName) {

cout.rdbuf(stream_buffer_file);

TFile *f = TFile::Open(fName);
TFile* f = TFile::Open(fName);
TRestDetectorReadout* r = (TRestDetectorReadout*)f->Get("Prototype_2020_06");
r->PrintMetadata(3);

Expand Down
1 change: 0 additions & 1 deletion pipeline/readout/validation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2797,4 +2797,3 @@
 || Total pixels : 66 Channel type : NoType || 
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
 **************************************************************************************************** 

7 changes: 3 additions & 4 deletions src/TRestDetectorReadout.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@
///

#include "TRestDetectorReadout.h"

#include "TFile.h"

ClassImp(TRestDetectorReadout);
Expand Down Expand Up @@ -826,14 +827,12 @@ void TRestDetectorReadout::Draw() {
///////////////////////////////////////////////
/// \brief Export readout to a root file
///
void TRestDetectorReadout::Export(const std::string &fileName){

void TRestDetectorReadout::Export(const std::string& fileName) {
if (TRestTools::GetFileNameExtension(fileName) == "root") {
TFile* f = TFile::Open(fileName.c_str(), "UPDATE");
this->Write();
f->Close();
} else {
RESTWarning << "Can only export readout as a root file, skipping..." << RESTendl;
RESTWarning << "Can only export readout as a root file, skipping..." << RESTendl;
}

}

0 comments on commit 24d4d4e

Please sign in to comment.