Project

General

Profile

TFileDirectory.p

Kyle Knoepfel, 11/08/2017 04:32 PM

 
1
diff --git a/art/Framework/Services/Optional/TFileDirectory.cc b/art/Framework/Services/Optional/TFileDirectory.cc
2
index e36f1320..f0a408ed 100644
3
--- a/art/Framework/Services/Optional/TFileDirectory.cc
4
+++ b/art/Framework/Services/Optional/TFileDirectory.cc
5
@@ -19,6 +19,7 @@ void
6
 art::TFileDirectory::invokeCallbacks()
7
 {
8
   for (auto const& pr : callbacks_) {
9
+    dir_ = pr.first;
10
     for (auto f : pr.second) {
11
       f();
12
     }
13
@@ -28,7 +29,7 @@ art::TFileDirectory::invokeCallbacks()
14
 void
15
 art::TFileDirectory::registerCallback(Callback_t cb)
16
 {
17
-  callbacks_[fullPath()].push_back(cb);
18
+  callbacks_[dir_].push_back(cb);
19
 }
20
 
21
 void
22
@@ -36,7 +37,7 @@ art::TFileDirectory::cd() const
23
 {
24
   auto const& fpath = fullPath();
25
   if (requireCallback_) {
26
-    auto it = callbacks_.find(fpath);
27
+    auto it = callbacks_.find(dir_);
28
     if (it == cend(callbacks_)) {
29
       throw Exception{errors::Configuration,
30
                       "A TFileService error occured while attempting to make a "
31
diff --git a/art/Framework/Services/Optional/TFileDirectory.h b/art/Framework/Services/Optional/TFileDirectory.h
32
index 8780b969..56b7ad2c 100644
33
--- a/art/Framework/Services/Optional/TFileDirectory.h
34
+++ b/art/Framework/Services/Optional/TFileDirectory.h
35
@@ -65,10 +65,11 @@ namespace art {
36
     TFile* file_;
37
     std::string dir_;
38
     std::string descr_;
39
-    std::string path_;
40
     bool requireCallback_{false};
41
 
42
   private:
43
+
44
+    std::string path_;
45
     /// Make the current directory be the one implied by the state of
46
     /// this TFileDirectory.
47
     void cd() const;