Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:32:22

0001 #ifndef FWLite_TFileService_h
0002 #define FWLite_TFileService_h
0003 /* \class fwlite::TFileService
0004  *
0005  * \author Benedikt Hegner, CERN
0006  *
0007  */
0008 #include "CommonTools/Utils/interface/TFileDirectory.h"
0009 
0010 namespace fwlite {
0011 
0012   class TFileService : public TFileDirectory {
0013   public:
0014     /// constructor
0015     TFileService(const std::string& fileName);
0016 
0017     /// constructor with external TFile
0018     TFileService(TFile* aFile);
0019 
0020     /// destructor
0021     ~TFileService() override;
0022 
0023     /// return opened TFile
0024     TFile& file() const { return *file_; }
0025 
0026   private:
0027     /// pointer to opened TFile
0028     TFile* file_;
0029     std::string fileName_;
0030   };
0031 
0032 }  // namespace fwlite
0033 #endif