LArSoft
v06_85_00
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(), DUNE::NeutrinoShowerEff::beginJob(), cluster::TrajCluster::beginJob(), vertex::AggregateVertexAna::beginJob(), evgen::CosmicsGen::beginJob(), ShowerQuality::beginJob(), hit::HitAnaModule::beginJob(), filt::EmptyFilter::beginJob(), cluster::DBcluster::beginJob(), rwgt::ReweightAna::beginJob(), caldata::CalWireAna::beginJob(), cluster::fuzzyCluster::beginJob(), microboone::CosmicRemovalAna::beginJob(), detsim::SimWireAna::beginJob(), evgen::NUANCEGen::beginJob(), larg4::LArG4Ana::beginJob(), trkf::TrackKalmanCheater::beginJob(), DUNE::NeutrinoTrackingEff::beginJob(), vertex::PrimaryVertexFinder::beginJob(), pfpf::PFPAna::beginJob(), cluster::ClusterAna::beginJob(), reco3d::SpacePointSolver::beginJob(), DUNE::MuonTrackingEff::beginJob(), vertex::HarrisVertexFinder::beginJob(), detsim::WienerFilterAna::beginJob(), evgen::NDKGen::beginJob(), cluster::DBclusterAna::beginJob(), hit::HitFinderAna::beginJob(), hit::GausHitFinderAna::beginJob(), hit::GausHitFinder::beginJob(), trkf::Track3DKalmanHit::beginJob(), cluster::HoughLineFinderAna::beginJob(), vertex::VertexFinder2D::beginJob(), evgen::GaisserParam::beginJob(), opdet::SimPhotonCounter::beginJob(), detsim::SimWire::beginJob(), hit::DPRawHitFinder::beginJob(), shwf::ShowerReco::beginJob(), detsim::SimWireT962::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(), detsim::SimWireT962::ConvoluteResponseFunctions(), tca::HistStuff::CreateHists(), DUNE::NeutrinoShowerEff::doEfficiencies(), DUNE::NeutrinoTrackingEff::doEfficiencies(), shower::EMShowerAlg::EMShowerAlg(), opdet::LEDCalibrationAna::endJob(), larg::LArSimChannelAna::ensureHists(), hit::MagDriftAna::ensureHists(), reco_tool::CandHitMorphological::findHitCandidates(), reco_tool::CandHitDerivative::findHitCandidates(), 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::SimWireT962::SetElectResponse(), detsim::SimWire::SetFieldResponse(), detsim::SimWireT962::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(), 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().