BmnRoot 26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
MpdWebScreenshots Class Reference

#include <MpdWebScreenshots.h>

Inheritance diagram for MpdWebScreenshots:
Collaboration diagram for MpdWebScreenshots:

Public Member Functions

 MpdWebScreenshots (const char *name, char *output_dir, bool isWebServer=false, Int_t iVerbose=0)
virtual ~MpdWebScreenshots ()
void SetVerbose (Int_t iVerbose)
virtual void Exec (Option_t *option)
virtual InitStatus Init ()
virtual void SetParContainers ()
virtual void Finish ()
void SetFormatFiles (int i_format_files)
void SetMultiFiles (bool is_multi_files)
void SetPort (int NumberPort)

Private Member Functions

 MpdWebScreenshots ()
 MpdWebScreenshots (const MpdWebScreenshots &)=delete
MpdWebScreenshots & operator= (const MpdWebScreenshots &)=delete

Static Private Member Functions

static int daemonize ()
static int sendString (const char *message, int socket)
static void sendHeader (const char *Status_code, char *Content_Type, int TotalSize, int socket)
static void sendHTML (char *statusCode, char *contentType, char *content, int size, int socket)
static void sendFile (FILE *fp, int connecting_socket)
static int scan (char *input, char *output, size_t start, size_t max)
static int checkMime (char *extension, char *mime_type)
static int getHttpVersion (char *input, char *output)
static int GetExtension (char *input, char *output, size_t max)
static int handleHttpGET (char *input, TString output_dir, int connecting_socket)
static int getRequestType (char *input)
static int receive (int connecting_socket, TString output_dir)
static int acceptConnection (int currentSocket, TString output_dir)
static int start (int webPort, TString output_dir)
static int start_server (void *ptr)

Private Attributes

MpdEventManager * fMan
int iFormatFiles
bool isMultiFiles
TString outputDir
int web_port
int daemon
bool isWebStarted
bool isWeb

Detailed Description

Definition at line 26 of file MpdWebScreenshots.h.

Constructor & Destructor Documentation

◆ MpdWebScreenshots() [1/3]

MpdWebScreenshots::MpdWebScreenshots ( const char * name,
char * output_dir,
bool isWebServer = false,
Int_t iVerbose = 0 )

Definition at line 26 of file MpdWebScreenshots.cxx.

References isWeb, isWebStarted, and outputDir.

Referenced by MpdWebScreenshots(), and operator=().

Here is the caller graph for this function:

◆ ~MpdWebScreenshots()

MpdWebScreenshots::~MpdWebScreenshots ( )
virtual

Definition at line 23 of file MpdWebScreenshots.cxx.

◆ MpdWebScreenshots() [2/3]

MpdWebScreenshots::MpdWebScreenshots ( )
private

Definition at line 18 of file MpdWebScreenshots.cxx.

◆ MpdWebScreenshots() [3/3]

MpdWebScreenshots::MpdWebScreenshots ( const MpdWebScreenshots & )
privatedelete

References MpdWebScreenshots().

Here is the call graph for this function:

Member Function Documentation

◆ acceptConnection()

int MpdWebScreenshots::acceptConnection ( int currentSocket,
TString output_dir )
staticprivate

Definition at line 470 of file MpdWebScreenshots.cxx.

References receive().

Referenced by start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkMime()

int MpdWebScreenshots::checkMime ( char * extension,
char * mime_type )
staticprivate

Definition at line 227 of file MpdWebScreenshots.cxx.

References TString::Data(), memset(), and scan().

Referenced by handleHttpGET().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ daemonize()

int MpdWebScreenshots::daemonize ( )
staticprivate

Definition at line 108 of file MpdWebScreenshots.cxx.

Referenced by start_server().

Here is the caller graph for this function:

◆ Exec()

void MpdWebScreenshots::Exec ( Option_t * option)
virtual

Definition at line 76 of file MpdWebScreenshots.cxx.

References TString::Data(), fMan, TString::Format(), iFormatFiles, isMultiFiles, and outputDir.

Here is the call graph for this function:

◆ Finish()

void MpdWebScreenshots::Finish ( )
virtual

Definition at line 105 of file MpdWebScreenshots.cxx.

◆ GetExtension()

int MpdWebScreenshots::GetExtension ( char * input,
char * output,
size_t max )
staticprivate

Definition at line 293 of file MpdWebScreenshots.cxx.

References i, and max().

Referenced by handleHttpGET().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHttpVersion()

int MpdWebScreenshots::getHttpVersion ( char * input,
char * output )
staticprivate

Definition at line 270 of file MpdWebScreenshots.cxx.

References scan(), and start().

Referenced by handleHttpGET().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRequestType()

int MpdWebScreenshots::getRequestType ( char * input)
staticprivate

Definition at line 423 of file MpdWebScreenshots.cxx.

References scan().

Referenced by receive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleHttpGET()

int MpdWebScreenshots::handleHttpGET ( char * input,
TString output_dir,
int connecting_socket )
staticprivate

Definition at line 320 of file MpdWebScreenshots.cxx.

References checkMime(), TString::Data(), GetExtension(), getHttpVersion(), i, memset(), scan(), sendFile(), sendHeader(), and sendString().

