CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes
TFileService Class Reference

#include <TFileService.h>

Public Member Functions

void afterBeginJob ()
 Hook for writing info into JR. More...
 
bool cd () const
 
TFile & file () const
 return opened TFile More...
 
std::string fullPath () const
 return the full path of the stored histograms More...
 
TDirectory * getBareDirectory (const std::string &subdir="") const
 
template<typename T >
TgetObject (const std::string &objname, const std::string &subdir="")
 
template<typename T , typename... Args>
Tmake (const Args &...args) const
 make new ROOT object More...
 
TFileDirectory mkdir (const std::string &dir, const std::string &descr="")
 create a new subdirectory More...
 
TFileDirectorytFileDirectory ()
 
 TFileService (const edm::ParameterSet &, edm::ActivityRegistry &)
 constructor More...
 
 ~TFileService ()
 destructor More...
 

Static Public Attributes

static const std::string kSharedResource = "TFileService"
 

Private Member Functions

void postModuleEvent (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postModuleGlobal (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void preModuleEvent (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preModuleGlobal (edm::GlobalContext const &, edm::ModuleCallingContext const &)
 
void setDirectoryName (const edm::ModuleDescription &desc)
 

Private Attributes

bool closeFileFast_
 
TFile * file_
 pointer to opened TFile More...
 
std::string fileName_
 
bool fileNameRecorded_
 

Static Private Attributes

static thread_local TFileDirectory tFileDirectory_
 

Detailed Description

Definition at line 30 of file TFileService.h.

Constructor & Destructor Documentation

TFileService::TFileService ( const edm::ParameterSet cfg,
edm::ActivityRegistry r 
)

constructor

Definition at line 17 of file TFileService.cc.

References afterBeginJob(), file_, TFileDirectory::file_, fileName_, postModuleEvent(), postModuleGlobal(), preModuleEvent(), preModuleGlobal(), setDirectoryName(), tFileDirectory_, edm::ActivityRegistry::watchPostBeginJob(), edm::ActivityRegistry::watchPostModuleEvent(), edm::ActivityRegistry::watchPostModuleGlobalBeginLumi(), edm::ActivityRegistry::watchPostModuleGlobalBeginRun(), edm::ActivityRegistry::watchPostModuleGlobalEndLumi(), edm::ActivityRegistry::watchPostModuleGlobalEndRun(), edm::ActivityRegistry::watchPreModuleBeginJob(), edm::ActivityRegistry::watchPreModuleConstruction(), edm::ActivityRegistry::watchPreModuleEndJob(), edm::ActivityRegistry::watchPreModuleEvent(), edm::ActivityRegistry::watchPreModuleGlobalBeginLumi(), edm::ActivityRegistry::watchPreModuleGlobalBeginRun(), edm::ActivityRegistry::watchPreModuleGlobalEndLumi(), and edm::ActivityRegistry::watchPreModuleGlobalEndRun().

17  :
18  file_(nullptr),
19  fileName_(cfg.getParameter<std::string>("fileName")),
20  fileNameRecorded_(false),
21  closeFileFast_(cfg.getUntrackedParameter<bool>("closeFileFast", false))
22 {
24  "",
25  TFile::Open(fileName_.c_str(), "RECREATE"),
26  "");
28 
29  // activities to monitor in order to set the proper directory
35 
40 
45 
46  // delay writing into JobReport after BeginJob
48 }
void watchPostModuleGlobalEndLumi(PostModuleGlobalEndLumi::slot_type const &iSlot)
void postModuleGlobal(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: TFileService.cc:80
T getParameter(std::string const &) const
void watchPreModuleGlobalBeginRun(PreModuleGlobalBeginRun::slot_type const &iSlot)
T getUntrackedParameter(std::string const &, T const &) const
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
void watchPreModuleConstruction(PreModuleConstruction::slot_type const &iSlot)
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
void watchPostModuleGlobalBeginLumi(PostModuleGlobalBeginLumi::slot_type const &iSlot)
TFile * file_
pointer to opened TFile
Definition: TFileService.h:81
void watchPreModuleGlobalEndRun(PreModuleGlobalEndRun::slot_type const &iSlot)
static thread_local TFileDirectory tFileDirectory_
Definition: TFileService.h:79
std::string fileName_
Definition: TFileService.h:82
void setDirectoryName(const edm::ModuleDescription &desc)
Definition: TFileService.cc:57
void watchPreModuleEndJob(PreModuleEndJob::slot_type const &iSlot)
void watchPreModuleBeginJob(PreModuleBeginJob::slot_type const &iSlot)
void watchPreModuleGlobalBeginLumi(PreModuleGlobalBeginLumi::slot_type const &iSlot)
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: TFileService.cc:67
void watchPostModuleGlobalEndRun(PostModuleGlobalEndRun::slot_type const &iSlot)
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: TFileService.cc:63
bool fileNameRecorded_
Definition: TFileService.h:83
bool closeFileFast_
Definition: TFileService.h:84
void watchPostModuleGlobalBeginRun(PostModuleGlobalBeginRun::slot_type const &iSlot)
void afterBeginJob()
Hook for writing info into JR.
Definition: TFileService.cc:87
void preModuleGlobal(edm::GlobalContext const &, edm::ModuleCallingContext const &)
Definition: TFileService.cc:75
void watchPreModuleGlobalEndLumi(PreModuleGlobalEndLumi::slot_type const &iSlot)
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
TFileService::~TFileService ( )

destructor

Definition at line 50 of file TFileService.cc.

References closeFileFast_, and file_.

50  {
51  file_->Write();
52  if(closeFileFast_) gROOT->GetListOfFiles()->Remove(file_);
53  file_->Close();
54  delete file_;
55 }
TFile * file_
pointer to opened TFile
Definition: TFileService.h:81
bool closeFileFast_
Definition: TFileService.h:84

Member Function Documentation

void TFileService::afterBeginJob ( )

Hook for writing info into JR.

Definition at line 87 of file TFileService.cc.

References Exception, fileName_, fileNameRecorded_, edm::JobReport::reportAnalysisFile(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by TFileService().

87  {
88 
89  if(!fileName_.empty()) {
90  if(!fileNameRecorded_) {
91  std::string fullName(1024, '\0');
92 
93  while (getcwd(&fullName[0], fullName.size()) == nullptr) {
94  if (errno != ERANGE) {
95  throw cms::Exception("TFileService")
96  << "Failed to get current directory (errno=" << errno
97  << "): " << strerror(errno);
98  }
99  fullName.resize(fullName.size()*2, '\0');
100  }
101  fullName.resize(fullName.find('\0'));
102 
103  fullName += "/" + fileName_;
104 
105  std::map<std::string, std::string> fileData;
106  fileData.insert(std::make_pair("Source","TFileService"));
107 
109  reportSvc->reportAnalysisFile(fullName,fileData);
110  fileNameRecorded_ = true;
111  }
112  }
113 }
std::string fileName_
Definition: TFileService.h:82
bool fileNameRecorded_
Definition: TFileService.h:83
void reportAnalysisFile(std::string const &fileName, std::map< std::string, std::string > const &fileData)
Definition: JobReport.cc:507
bool TFileService::cd ( ) const
inline
TFile& TFileService::file ( ) const
inline
std::string TFileService::fullPath ( ) const
inline

return the full path of the stored histograms

Definition at line 74 of file TFileService.h.

74 { return tFileDirectory_.fullPath(); }
static thread_local TFileDirectory tFileDirectory_
Definition: TFileService.h:79
std::string fullPath() const
return the full path of the stored histograms
TDirectory* TFileService::getBareDirectory ( const std::string &  subdir = "") const
inline

Definition at line 52 of file TFileService.h.

Referenced by FFTJetImageRecorder::analyze(), and FFTJetPileupAnalyzer::analyze().

52  {
53  return tFileDirectory_.getBareDirectory(subdir);
54  }
TDirectory * getBareDirectory(const std::string &subdir="") const
static thread_local TFileDirectory tFileDirectory_
Definition: TFileService.h:79
template<typename T >
T* TFileService::getObject ( const std::string &  objname,
const std::string &  subdir = "" 
)
inline

Definition at line 57 of file TFileService.h.

58  {
59  return tFileDirectory_.getObject<T>(objname, subdir);
60  }
static thread_local TFileDirectory tFileDirectory_
Definition: TFileService.h:79
T * getObject(const std::string &objname, const std::string &subdir="")
long double T
template<typename T , typename... Args>
T* TFileService::make ( const Args &...  args) const
inline

make new ROOT object

Definition at line 64 of file TFileService.h.

Referenced by AlCaHOCalibProducer::AlCaHOCalibProducer(), SiStripHitEffFromCalibTree::algoAnalyze(), SiStripGainFromCalibTree::algoEndJob(), AlignmentMonitorMuonSystemMap1D::AlignmentMonitorMuonSystemMap1D(), AlignmentMuonHIPTrajectorySelector::AlignmentMuonHIPTrajectorySelector(), JetResolutionDemo::analyze(), MuonAlignmentAnalyzer::analyze(), EcalMipGraphs::analyze(), EcalDisplaysByEvent::analyze(), APVShotsAnalyzer::APVShotsAnalyzer(), tnp::BaseTreeFiller::BaseTreeFiller(), HypothesisAnalyzer::beginJob(), PatTauAnalyzer::beginJob(), PatZjetsElectronAnalyzer::beginJob(), PatZjetsJetAnalyzer::beginJob(), PatTriggerTagAndProbe::beginJob(), PatTriggerAnalyzer::beginJob(), myRawAna::beginJob(), PatBJetTagAnalyzer::beginJob(), PatMCMatching::beginJob(), PatMCMatchingExtended::beginJob(), PatTopSelectionAnalyzer::beginJob(), PatBasicAnalyzer::beginJob(), PatBTagAnalyzer::beginJob(), PatTrackAnalyzer::beginJob(), MCPhotonAnalyzer::beginJob(), PhotonsWithConversionsAnalyzer::beginJob(), PatVertexAnalyzer::beginJob(), JetCorrectorDemo::beginJob(), FactorizedJetCorrectorDemo::beginJob(), ExampleMuonAnalyzer::beginJob(), PatBJetTrackAnalyzer::beginJob(), l1t::L1TStage2CaloAnalyzer::beginJob(), WMuNuSelector::beginJob(), PatBJetVertexAnalyzer::beginJob(), ResolutionCreator::beginJob(), HcalHBHEMuonSimAnalyzer::beginJob(), MuonAlignmentAnalyzer::beginJob(), SiPixelDQMRocLevelAnalyzer::beginJob(), ContainmentCorrectionAnalyzer::beginJob(), HGCalTimingAnalyzer::beginJob(), HitEff::beginJob(), BeamSpotRcdReader::beginJob(), FFTJetImageRecorder::beginJob(), HGCalTBAnalyzer::beginJob(), cms::Analyzer_minbias::beginJob(), HcalRaddamMuon::beginJob(), FFTJetPileupAnalyzer::beginJob(), StudyHLT::beginJob(), HcalHBHEMuonAnalyzer::beginJob(), PrimaryVertexValidation::beginJob(), IsoTrig::beginJob(), IsoTrackCalibration::beginJob(), IsoTrackCalib::beginJob(), ErsatzMEt::beginJob(), IsolatedTracksHcalScale::beginJob(), HGCalTBAnalyzer::beginRun(), StudyHLT::beginRun(), MaterialBudgetCastorHistos::book(), MaterialBudgetHcalHistos::book(), MaterialBudget::book(), MaterialBudgetForward::book(), IsolatedParticlesGeneratedJets::BookHistograms(), IsolatedGenParticles::BookHistograms(), IsolatedTracksNxN::BookHistograms(), MuonAlignmentFromReference::bookNtuple(), SVTagInfoValidationAnalyzer::bookRecoToSim(), SVTagInfoValidationAnalyzer::bookSimToReco(), IsolatedTracksCone::BuildTree(), calcTopMass::calcTopMass(), CalibratableTest::CalibratableTest(), CMSDAS11DijetAnalyzer::CMSDAS11DijetAnalyzer(), CMSDAS11DijetTestAnalyzer::CMSDAS11DijetTestAnalyzer(), CommonModeAnalyzer::CommonModeAnalyzer(), SiStripHitEffFromCalibTree::ComputeEff(), CSCPairResidualsConstraint::configure(), CosmicRateAnalyzer::CosmicRateAnalyzer(), CSCOverlapsAlignmentAlgorithm::CSCOverlapsAlignmentAlgorithm(), CSCOverlapsBeamSplashCut::CSCOverlapsBeamSplashCut(), DreamSD::DreamSD(), DuplicateRecHits::DuplicateRecHits(), EcalDisplaysByEvent::EcalDisplaysByEvent(), EcalMipGraphs::EcalMipGraphs(), ElectronStudy::ElectronStudy(), JetCorrectorDemo::endJob(), FactorizedJetCorrectorDemo::endJob(), IsoTrig::endJob(), TrackerOfflineValidation::endJob(), TkLasBeamFitter::endRunProduce(), EopTreeWriter::EopTreeWriter(), gamma_radiative_analyzer::gamma_radiative_analyzer(), HcalTB02Histo::HcalTB02Histo(), HcalTB04Histo::HcalTB04Histo(), HcalTB06Histo::HcalTB06Histo(), HcalTestHistoManager::HcalTestHistoManager(), HGCalTBMB::HGCalTBMB(), HGCalTriggerNtupleManager::HGCalTriggerNtupleManager(), HIPTwoBodyDecayAnalyzer::HIPTwoBodyDecayAnalyzer(), HLTBitAnalyzer::HLTBitAnalyzer(), HLTCSCOverlapFilter::HLTCSCOverlapFilter(), HOCalibAnalyzer::HOCalibAnalyzer(), HSCPValidator::HSCPValidator(), HcalForwardAnalysis::init(), EcalMipGraphs::initHists(), EcalDisplaysByEvent::initHists(), HltComparator::initialise(), L1CaloTowerTreeProducer::L1CaloTowerTreeProducer(), L1ElectronRecoTreeProducer::L1ElectronRecoTreeProducer(), L1EventTreeProducer::L1EventTreeProducer(), L1ExtraTreeProducer::L1ExtraTreeProducer(), L1GenTreeProducer::L1GenTreeProducer(), L1HOTreeProducer::L1HOTreeProducer(), L1JetRecoTreeProducer::L1JetRecoTreeProducer(), L1MenuTreeProducer::L1MenuTreeProducer(), L1MetFilterRecoTreeProducer::L1MetFilterRecoTreeProducer(), L1MuonRecoTreeProducer::L1MuonRecoTreeProducer(), L1RCTRelValAnalyzer::L1RCTRelValAnalyzer(), L1RCTTestAnalyzer::L1RCTTestAnalyzer(), L1RecoTreeProducer::L1RecoTreeProducer(), L1TauRecoTreeProducer::L1TauRecoTreeProducer(), L1uGTTreeProducer::L1uGTTreeProducer(), L1UpgradeTfMuonTreeProducer::L1UpgradeTfMuonTreeProducer(), L1UpgradeTreeProducer::L1UpgradeTreeProducer(), SiStripHitEffFromCalibTree::makeHotColdMaps(), SiStripHitEffFromCalibTree::makeSummary(), SiStripHitEffFromCalibTree::makeSummaryVsBx(), MCVerticesAnalyzer::MCVerticesAnalyzer(), MCvsRecoVerticesAnalyzer::MCvsRecoVerticesAnalyzer(), MultiplicityCorrelatorHistogramMaker::MultiplicityCorrelatorHistogramMaker(), MuTriggerAnalyzer::MuTriggerAnalyzer(), OverlapProblemTPAnalyzer::OverlapProblemTPAnalyzer(), OverlapProblemTSOSAnalyzer::OverlapProblemTSOSAnalyzer(), PatJetAnalyzer::PatJetAnalyzer(), PatZToMuMuAnalyzer::PatZToMuMuAnalyzer(), PDFWeightsTest::PDFWeightsTest(), CSCAlignmentCorrections::plot(), VariableNTupler::registerleaves(), AdHocNTupler::registerleaves(), StringBasedNTupler::registerleaves(), SeedMultiplicityAnalyzer::SeedMultiplicityAnalyzer(), EcalMipGraphs::selectDigi(), EcalDisplaysByEvent::selectDigi(), PatBTagCommonHistos::Set(), ZMuMuMassConstraintParameterFinder::DiMuonInfo::setupTree(), ShallowTree::ShallowTree(), SiPixelQualityHistory::SiPixelQualityHistory(), SiStripBaselineAnalyzer::SiStripBaselineAnalyzer(), SiStripOfflineDQM::SiStripOfflineDQM(), SiStripQualityHistory::SiStripQualityHistory(), SiStripGainFromCalibTree::storeOnTree(), SVTagInfoValidationAnalyzer::SVTagInfoValidationAnalyzer(), testAnalyzer::testAnalyzer(), TopElecAnalyzer::TopElecAnalyzer(), TopGenEventAnalyzer::TopGenEventAnalyzer(), TopJetAnalyzer::TopJetAnalyzer(), TopMuonAnalyzer::TopMuonAnalyzer(), TopTauAnalyzer::TopTauAnalyzer(), TrackCategoriesAnalyzer::TrackCategoriesAnalyzer(), TrackCount::TrackCount(), TrackingNtuple::TrackingNtuple(), TrackingParticleCategoriesAnalyzer::TrackingParticleCategoriesAnalyzer(), TreeWriterForEcalCorrection::TreeWriterForEcalCorrection(), MuonMillepedeAlgorithm::updateInfo(), ZMassHistogrammer::ZMassHistogrammer(), ZMuMu_efficiencyAnalyzer::ZMuMu_efficiencyAnalyzer(), ZMuMu_MCanalyzer::ZMuMu_MCanalyzer(), ZMuMu_Radiative_analyzer::ZMuMu_Radiative_analyzer(), ZMuMu_vtxAnalyzer::ZMuMu_vtxAnalyzer(), ZMuMuAnalyzer::ZMuMuAnalyzer(), ZMuMuAnalyzer_cynematics::ZMuMuAnalyzer_cynematics(), ZMuMuIsolationAnalyzer::ZMuMuIsolationAnalyzer(), ZMuMuPerformances::ZMuMuPerformances(), and ZMuMuSaMassHistogram::ZMuMuSaMassHistogram().

64  {
65  return tFileDirectory_.make<T>(args ...);
66  }
static thread_local TFileDirectory tFileDirectory_
Definition: TFileService.h:79
T * make(const Args &...args) const
make new ROOT object
long double T
TFileDirectory TFileService::mkdir ( const std::string &  dir,
const std::string &  descr = "" 
)
inline

create a new subdirectory

Definition at line 69 of file TFileService.h.

References TFileDirectory::mkdir().

Referenced by AlignmentMonitorBase::AlignmentMonitorBase(), CentralityTableProducer::analyze(), APVCyclePhaseMonitor::analyze(), BigEventsDebugger< T >::analyze(), SiStripBaselineAnalyzer::analyze(), SiStripSpyDisplayModule::analyze(), l1t::L1TStage2CaloAnalyzer::beginJob(), L1GctValidation::beginJob(), l1t::L1TGlobalAnalyzer::beginJob(), PrimaryVertexValidation::beginJob(), BigEventsDebugger< T >::BigEventsDebugger(), BjetAnalysis::BjetAnalysis(), DigiInvestigatorHistogramMaker::book(), DigiVtxPosCorrHistogramMaker::book(), DigiVertexCorrHistogramMaker::book(), DigiPileupCorrHistogramMaker::book(), BeamSpotHistogramMaker::book(), DigiBXCorrHistogramMaker< T >::book(), VertexHistogramMaker::book(), DigiLumiCorrHistogramMaker::book(), BSvsPVHistogramMaker::book(), L1GtDataEmulAnalyzer::bookHistograms(), IsolatedGenParticles::BookHistograms(), IsolatedTracksNxN::BookHistograms(), ApeEstimator::bookSectorHistsForAnalyzerMode(), ApeEstimator::bookSectorHistsForApeCalculation(), ApeEstimator::bookTrackHists(), CosmicGenFilterHelix::createHistsEnd(), CosmicGenFilterHelix::createHistsStart(), TrackerOfflineValidation::DirectoryWrapper::DirectoryWrapper(), ECalSD::ECalSD(), PatBTagAnalyzer::endJob(), TrackerTreeGenerator::endJob(), EWKSystUnc::EWKSystUnc(), MuonAlignmentFromReference::fitAndAlign(), GctErrorAnalyzer::GctErrorAnalyzer(), GlbMuQualityCutsAnalysis::GlbMuQualityCutsAnalysis(), HCalSD::HCalSD(), HFGflash::HFGflash(), HFShowerParam::HFShowerParam(), WMuNuValidator::init_histograms(), MultiplicityTimeCorrelations::MultiplicityTimeCorrelations(), batchmanager.BatchManager::PrepareJob(), TrackCategoriesAnalyzer::TrackCategoriesAnalyzer(), TrackerDpgAnalysis::TrackerDpgAnalysis(), TrackerGeometryCompare::TrackerGeometryCompare(), TrackingParticleCategoriesAnalyzer::TrackingParticleCategoriesAnalyzer(), TSOSHistogramMaker::TSOSHistogramMaker(), ZHistogrammer::ZHistogrammer(), ZLONLOHistogrammer::ZLONLOHistogrammer(), ZMCHistogrammer::ZMCHistogrammer(), ZMuMu_efficiencyAnalyzer::ZMuMu_efficiencyAnalyzer(), ZMuMuAnalyzer_cynematics::ZMuMuAnalyzer_cynematics(), ZMuMuEfficiency::ZMuMuEfficiency(), ZMuPtScaleAnalyzer::ZMuPtScaleAnalyzer(), and zPdfUnc::zPdfUnc().

69  {
70  return tFileDirectory_.mkdir(dir, descr);
71  }
static thread_local TFileDirectory tFileDirectory_
Definition: TFileService.h:79
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
dbl *** dir
Definition: mlp_gen.cc:35
void TFileService::postModuleEvent ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 67 of file TFileService.cc.

References edm::ModuleCallingContext::moduleDescription(), edm::ModuleCallingContext::previousModuleOnThread(), and setDirectoryName().

Referenced by TFileService().

67  {
68  edm::ModuleCallingContext const* previous_mcc = mcc.previousModuleOnThread();
69  if(previous_mcc) {
70  setDirectoryName(*previous_mcc->moduleDescription());
71  }
72 }
void setDirectoryName(const edm::ModuleDescription &desc)
Definition: TFileService.cc:57
ModuleDescription const * moduleDescription() const
ModuleCallingContext const * previousModuleOnThread() const
void TFileService::postModuleGlobal ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 80 of file TFileService.cc.

References edm::ModuleCallingContext::moduleDescription(), edm::ModuleCallingContext::previousModuleOnThread(), and setDirectoryName().

Referenced by TFileService().

80  {
81  edm::ModuleCallingContext const* previous_mcc = mcc.previousModuleOnThread();
82  if(previous_mcc) {
83  setDirectoryName(*previous_mcc->moduleDescription());
84  }
85 }
void setDirectoryName(const edm::ModuleDescription &desc)
Definition: TFileService.cc:57
ModuleDescription const * moduleDescription() const
ModuleCallingContext const * previousModuleOnThread() const
void TFileService::preModuleEvent ( edm::StreamContext const &  ,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 63 of file TFileService.cc.

References edm::ModuleCallingContext::moduleDescription(), and setDirectoryName().

Referenced by TFileService().

63  {
64  setDirectoryName(*mcc.moduleDescription());
65 }
void setDirectoryName(const edm::ModuleDescription &desc)
Definition: TFileService.cc:57
void TFileService::preModuleGlobal ( edm::GlobalContext const &  ,
edm::ModuleCallingContext const &  mcc 
)
private

Definition at line 75 of file TFileService.cc.

References edm::ModuleCallingContext::moduleDescription(), and setDirectoryName().

Referenced by TFileService().

75  {
76  setDirectoryName(*mcc.moduleDescription());
77 }
void setDirectoryName(const edm::ModuleDescription &desc)
Definition: TFileService.cc:57
void TFileService::setDirectoryName ( const edm::ModuleDescription desc)
private

Definition at line 57 of file TFileService.cc.

References TFileDirectory::descr_, TFileDirectory::dir_, file_, TFileDirectory::file_, edm::ModuleDescription::moduleLabel(), edm::ModuleDescription::moduleName(), and tFileDirectory_.

Referenced by postModuleEvent(), postModuleGlobal(), preModuleEvent(), preModuleGlobal(), and TFileService().

57  {
60  tFileDirectory_.descr_ = (tFileDirectory_.dir_ + " (" + desc.moduleName() + ") folder").c_str();
61 }
std::string const & moduleName() const
TFile * file_
pointer to opened TFile
Definition: TFileService.h:81
std::string const & moduleLabel() const
static thread_local TFileDirectory tFileDirectory_
Definition: TFileService.h:79
std::string dir_
std::string descr_
TFileDirectory& TFileService::tFileDirectory ( )
inline

Member Data Documentation

bool TFileService::closeFileFast_
private

Definition at line 84 of file TFileService.h.

Referenced by ~TFileService().

TFile* TFileService::file_
private

pointer to opened TFile

Definition at line 81 of file TFileService.h.

Referenced by setDirectoryName(), TFileService(), and ~TFileService().

std::string TFileService::fileName_
private

Definition at line 82 of file TFileService.h.

Referenced by afterBeginJob(), and TFileService().

bool TFileService::fileNameRecorded_
private

Definition at line 83 of file TFileService.h.

Referenced by afterBeginJob().

const std::string TFileService::kSharedResource = "TFileService"
static
thread_local TFileDirectory TFileService::tFileDirectory_
staticprivate

Definition at line 79 of file TFileService.h.

Referenced by setDirectoryName(), and TFileService().