Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
CommonTools
UtilAlgos
interface
TFileService.h
Go to the documentation of this file.
1
#ifndef UtilAlgos_TFileService_h
2
#define UtilAlgos_TFileService_h
3
/* \class TFileService
4
*
5
* \author Luca Lista, INFN
6
*
7
*/
8
#include "
CommonTools/Utils/interface/TFileDirectory.h
"
9
10
namespace
edm {
11
class
ActivityRegistry
;
12
class
ParameterSet
;
13
class
ModuleDescription;
14
}
15
16
class
TFileService
:
public
TFileDirectory
{
17
public
:
19
TFileService
(
const
edm::ParameterSet
&,
edm::ActivityRegistry
&);
21
~TFileService
();
23
TFile &
file
()
const
{
return
*
file_
; }
24
26
void
afterBeginJob
();
27
28
private
:
30
TFile *
file_
;
31
std::string
fileName_
;
32
bool
fileNameRecorded_
;
33
bool
closeFileFast_
;
34
// set current directory according to module name and prepair to create directory
35
void
setDirectoryName
(
const
edm::ModuleDescription
& desc );
36
};
37
38
namespace
edm {
39
namespace
service {
40
// This function is needed so that there will be only on instance
41
// of this service per process when "subprocesses" are being used.
42
inline
43
bool
isProcessWideService
(
TFileService
const
*) {
44
return
true
;
45
}
46
}
47
}
48
49
#endif
ParameterSet
Definition:
Functions.h:16
edm::service::isProcessWideService
bool isProcessWideService(TFileService const *)
Definition:
TFileService.h:43
TFileService::TFileService
TFileService(const edm::ParameterSet &, edm::ActivityRegistry &)
constructor
Definition:
TFileService.cc:13
TFileService::file_
TFile * file_
pointer to opened TFile
Definition:
TFileService.h:30
TFileService::fileName_
std::string fileName_
Definition:
TFileService.h:31
TFileService::setDirectoryName
void setDirectoryName(const edm::ModuleDescription &desc)
Definition:
TFileService.cc:40
TFileService
Definition:
TFileService.h:16
ActivityRegistry
TFileService::file
TFile & file() const
return opened TFile
Definition:
TFileService.h:23
TFileService::~TFileService
~TFileService()
destructor
Definition:
TFileService.cc:33
TFileDirectory.h
TFileService::fileNameRecorded_
bool fileNameRecorded_
Definition:
TFileService.h:32
TFileDirectory
Definition:
TFileDirectory.h:24
TFileService::closeFileFast_
bool closeFileFast_
Definition:
TFileService.h:33
edm::ParameterSet
Definition:
ParameterSet.h:35
TFileService::afterBeginJob
void afterBeginJob()
Hook for writing info into JR.
Definition:
TFileService.cc:45
edm::ModuleDescription
Definition:
ModuleDescription.h:23
edm::ActivityRegistry
Definition:
ActivityRegistry.h:46
Generated for CMSSW Reference Manual by
1.8.5