CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ----------------------------------------------------------------------*/
9 
10 #include "TFile.h"
11 
12 #include <map>
13 #include <string>
14 #include <vector>
15 
16 class TObject;
17 
18 namespace edm {
19  class InputFile {
20  public:
21  explicit InputFile(char const* fileName, char const* msg);
22  ~InputFile();
23 
24  InputFile(InputFile const&) = delete; // Disallow copying and moving
25  InputFile& operator=(InputFile const&) = delete; // Disallow copying and moving
26 
27  void Close();
28  void inputFileOpened(std::string const& logicalFileName,
29  std::string const& inputType,
30  std::string const& moduleName,
31  std::string const& label,
32  std::string const& fid,
33  std::vector<std::string> const& branchNames);
34  void eventReadFromFile(unsigned int run, unsigned int event) const;
35  void reportInputRunNumber(unsigned int run) const;
36  void reportInputLumiSection(unsigned int run, unsigned int lumi) const;
37  static void reportSkippedFile(std::string const& fileName, std::string const& logicalFileName);
38  static void reportFallbackAttempt(std::string const& pfn, std::string const& logicalFileName, std::string const& errorMessage);
39  // reportReadBranches is a per job report, rather than per file report.
40  // Nevertheless, it is defined here for convenience.
41  static void reportReadBranches();
42  static void reportReadBranch(std::string const& branchname);
43 
44  TObject* Get(char const* name) {return file_->Get(name);}
45  TFileCacheRead* GetCacheRead() const {return file_->GetCacheRead();}
46  void SetCacheRead(TFileCacheRead* tfcr) {file_->SetCacheRead(tfcr, NULL, TFile::kDoNotDisconnect);}
47  void logFileAction(char const* msg, char const* fileName) const;
48  private:
49  std::unique_ptr<TFile> file_;
52  };
53 }
54 #endif
InputFile & operator=(InputFile const &)=delete
list pfn
Definition: dbtoconf.py:76
void reportInputLumiSection(unsigned int run, unsigned int lumi) const
Definition: InputFile.cc:61
JobReport::Token reportToken_
Definition: InputFile.h:51
tuple lumi
Definition: fjr2json.py:35
TFileCacheRead * GetCacheRead() const
Definition: InputFile.h:45
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:31
#define NULL
Definition: scimark2.h:8
void logFileAction(char const *msg, char const *fileName) const
Definition: InputFile.cc:94
static void reportSkippedFile(std::string const &fileName, std::string const &logicalFileName)
Definition: InputFile.cc:67
static void reportFallbackAttempt(std::string const &pfn, std::string const &logicalFileName, std::string const &errorMessage)
Definition: InputFile.cc:73
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::unique_ptr< TFile > file_
Definition: InputFile.h:49
std::size_t Token
Definition: JobReport.h:43
std::string fileName_
Definition: InputFile.h:50
static void reportReadBranch(std::string const &branchname)
Definition: InputFile.cc:106
TObject * Get(char const *name)
Definition: InputFile.h:44
static void reportReadBranches()
Definition: InputFile.cc:100
void Close()
Definition: InputFile.cc:79
InputFile(char const *fileName, char const *msg)
Definition: InputFile.cc:13
void SetCacheRead(TFileCacheRead *tfcr)
Definition: InputFile.h:46
list fid
Definition: NewTree.py:51
void eventReadFromFile(unsigned int run, unsigned int event) const
Definition: InputFile.cc:49
void reportInputRunNumber(unsigned int run) const
Definition: InputFile.cc:55