xrootd
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
XrdCl::Recorder::Output Class Reference

Public Member Functions

bool Write (std::unique_ptr< Action > action)
 
bool Open ()
 
bool IsValid ()
 
void SetPath (const std::string &path)
 

Static Public Member Functions

static OutputInstance ()
 
static OutputGet ()
 

Private Member Functions

 Output ()
 Constructor.
 
 Output (const Output &)=delete
 
 Output (Output &&)=delete
 
Outputoperator= (const Output &)=delete
 
Outputoperator= (Output &&)=delete
 
 ~Output ()
 Destructor.
 

Private Attributes

std::mutex mtx
 
int fd
 
std::string path
 

Detailed Description

Singleton object used for thread-safe writing the recored data into a csv file

Constructor & Destructor Documentation

◆ Output() [1/3]

XrdCl::Recorder::Output::Output ( )
inlineprivate

Constructor.

◆ Output() [2/3]

XrdCl::Recorder::Output::Output ( const Output )
privatedelete

◆ Output() [3/3]

XrdCl::Recorder::Output::Output ( Output &&  )
privatedelete

◆ ~Output()

XrdCl::Recorder::Output::~Output ( )
inlineprivate

Member Function Documentation

◆ Get()

static Output & XrdCl::Recorder::Output::Get ( )
inlinestatic
Returns
: single instance of Output object

References XrdCl::Recorder::output.

Referenced by Instance(), and XrdCl::Recorder::SetOutput().

◆ Instance()

static Output & XrdCl::Recorder::Output::Instance ( )
inlinestatic

Get instance, make sure the output file is open

Returns
: single instance of Output object

References XrdCl::AppMsg, XrdCl::Log::Error(), Get(), XrdCl::DefaultEnv::GetLog(), IsValid(), mtx, Open(), and XrdCl::Recorder::output.

◆ IsValid()

bool XrdCl::Recorder::Output::IsValid ( )
inline
Returns
: true if the csv file is open, false otherwise

References fd.

Referenced by Instance(), and XrdCl::Recorder::IsValid().

◆ Open()

bool XrdCl::Recorder::Output::Open ( )
inline

Open the csv files

Parameters
path: path to the csv file
Returns
: true if the file was successfully opened, false otherwise

References XrdCl::AppMsg, fd, XrdCl::DefaultEnv::GetLog(), open, path, and XrdCl::Log::Warning().

Referenced by Instance().

◆ operator=() [1/2]

Output & XrdCl::Recorder::Output::operator= ( const Output )
privatedelete

◆ operator=() [2/2]

Output & XrdCl::Recorder::Output::operator= ( Output &&  )
privatedelete

◆ SetPath()

void XrdCl::Recorder::Output::SetPath ( const std::string &  path)
inline

References path.

Referenced by XrdCl::Recorder::SetOutput().

◆ Write()

bool XrdCl::Recorder::Output::Write ( std::unique_ptr< Action action)
inline

Member Data Documentation

◆ fd

int XrdCl::Recorder::Output::fd
private

Referenced by IsValid(), Open(), Write(), and ~Output().

◆ mtx

std::mutex XrdCl::Recorder::Output::mtx
private

Referenced by Instance(), and Write().

◆ path

std::string XrdCl::Recorder::Output::path
private

Referenced by Open(), and SetPath().


The documentation for this class was generated from the following file: