LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "TFileDirectory.h"
Public Member Functions | |
virtual | ~TFileDirectory ()=default |
template<typename T , typename... ARGS> | |
T * | make (ARGS...args) const |
template<typename T , typename... ARGS> | |
T * | makeAndRegister (char const *name, char const *title, ARGS...args) const |
template<typename T , typename... ARGS> | |
T * | makeAndRegister (std::string const &name, std::string const &title, ARGS...args) const |
TFileDirectory | mkdir (std::string const &dir, std::string const &descr="") |
Protected Types | |
using | Callback_t = std::function< void()> |
Protected Member Functions | |
TFileDirectory (std::string const &dir, std::string const &descr, TFile *file, std::string const &path) | |
Create a new TFileDirectory object. More... | |
void | invokeCallbacks () |
void | registerCallback (Callback_t) |
std::string | fullPath () const |
Protected Attributes | |
TFile * | file_ |
std::string | dir_ |
std::string | descr_ |
bool | requireCallback_ {false} |
Private Member Functions | |
void | cd () const |
Private Attributes | |
std::string | path_ |
std::map< std::string, std::vector< Callback_t > > | callbacks_ {} |
Definition at line 24 of file TFileDirectory.h.
|
protected |
Definition at line 52 of file TFileDirectory.h.
|
virtualdefault |
|
protected |
Create a new TFileDirectory object.
Definition at line 11 of file TFileDirectory.cc.
References descr_, dir, dir_, and path_.
|
private |
Make the current directory be the one implied by the state of this TFileDirectory.
Definition at line 36 of file TFileDirectory.cc.
References callbacks_, art::errors::Configuration, descr_, dir, dir_, file_, fullPath(), path_, and requireCallback_.
Referenced by make(), makeAndRegister(), and mkdir().
|
protected |
Return the full pathname of the current directory, formed from appending 'dir' to the end of 'path'.
Definition at line 80 of file TFileDirectory.cc.
Referenced by cd(), and mkdir().
|
protected |
Definition at line 19 of file TFileDirectory.cc.
References callbacks_, dir_, and f.
Referenced by art::TFileService::maybeSwitchFiles_().
T * art::TFileDirectory::make | ( | ARGS... | args | ) | const |
make new ROOT object of type T, using constructor parameters args. It will be made in the 'current directory', as established with a call to 'cd'.
Definition at line 82 of file TFileDirectory.h.
References cd().
Referenced by opdet::OpHitAna::analyze(), opdet::OpDigiAna::analyze(), opdet::OpFlashAna::analyze(), mvapid::MVAPID::beginJob(), lar_pandora::PFParticleTrackAna::beginJob(), lar_pandora::PFParticleCosmicAna::beginJob(), lar_pandora::PFParticleAnalysis::beginJob(), lar_pandora::PFParticleHitDumper::beginJob(), lar_pandora::PFParticleMonitoring::beginJob(), pid::PIDAAnalyzer::beginJob(), opdet::OpFlashSimpleAna::beginJob(), phot::PhotonLibraryAnalyzer::beginJob(), filt::FinalStateParticleFilter::beginJob(), opreco::OpticalRecoAna::beginJob(), filt::FinalStateSelectFilter::beginJob(), spacecharge::ShiftEdepSCE::beginJob(), opdet::FlashHypothesisAna::beginJob(), cluster::ClusterPCA::beginJob(), larg4::ISCalculationAna::beginJob(), vertex::AggregateVertexAna::beginJob(), evgen::CosmicsGen::beginJob(), DUNE::NeutrinoShowerEff::beginJob(), ShowerQuality::beginJob(), filt::EmptyFilter::beginJob(), hit::HitAnaModule::beginJob(), cluster::TrajCluster::beginJob(), cluster::DBcluster::beginJob(), shower::TCShowerTemplateMaker::beginJob(), rwgt::ReweightAna::beginJob(), shower::TCShowerElectronLikelihood::beginJob(), caldata::CalWireAna::beginJob(), shower::TCShowerAnalysis::beginJob(), cluster::fuzzyCluster::beginJob(), microboone::CosmicRemovalAna::beginJob(), detsim::SimWireAna::beginJob(), evgen::NUANCEGen::beginJob(), larg4::LArG4Ana::beginJob(), DUNE::NeutrinoTrackingEff::beginJob(), trkf::TrackKalmanCheater::beginJob(), pfpf::PFPAna::beginJob(), vertex::PrimaryVertexFinder::beginJob(), cluster::ClusterAna::beginJob(), DUNE::MuonTrackingEff::beginJob(), vertex::HarrisVertexFinder::beginJob(), detsim::WienerFilterAna::beginJob(), evgen::NDKGen::beginJob(), cluster::DBclusterAna::beginJob(), hit::GausHitFinderAna::beginJob(), hit::HitFinderAna::beginJob(), hit::GausHitFinder::beginJob(), cluster::HoughLineFinderAna::beginJob(), trkf::Track3DKalmanHit::beginJob(), NuShowerEff::beginJob(), vertex::VertexFinder2D::beginJob(), evgen::GaisserParam::beginJob(), opdet::SimPhotonCounter::beginJob(), detsim::SimWire::beginJob(), hit::DPRawHitFinder::beginJob(), shwf::ShowerReco::beginJob(), vertex::FeatureVertexFinderAna::beginJob(), trkf::Track3DKalman::beginJob(), evgen::GENIEGen::beginJob(), lbne::PhotonCounterT0Matching::beginJob(), trkf::Track3DKalmanSPS::beginJob(), t0::MCTruthT0Matching::beginJob(), evgen::MUSUN::beginJob(), ems::MultiEMShowers::beginJob(), lar::example::AnalysisExample::beginJob(), ems::MergeEMShower3D::beginJob(), cheat::RecoCheckAna::beginRun(), trkf::SpacePointAna::bookHistograms(), reco_tool::CandHitDerivative::configure(), reco_tool::CandHitMorphological::configure(), detsim::SimWire::ConvoluteResponseFunctions(), tca::HistStuff::CreateHists(), DUNE::NeutrinoShowerEff::doEfficiencies(), DUNE::NeutrinoTrackingEff::doEfficiencies(), NuShowerEff::doEfficiencies(), shower::EMShowerAlg::EMShowerAlg(), opdet::LEDCalibrationAna::endJob(), larg::LArSimChannelAna::ensureHists(), hit::MagDriftAna::ensureHists(), reco_tool::CandHitMorphological::findHitCandidates(), reco_tool::CandHitDerivative::findHitCandidates(), lar_cluster3d::ConvexHullPathFinder::initializeHistograms(), lar_cluster3d::VoronoiPathFinder::initializeHistograms(), lar_cluster3d::Cluster3D::InitializeMonitoring(), larg4::IonizationAndScintillation::IonizationAndScintillation(), opdet::LEDCalibrationAna::LEDCalibrationAna(), evgen::LightSource::LightSource(), evgen::MarleyTimeGen::make_nu_emission_histograms(), evgen::MarleyGen::MarleyGen(), evgen::MarleyTimeGen::MarleyTimeGen(), trkf::SeedAna::MCHists::MCHists(), trkf::TrackAna::MCHists::MCHists(), cluster::MergeClusterAlg::MergeClusterAlg(), opdet::OpFlashAna::OpFlashAna(), opdet::OpHitAna::OpHitAna(), trkf::PMAlgTrackMaker::PMAlgTrackMaker(), cluster::ClusterMatchAlg::PrepareTTree(), trkf::SeedAna::RecoHists::RecoHists(), trkf::TrackAna::RecoHists::RecoHists(), detsim::SimWire::SetElectResponse(), detsim::SimWire::SetFieldResponse(), phot::PhotonLibrary::StoreLibraryToFile(), trk::TrackContainmentAnalyzer::TrackContainmentAnalyzer(), and trk::TrackContainmentTagger::TrackContainmentTagger().
T * art::TFileDirectory::makeAndRegister | ( | char const * | name, |
char const * | title, | ||
ARGS... | args | ||
) | const |
make and register a new ROOT object of type T, giving it the specified name and title, using constructor parameters 'args'. The type must be registerable, and must support naming and titling.
Definition at line 91 of file TFileDirectory.h.
References cd().
Referenced by makeAndRegister().
T * art::TFileDirectory::makeAndRegister | ( | std::string const & | name, |
std::string const & | title, | ||
ARGS... | args | ||
) | const |
Definition at line 106 of file TFileDirectory.h.
References makeAndRegister().
art::TFileDirectory art::TFileDirectory::mkdir | ( | std::string const & | dir, |
std::string const & | descr = "" |
||
) |
Create a new TFileDirectory, sharing the same TFile as this one, but with an additional 'dir', and with 'path' being the fullPath() of this one.
Definition at line 86 of file TFileDirectory.cc.
References cd(), dir, file_, and fullPath().
Referenced by opdet::FIFOHistogramAna::analyze(), trkf::TrackKalmanCheater::beginJob(), trkf::Track3DKalmanHit::beginJob(), trkf::SpacePointAna::bookHistograms(), reco_tool::CandHitMorphological::configure(), reco_tool::CandHitDerivative::configure(), reco_tool::CandHitMorphological::findHitCandidates(), reco_tool::CandHitDerivative::findHitCandidates(), lar_cluster3d::ConvexHullPathFinder::initializeHistograms(), lar_cluster3d::VoronoiPathFinder::initializeHistograms(), trkf::SeedAna::MCHists::MCHists(), trkf::TrackAna::MCHists::MCHists(), trkf::SeedAna::RecoHists::RecoHists(), and trkf::TrackAna::RecoHists::RecoHists().
|
protected |
Definition at line 30 of file TFileDirectory.cc.
References callbacks_, and dir_.
Referenced by art::TFileService::registerFileSwitchCallback().
|
private |
Definition at line 77 of file TFileDirectory.h.
Referenced by cd(), invokeCallbacks(), and registerCallback().
|
protected |
Definition at line 69 of file TFileDirectory.h.
Referenced by cd(), art::TFileService::setDirectoryName_(), and TFileDirectory().
|
protected |
Definition at line 68 of file TFileDirectory.h.
Referenced by cd(), fullPath(), invokeCallbacks(), registerCallback(), art::TFileService::setDirectoryName_(), and TFileDirectory().
|
protected |
Definition at line 67 of file TFileDirectory.h.
Referenced by cd(), art::TFileService::closeFile_(), mkdir(), art::TFileService::openFile_(), and art::TFileService::requestsToCloseFile_().
|
private |
Definition at line 73 of file TFileDirectory.h.
Referenced by cd(), fullPath(), and TFileDirectory().
|
protected |
Definition at line 70 of file TFileDirectory.h.
Referenced by cd(), and art::TFileService::TFileService().