StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
StCloseFileOnTerminate Class Reference

Class StCloseFileOnTerminate - it is a singleton to catch the SIGTERM signal (sent by Condor for example) to close all open ROOT files. To activate, insert into your code: StCloseFileOnTerminate::Instantiate(); On kill <PID> the Notify method is to close all existing ROOT files and terminated the applcation. It is simple. However it is error-prone. The signal SIGTERM can be emitted at the time of I/O operation. As result this I/O operation can not be completed and no way the file can be close properly. More...

#include <StCloseFileOnTerminate.h>

Inheritance diagram for StCloseFileOnTerminate:
StNotifyOnTerminate

Static Public Member Functions

static StCloseFileOnTerminateInstantiate ()
 Create an instance of the signal handler (Should be called at once by code)
 

Protected Member Functions

virtual Bool_t Notify ()
 Close the open ROOT files upon SIGTERM sent by system to terminate the job.
 

Static Protected Member Functions

static bool Exists ()
 

Detailed Description

Class StCloseFileOnTerminate - it is a singleton to catch the SIGTERM signal (sent by Condor for example) to close all open ROOT files. To activate, insert into your code: StCloseFileOnTerminate::Instantiate(); On kill <PID> the Notify method is to close all existing ROOT files and terminated the applcation. It is simple. However it is error-prone. The signal SIGTERM can be emitted at the time of I/O operation. As result this I/O operation can not be completed and no way the file can be close properly.

Definition at line 33 of file StCloseFileOnTerminate.h.


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