Main Page
Namespaces
Classes
Package Documentation
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
#include "
FWCore/Utilities/interface/propagate_const.h
"
11
12
#include "TFile.h"
13
14
#include <map>
15
#include <string>
16
#include <vector>
17
18
class
TObject;
19
20
namespace
edm
{
21
class
InputFile
{
22
public
:
23
explicit
InputFile
(
char
const
*
fileName
,
char
const
*
msg
,
InputType
inputType);
24
~InputFile
();
25
26
InputFile
(
InputFile
const
&) =
delete
;
// Disallow copying and moving
27
InputFile
&
operator=
(
InputFile
const
&) =
delete
;
// Disallow copying and moving
28
29
void
Close
();
30
void
inputFileOpened
(
std::string
const
& logicalFileName,
31
std::string
const
& inputType,
32
std::string
const
&
moduleName
,
33
std::string
const
&
label
,
34
std::string
const
& fid,
35
std::vector<std::string>
const
& branchNames);
36
void
eventReadFromFile
()
const
;
37
void
reportInputRunNumber
(
unsigned
int
run
)
const
;
38
void
reportInputLumiSection
(
unsigned
int
run,
unsigned
int
lumi
)
const
;
39
static
void
reportSkippedFile
(
std::string
const
& fileName,
std::string
const
& logicalFileName);
40
static
void
reportFallbackAttempt
(
std::string
const
& pfn,
std::string
const
& logicalFileName,
std::string
const
& errorMessage);
41
// reportReadBranches is a per job report, rather than per file report.
42
// Nevertheless, it is defined here for convenience.
43
static
void
reportReadBranches
();
44
static
void
reportReadBranch
(
InputType
inputType,
std::string
const
& branchname);
45
46
TObject*
Get
(
char
const
*
name
) {
return
file_
->Get(name);}
47
TFileCacheRead*
GetCacheRead
()
const
{
return
file_
->GetCacheRead();}
48
void
SetCacheRead
(TFileCacheRead* tfcr) {
file_
->SetCacheRead(tfcr,
NULL
, TFile::kDoNotDisconnect);}
49
void
logFileAction
(
char
const
* msg,
char
const
* fileName)
const
;
50
private
:
51
edm::propagate_const<std::unique_ptr<TFile>
>
file_
;
52
std::string
fileName_
;
53
JobReport::Token
reportToken_
;
54
InputType
inputType_
;
55
};
56
}
57
#endif
edm::InputFile::Close
void Close()
Definition:
InputFile.cc:99
edm::propagate_const
Definition:
propagate_const.h:32
edm::InputType
InputType
Definition:
InputType.h:5
diffTwoXMLs.label
label
Definition:
diffTwoXMLs.py:42
edm::InputFile
Definition:
InputFile.h:21
edm::InputFile::operator=
InputFile & operator=(InputFile const &)=delete
edm::InputFile::reportToken_
JobReport::Token reportToken_
Definition:
InputFile.h:53
edm::InputFile::inputType_
InputType inputType_
Definition:
InputFile.h:54
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
edm::InputFile::GetCacheRead
TFileCacheRead * GetCacheRead() const
Definition:
InputFile.h:47
edm::InputFile::~InputFile
~InputFile()
Definition:
InputFile.cc:46
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:51
edm::InputFile::reportReadBranch
static void reportReadBranch(InputType inputType, std::string const &branchname)
Definition:
InputFile.cc:126
edm::InputFile::reportInputRunNumber
void reportInputRunNumber(unsigned int run) const
Definition:
InputFile.cc:75
edm::InputFile::logFileAction
void logFileAction(char const *msg, char const *fileName) const
Definition:
InputFile.cc:114
edm::InputFile::reportFallbackAttempt
static void reportFallbackAttempt(std::string const &pfn, std::string const &logicalFileName, std::string const &errorMessage)
Definition:
InputFile.cc:93
edm::moduleName
std::string moduleName(Provenance const &provenance)
Definition:
Provenance.cc:27
mps_alisetup.msg
tuple msg
Definition:
mps_alisetup.py:509
JobReport.h
edm::InputFile::reportReadBranches
static void reportReadBranches()
Definition:
InputFile.cc:120
edm::InputFile::reportInputLumiSection
void reportInputLumiSection(unsigned int run, unsigned int lumi) const
Definition:
InputFile.cc:81
edm::InputFile::reportSkippedFile
static void reportSkippedFile(std::string const &fileName, std::string const &logicalFileName)
Definition:
InputFile.cc:87
findQualityFiles.run
run
Definition:
findQualityFiles.py:408
edm::InputFile::file_
edm::propagate_const< std::unique_ptr< TFile > > file_
Definition:
InputFile.h:51
edm::JobReport::Token
std::size_t Token
Definition:
JobReport.h:107
edm::InputFile::fileName_
std::string fileName_
Definition:
InputFile.h:52
MillePedeFileConverter_cfg.fileName
fileName
Definition:
MillePedeFileConverter_cfg.py:32
edm
HLT enums.
Definition:
AlignableModifier.h:17
edm::InputFile::Get
TObject * Get(char const *name)
Definition:
InputFile.h:46
lumi
Definition:
LumiSectionData.h:20
dataset.name
name
Definition:
dataset.py:45
edm::InputFile::InputFile
InputFile(char const *fileName, char const *msg, InputType inputType)
Definition:
InputFile.cc:18
edm::InputFile::SetCacheRead
void SetCacheRead(TFileCacheRead *tfcr)
Definition:
InputFile.h:48
edm::InputFile::eventReadFromFile
void eventReadFromFile() const
Definition:
InputFile.cc:69
propagate_const.h
InputType.h
Generated for CMSSW Reference Manual by
1.8.11