Referenced by receive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Init()

InitStatus MpdWebScreenshots::Init ( )
virtual

Definition at line 47 of file MpdWebScreenshots.cxx.

References daemon, www_thread_par::daemon, fMan, MpdEventManager::Instance(), isWeb, isWebStarted, TThread::kNormalPriority, outputDir, www_thread_par::outputDir, TThread::Run(), start_server(), web_port, and www_thread_par::web_port.

Here is the call graph for this function:

◆ operator=()

MpdWebScreenshots & MpdWebScreenshots::operator= ( const MpdWebScreenshots & )
privatedelete

References MpdWebScreenshots().

Here is the call graph for this function:

◆ receive()

int MpdWebScreenshots::receive ( int connecting_socket,
TString output_dir )
staticprivate

Definition at line 444 of file MpdWebScreenshots.cxx.

References BUFFER_SIZE, getRequestType(), handleHttpGET(), memset(), and sendString().

Referenced by acceptConnection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scan()

int MpdWebScreenshots::scan ( char * input,
char * output,
size_t start,
size_t max )
staticprivate

Definition at line 195 of file MpdWebScreenshots.cxx.

References i, max(), and start().

Here is the call graph for this function:

◆ sendFile()

void MpdWebScreenshots::sendFile ( FILE * fp,
int connecting_socket )
staticprivate

Definition at line 185 of file MpdWebScreenshots.cxx.

Referenced by handleHttpGET().

Here is the caller graph for this function:

◆ sendHeader()

void MpdWebScreenshots::sendHeader ( const char * Status_code,
char * Content_Type,
int TotalSize,
int socket )
staticprivate

Definition at line 146 of file MpdWebScreenshots.cxx.

References sendString().

Referenced by handleHttpGET().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendHTML()

void MpdWebScreenshots::sendHTML ( char * statusCode,
char * contentType,
char * content,
int size,
int socket )
staticprivate

References max(), and start().

Here is the call graph for this function:

◆ sendString()

int MpdWebScreenshots::sendString ( const char * message,
int socket )
staticprivate

Definition at line 141 of file MpdWebScreenshots.cxx.

Referenced by handleHttpGET(), receive(), and sendHeader().

Here is the caller graph for this function:

◆ SetFormatFiles()

void MpdWebScreenshots::SetFormatFiles ( int i_format_files)
inline

Definition at line 48 of file MpdWebScreenshots.h.

References iFormatFiles.

◆ SetMultiFiles()

void MpdWebScreenshots::SetMultiFiles ( bool is_multi_files)
inline

Definition at line 50 of file MpdWebScreenshots.h.

References isMultiFiles.

◆ SetParContainers()

void MpdWebScreenshots::SetParContainers ( )
virtual

Definition at line 102 of file MpdWebScreenshots.cxx.

◆ SetPort()

void MpdWebScreenshots::SetPort ( int NumberPort)
inline

Definition at line 52 of file MpdWebScreenshots.h.

References web_port.

◆ SetVerbose()

void MpdWebScreenshots::SetVerbose ( Int_t iVerbose)
inline

Definition at line 39 of file MpdWebScreenshots.h.

◆ start()

int MpdWebScreenshots::start ( int webPort,
TString output_dir )
staticprivate

Definition at line 499 of file MpdWebScreenshots.cxx.

References acceptConnection(), and MAX_CONNECTIONS.

Referenced by getHttpVersion(), scan(), sendHTML(), and start_server().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_server()

int MpdWebScreenshots::start_server ( void * ptr)
staticprivate

Definition at line 529 of file MpdWebScreenshots.cxx.

References daemon, www_thread_par::daemon, daemonize(), TString::Data(), www_thread_par::outputDir, start(), and www_thread_par::web_port.

Referenced by Init().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ daemon

int MpdWebScreenshots::daemon
private

Definition at line 85 of file MpdWebScreenshots.h.

Referenced by Init(), and start_server().

◆ fMan

MpdEventManager* MpdWebScreenshots::fMan
private

Definition at line 76 of file MpdWebScreenshots.h.

Referenced by Exec(), and Init().

◆ iFormatFiles

int MpdWebScreenshots::iFormatFiles
private

Definition at line 79 of file MpdWebScreenshots.h.

Referenced by Exec(), and SetFormatFiles().

◆ isMultiFiles

bool MpdWebScreenshots::isMultiFiles
private

Definition at line 81 of file MpdWebScreenshots.h.

Referenced by Exec(), and SetMultiFiles().

◆ isWeb

bool MpdWebScreenshots::isWeb
private

Definition at line 88 of file MpdWebScreenshots.h.

Referenced by MpdWebScreenshots(), and Init().

◆ isWebStarted

bool MpdWebScreenshots::isWebStarted
private

Definition at line 87 of file MpdWebScreenshots.h.

Referenced by MpdWebScreenshots(), and Init().

◆ outputDir

TString MpdWebScreenshots::outputDir
private

Definition at line 83 of file MpdWebScreenshots.h.

Referenced by MpdWebScreenshots(), Exec(), and Init().

◆ web_port

int MpdWebScreenshots::web_port
private

Definition at line 84 of file MpdWebScreenshots.h.

Referenced by Init(), and SetPort().


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