Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
IOPool
Input
src
InputFile.h
Go to the documentation of this file.
1
#ifndef IOPool_Input_InputFile_h
2
#define IOPool_Input_InputFile_h
3
4
/*----------------------------------------------------------------------
5
6
Holder for an input TFile.
7
----------------------------------------------------------------------*/
8
#include "
FWCore/MessageLogger/interface/JobReport.h
"
9
#include "
FWCore/Utilities/interface/InputType.h
"
10
11
#include "TFile.h"
12
13
#include <map>
14
#include <string>
15
#include <vector>
16
17
class
TObject;
18
19
namespace
edm {
20
class
InputFile
{
21
public
:
22
explicit
InputFile
(
char
const
*
fileName
,
char
const
*
msg
,
InputType
inputType);
23
~InputFile
();
24
25
InputFile
(
InputFile
const
&) =
delete
;
// Disallow copying and moving
26
InputFile
&
operator=
(
InputFile
const
&) =
delete
;
// Disallow copying and moving
27
28
void
Close
();
29
void
inputFileOpened
(
std::string
const
& logicalFileName,
30
std::string
const
& inputType,
31
std::string
const
&
moduleName
,
32
std::string
const
&
label
,
33
std::string
const
&
fid
,
34
std::vector<std::string>
const
& branchNames);
35
void
eventReadFromFile
()
const
;
36
void
reportInputRunNumber
(
unsigned
int
run
)
const
;
37
void
reportInputLumiSection
(
unsigned
int
run,
unsigned
int
lumi
)
const
;
38
static
void
reportSkippedFile
(
std::string
const
& fileName,
std::string
const
& logicalFileName);
39
static
void
reportFallbackAttempt
(
std::string
const
&
pfn
,
std::string
const
& logicalFileName,
std::string
const
& errorMessage);
40
// reportReadBranches is a per job report, rather than per file report.
41
// Nevertheless, it is defined here for convenience.
42
static
void
reportReadBranches
();
43
static
void
reportReadBranch
(
InputType
inputType,
std::string
const
& branchname);
44
45
TObject*
Get
(
char
const
*
name
) {
return
file_
->Get(name);}
46
TFileCacheRead*
GetCacheRead
()
const
{
return
file_
->GetCacheRead();}
47
void
SetCacheRead
(TFileCacheRead* tfcr) {
file_
->SetCacheRead(tfcr,
NULL
, TFile::kDoNotDisconnect);}
48
void
logFileAction
(
char
const
* msg,
char
const
* fileName)
const
;
49
private
:
50
std::unique_ptr<TFile>
file_
;
51
std::string
fileName_
;
52
JobReport::Token
reportToken_
;
53
InputType
inputType_
;
54
};
55
}
56
#endif
edm::InputFile::Close
void Close()
Definition:
InputFile.cc:85
diffTwoXMLs.label
list label
Definition:
diffTwoXMLs.py:42
edm::InputType
InputType
Definition:
InputType.h:5
edm::InputFile
Definition:
InputFile.h:20
edm::InputFile::operator=
InputFile & operator=(InputFile const &)=delete
dbtoconf.pfn
list pfn
Definition:
dbtoconf.py:76
edm::InputFile::reportToken_
JobReport::Token reportToken_
Definition:
InputFile.h:52
edm::InputFile::inputType_
InputType inputType_
Definition:
InputFile.h:53
fjr2json.lumi
tuple lumi
Definition:
fjr2json.py:35
edm::InputFile::GetCacheRead
TFileCacheRead * GetCacheRead() const
Definition:
InputFile.h:46
edm::InputFile::~InputFile
~InputFile()
Definition:
InputFile.cc:32
NULL
#define NULL
Definition:
scimark2.h:8
edm::InputFile::inputFileOpened
void inputFileOpened(std::string const &logicalFileName, std::string const &inputType, std::string const &moduleName, std::string const &label, std::string const &fid, std::vector< std::string > const &branchNames)
Definition:
InputFile.cc:37
edm::InputFile::reportReadBranch
static void reportReadBranch(InputType inputType, std::string const &branchname)
Definition:
InputFile.cc:112
mergeVDriftHistosByStation.name
string name
Definition:
mergeVDriftHistosByStation.py:77
convertXMLtoSQLite_cfg.fileName
tuple fileName
Definition:
convertXMLtoSQLite_cfg.py:12
edm::InputFile::reportInputRunNumber
void reportInputRunNumber(unsigned int run) const
Definition:
InputFile.cc:61
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
edm::InputFile::logFileAction
void logFileAction(char const *msg, char const *fileName) const
Definition:
InputFile.cc:100
producerFileCleanner.msg
string msg
Definition:
producerFileCleanner.py:91
edm::InputFile::reportFallbackAttempt
static void reportFallbackAttempt(std::string const &pfn, std::string const &logicalFileName, std::string const &errorMessage)
Definition:
InputFile.cc:79
edm::moduleName
std::string moduleName(Provenance const &provenance)
Definition:
Provenance.cc:27
JobReport.h
edm::InputFile::reportReadBranches
static void reportReadBranches()
Definition:
InputFile.cc:106
edm::InputFile::reportInputLumiSection
void reportInputLumiSection(unsigned int run, unsigned int lumi) const
Definition:
InputFile.cc:67
edm::InputFile::reportSkippedFile
static void reportSkippedFile(std::string const &fileName, std::string const &logicalFileName)
Definition:
InputFile.cc:73
edm::InputFile::file_
std::unique_ptr< TFile > file_
Definition:
InputFile.h:50
DTTTrigCorrFirst.run
run
Definition:
DTTTrigCorrFirst.py:63
edm::JobReport::Token
std::size_t Token
Definition:
JobReport.h:106
edm::InputFile::fileName_
std::string fileName_
Definition:
InputFile.h:51
edm::InputFile::Get
TObject * Get(char const *name)
Definition:
InputFile.h:45
edm::InputFile::InputFile
InputFile(char const *fileName, char const *msg, InputType inputType)
Definition:
InputFile.cc:16
edm::InputFile::SetCacheRead
void SetCacheRead(TFileCacheRead *tfcr)
Definition:
InputFile.h:47
NewTree.fid
list fid
Definition:
NewTree.py:51
edm::InputFile::eventReadFromFile
void eventReadFromFile() const
Definition:
InputFile.cc:55
InputType.h
Generated for CMSSW Reference Manual by
1.8.5