The Gaudi Framework  v36r16 (ea80daf8)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
THistSvc.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2021 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDISVC_THISTSVC_H
12 #define GAUDISVC_THISTSVC_H
13 
14 // system includes:
15 #include <map>
16 #include <set>
17 #include <string>
18 #include <vector>
19 
20 // Gaudi includes:
21 #include "GaudiKernel/IFileMgr.h"
24 #include "GaudiKernel/ITHistSvc.h"
25 #include "GaudiKernel/MsgStream.h"
26 #include "GaudiKernel/Service.h"
27 
28 // ROOT includes:
29 #include "TEfficiency.h"
30 #include "TGraph.h"
31 #include "TH1.h"
32 #include "TH2.h"
33 #include "TH3.h"
34 #include "TList.h"
35 #include "TObject.h"
36 #include "TTree.h"
37 
38 class IIncidentSvc;
39 class TClass;
40 
41 class THistSvc : public extends<Service, ITHistSvc, IIncidentListener, IIoComponent> {
42 public:
43  using extends::extends;
44 
45  StatusCode initialize() override;
46  StatusCode reinitialize() override;
47  StatusCode finalize() override;
48 
49 public:
50  // Methods from ITHistSvc
53 
55  StatusCode regHist( const std::string& name ) override;
59  StatusCode regHist( const std::string& name, std::unique_ptr<TH1> hist ) override;
64  StatusCode regHist( const std::string& name, std::unique_ptr<TH1> hist, TH1* hist_ptr ) override;
67  StatusCode regHist( const std::string& name, TH1* ) override;
68 
70  StatusCode getHist( const std::string& name, TH1*&, size_t index = 0 ) const override;
72  StatusCode getHist( const std::string& name, TH2*&, size_t index = 0 ) const override;
74  StatusCode getHist( const std::string& name, TH3*&, size_t index = 0 ) const override;
75 
77 
80 
82  StatusCode regTree( const std::string& name ) override;
87  StatusCode regTree( const std::string& name, TTree* ) override;
89  StatusCode getTree( const std::string& name, TTree*& ) const override;
90 
92 
95 
97  StatusCode regGraph( const std::string& name ) override;
102  virtual StatusCode regGraph( const std::string& name, TGraph* ) override;
104  StatusCode getGraph( const std::string& name, TGraph*& ) const override;
105 
107  StatusCode regEfficiency( const std::string& name ) override;
112  virtual StatusCode regEfficiency( const std::string& name, TEfficiency* ) override;
114  StatusCode getEfficiency( const std::string& name, TEfficiency*& ) const override;
115 
117 
120 
132  StatusCode getShared( const std::string& name, LockedHandle<TH1>& ) const override;
134  StatusCode getShared( const std::string& name, LockedHandle<TH2>& ) const override;
136  StatusCode getShared( const std::string& name, LockedHandle<TH3>& ) const override;
138  StatusCode getShared( const std::string& name, LockedHandle<TGraph>& ) const override;
141 
143 
146 
148  StatusCode deReg( const std::string& name ) override;
150  StatusCode deReg( TObject* obj ) override;
151 
153  StatusCode merge( const std::string& id ) override;
155  StatusCode merge( TObject* ) override;
156 
159  bool exists( const std::string& name ) const override;
161  bool existsHist( const std::string& name ) const override;
163  bool existsTree( const std::string& name ) const override;
165  bool existsGraph( const std::string& name ) const override;
167  bool existsEfficiency( const std::string& name ) const override;
168 
170 
173 
174  std::vector<std::string> getHists() const override;
175  std::vector<std::string> getTrees() const override;
176  std::vector<std::string> getGraphs() const override;
177  std::vector<std::string> getEfficiencies() const override;
178 
179  StatusCode getTHists( TDirectory* td, TList&, bool recurse = false ) const override;
180  StatusCode getTHists( const std::string& name, TList&, bool recurse = false ) const override;
181  StatusCode getTHists( TDirectory* td, TList& tl, bool recurse = false, bool reg = false ) override;
182  StatusCode getTHists( const std::string& name, TList& tl, bool recurse = false, bool reg = false ) override;
183 
184  StatusCode getTTrees( TDirectory* td, TList&, bool recurse = false ) const override;
185  StatusCode getTTrees( const std::string& name, TList&, bool recurse = false ) const override;
186  StatusCode getTTrees( TDirectory* td, TList& tl, bool recurse = false, bool reg = false ) override;
187  StatusCode getTTrees( const std::string& name, TList& tl, bool recurse = false, bool reg = false ) override;
188 
189  StatusCode getTEfficiencies( TDirectory* td, TList&, bool recurse = false ) const override;
190  StatusCode getTEfficiencies( const std::string& name, TList&, bool recurse = false ) const override;
191  StatusCode getTEfficiencies( TDirectory* td, TList& tl, bool recurse = false, bool reg = false ) override;
192  StatusCode getTEfficiencies( const std::string& name, TList& tl, bool recurse = false, bool reg = false ) override;
193 
195 
196 public:
197  // Methods from other interfaces
198  // From IIncidentListener
199  void handle( const Incident& ) override;
200 
201  // From IIoComponent
202  StatusCode io_reinit() override;
203 
204 private:
207 
210  public:
213 
214  private:
215  TDirectory* m_gDirectory;
216  TFile* m_gFile;
219  };
220 
223 
226 
228  static Mode charToMode( const char typ ) {
229  switch ( typ ) {
230  case 'O':
231  return READ;
232  case 'A':
233  return APPEND;
234  case 'R':
235  return UPDATE;
236  case 'S':
237  return SHARE;
238  default:
239  return INVALID;
240  }
241  }
242 
244  struct THistID {
246  TObject* obj{ nullptr };
247  TFile* file{ nullptr };
248  histMut_t* mutex{ nullptr };
251  bool temp{ true };
252  bool shared{ false };
253 
254  THistID() = default;
255  THistID( const THistID& rhs ) = default;
256  THistID( std::string& i, bool& t, TObject* o, TFile* f ) : id( i ), obj( o ), file( f ), temp( t ) {}
257  THistID( std::string& i, bool& t, TObject* o, TFile* f, Mode m )
258  : id( i ), obj( o ), file( f ), mode( m ), temp( t ) {}
259 
260  bool operator<( THistID const& rhs ) const { return ( obj < rhs.obj ); }
261 
262  friend std::ostream& operator<<( std::ostream& ost, const THistID& hid ) {
263  ost << "id: " << hid.id << " t: " << hid.temp << " s: " << hid.shared << " M: " << hid.mode << " m: " << hid.mutex
264  << " o: " << hid.obj << " T: " << static_cast<int>( hid.type ) << " " << hid.obj->IsA()->GetName();
265  return ost;
266  }
267  };
268 
271 
273 
277 
281 
282  // containers for fast lookups
283  // same uid for all elements in vec
285  // all THistIDs
287  // uid: /stream/name -> vhid
289  // name -> vhid
292 
296 
297  // Container holding all TObjects and vhid*s
299 
302  streamMap m_fileStreams; // fileName->streams
303 
304  // stream->filename of shared files
306 
308 
311 
312  template <typename T>
313  StatusCode regHist_i( std::unique_ptr<T> hist, const std::string& name, bool shared );
314  template <typename T>
315  StatusCode regHist_i( std::unique_ptr<T> hist, const std::string& name, bool shared, THistID*& hid );
316  template <typename T>
317  T* getHist_i( const std::string& name, const size_t& ind = 0, bool quiet = false ) const;
318  template <typename T>
319  T* readHist_i( const std::string& name ) const;
320 
321  template <typename T>
323  template <typename T>
325 
327 
330 
331  template <typename T>
332  T* readHist( const std::string& name ) const;
333  TTree* readTree( const std::string& name ) const;
334 
336  void updateFiles();
338  StatusCode connect( const std::string& );
339  TDirectory* changeDir( const THistSvc::THistID& hid ) const;
341  void removeDoubleSlash( std::string& ) const;
342 
343  void MergeRootFile( TDirectory*, TDirectory* );
344 
345  bool findStream( const std::string& name, std::string& root, std::string& rem, TFile*& file ) const;
346  void parseString( const std::string& id, std::string& root, std::string& rem ) const;
347 
349  void setupInputFile();
350 
352  void setupOutputFile();
353 
355  void copyFileLayout( TDirectory*, TDirectory* );
356 
357  size_t findHistID( const std::string& id, const THistID*& hid, const size_t& index = 0 ) const;
358 
359  void dump() const;
360 
362  StatusCode merge( const THistID& );
364  StatusCode merge( vhid_t* );
365 
368 
370 
373 
374  Gaudi::Property<int> m_autoSave{ this, "AutoSave", 0 };
375  Gaudi::Property<int> m_autoFlush{ this, "AutoFlush", 0 };
376  Gaudi::Property<bool> m_print{ this, "PrintAll", false };
377  Gaudi::Property<int> m_maxFileSize{ this, "MaxFileSize", 10240,
378  "maximum file size in MB. if exceeded,"
379  " will cause an abort. -1 to never check." };
380  Gaudi::Property<int> m_compressionLevel{ this, "CompressionLevel", 1, [this]( auto& ) {
381  this->warning()
382  << "\"CompressionLevel\" Property has been deprecated. "
383  << "Set it via the \"CL=\" parameter in the \"Output\" Property"
384  << endmsg;
385  } };
387  this, "Output", {}, &THistSvc::setupOutputFile, "", "OrderedSet<std::string>" };
389  this, "Input", {}, &THistSvc::setupInputFile, "", "OrderedSet<std::string>" };
390 
392 
393  IIncidentSvc* p_incSvc = nullptr;
394  IFileMgr* p_fileMgr = nullptr;
395 
396  bool m_signaledStop = false;
397  bool m_delayConnect = false;
398  bool m_okToConnect = false;
399  bool m_hasTTrees = false;
400 
402 
404 };
405 
406 // Include template implementation
407 #include "THistSvc.icc"
408 
409 #endif // GAUDISVC_THISTSVC_H
THistSvc::THistID::id
std::string id
Definition: THistSvc.h:245
THistSvc::p_incSvc
IIncidentSvc * p_incSvc
Definition: THistSvc.h:393
THistSvc::readHist_i
T * readHist_i(const std::string &name) const
Definition: THistSvc.icc:231
THistSvc::getEfficiency
StatusCode getEfficiency(const std::string &name, TEfficiency *&) const override
Return TEfficiency with given name.
Definition: THistSvc.cpp:470
THistSvc::m_autoFlush
Gaudi::Property< int > m_autoFlush
Definition: THistSvc.h:375
IIoComponent.h
THistSvc::regShared_i
LockedHandle< T > regShared_i(const std::string &id, std::unique_ptr< T > hist)
Definition: THistSvc.icc:285
THistSvc::INVALID
@ INVALID
Definition: THistSvc.h:222
THistSvc::UPDATE
@ UPDATE
Definition: THistSvc.h:222
std::string
STL class.
THistSvc::merge
StatusCode merge(const std::string &id) override
Merge all clones for object with a given id.
Definition: THistSvc.cpp:656
THistSvc::m_signaledStop
bool m_signaledStop
Definition: THistSvc.h:396
THistSvc::m_delayConnect
bool m_delayConnect
Definition: THistSvc.h:397
THistSvc::getEfficiencies
std::vector< std::string > getEfficiencies() const override
Definition: THistSvc.cpp:714
THistSvc::regShared
StatusCode regShared(const std::string &name, std::unique_ptr< TH1 >, LockedHandle< TH1 > &) override
Register shared object of type TH1 and return LockedHandle for that object.
Definition: THistSvc.cpp:479
THistSvc::histMut_t
std::mutex histMut_t
Definition: THistSvc.h:206
THistSvc
Definition: THistSvc.h:41
std::list< vhid_t * >
THistSvc::getTrees
std::vector< std::string > getTrees() const override
Definition: THistSvc.cpp:698
THistSvc::GlobalDirectoryRestore::m_lock
std::lock_guard< THistSvcMutex_t > m_lock
Definition: THistSvc.h:218
THistSvc::copyFileLayout
void copyFileLayout(TDirectory *, TDirectory *)
helper function to recursively copy the layout of a TFile into a new TFile
Definition: THistSvc.cpp:1929
THistSvc::m_curstream
std::string m_curstream
Definition: THistSvc.h:401
THistSvc::getTEfficiencies
StatusCode getTEfficiencies(TDirectory *td, TList &, bool recurse=false) const override
Definition: THistSvc.cpp:1102
THistSvc::getTTrees
StatusCode getTTrees(TDirectory *td, TList &, bool recurse=false) const override
Definition: THistSvc.cpp:921
THistSvc::GlobalDirectoryRestore::GlobalDirectoryRestore
GlobalDirectoryRestore(THistSvcMutex_t &mut)
Definition: THistSvc.cpp:1453
std::vector< std::string >
THistSvc::writeObjectsToFile
StatusCode writeObjectsToFile()
Definition: THistSvc.cpp:1544
THistSvc::existsEfficiency
bool existsEfficiency(const std::string &name) const override
Check if TEfficiency with given name is managed by THistSvcMT.
Definition: THistSvc.cpp:680
THistSvc::getGraph
StatusCode getGraph(const std::string &name, TGraph *&) const override
Return TGraph with given name.
Definition: THistSvc.cpp:447
THistSvc::existsGraph
bool existsGraph(const std::string &name) const override
Check if graph with given name is managed by THistSvcMT.
Definition: THistSvc.cpp:684
THistSvc::initialize
StatusCode initialize() override
Definition: THistSvc.cpp:79
IFileMgr
Definition: IFileMgr.h:294
THistSvc::deReg
StatusCode deReg(const std::string &name) override
Deregister object with given name and give up ownership (without deletion!)
Definition: THistSvc.cpp:570
std::recursive_mutex
STL class.
std::lock_guard
STL class.
gaudiComponentHelp.root
root
Definition: gaudiComponentHelp.py:43
THistSvc::setupInputFile
void setupInputFile()
call-back method to handle input stream property
Definition: THistSvc.cpp:1885
THistSvc::m_hlist
hlist_t m_hlist
Definition: THistSvc.h:293
THistSvc::m_autoSave
Gaudi::Property< int > m_autoSave
Definition: THistSvc.h:374
IFileMgr.h
THistSvc::THistID::THistID
THistID(std::string &i, bool &t, TObject *o, TFile *f)
Definition: THistSvc.h:256
THistSvc::getTHists
StatusCode getTHists(TDirectory *td, TList &, bool recurse=false) const override
Definition: THistSvc.cpp:722
THistSvc::THistID::THistID
THistID(std::string &i, bool &t, TObject *o, TFile *f, Mode m)
Definition: THistSvc.h:257
THistSvc::getShared
StatusCode getShared(const std::string &name, LockedHandle< TH1 > &) const override
Retrieve shared object with given name as TH1 through LockedHandle.
Definition: THistSvc.cpp:525
THistSvc::m_inputfile
Gaudi::Property< std::vector< std::string > > m_inputfile
Definition: THistSvc.h:388
THistSvc::readHist
T * readHist(const std::string &name) const
Definition: THistSvc.cpp:1468
THistSvc::rootOpenAction
StatusCode rootOpenAction(FILEMGR_CALLBACK_ARGS)
Definition: THistSvc.cpp:2086
std::unordered_multimap< std::string, vhid_t * >
THistSvc::setupOutputFile
void setupOutputFile()
call-back method to handle output stream property
Definition: THistSvc.cpp:1909
THistSvc::m_print
Gaudi::Property< bool > m_print
Definition: THistSvc.h:376
THistSvc::objMap_t
std::unordered_map< TObject *, std::pair< vhid_t *, size_t > > objMap_t
Definition: THistSvc.h:291
THistSvc::stripDirectoryName
std::string stripDirectoryName(std::string &dir) const
Definition: THistSvc.cpp:1768
THistSvc::vhid_t
std::vector< THistID > vhid_t
Definition: THistSvc.h:284
THistSvc::getHists
std::vector< std::string > getHists() const override
Definition: THistSvc.cpp:690
THistSvc::GlobalDirectoryRestore::m_gFile
TFile * m_gFile
Definition: THistSvc.h:216
bug_34121.t
t
Definition: bug_34121.py:30
THistSvc::getShared_i
LockedHandle< T > getShared_i(const std::string &name) const
Definition: THistSvc.icc:319
THistSvc::ObjectType::TEFFICIENCY
@ TEFFICIENCY
THistSvc::rootOpenErrAction
StatusCode rootOpenErrAction(FILEMGR_CALLBACK_ARGS)
Definition: THistSvc.cpp:2108
Service::name
const std::string & name() const override
Retrieve name of the service
Definition: Service.cpp:332
StatusCode
Definition: StatusCode.h:65
THistSvc::parseString
void parseString(const std::string &id, std::string &root, std::string &rem) const
Definition: THistSvc.cpp:1871
THistSvc::m_Rstream
std::vector< std::string > m_Rstream
Definition: THistSvc.h:272
THistSvc::existsTree
bool existsTree(const std::string &name) const override
Check if tree with given name is managed by THistSvcMT.
Definition: THistSvc.cpp:688
THistSvc::SHARE
@ SHARE
Definition: THistSvc.h:222
THistSvc::handle
void handle(const Incident &) override
Definition: THistSvc.cpp:1305
THistSvc::finalize
StatusCode finalize() override
Definition: THistSvc.cpp:190
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:108
std::ostream
STL class.
THistSvc::m_maxFileSize
Gaudi::Property< int > m_maxFileSize
Definition: THistSvc.h:377
THistSvc::findStream
bool findStream(const std::string &name, std::string &root, std::string &rem, TFile *&file) const
Definition: THistSvc.cpp:1835
THistSvc::THistID::temp
bool temp
Definition: THistSvc.h:251
THistSvc::THistSvcMutex_t
std::recursive_mutex THistSvcMutex_t
Definition: THistSvc.h:205
THistSvc::Mode
Mode
Enumerating all possible file access modes.
Definition: THistSvc.h:222
THistSvc::m_tobjs
objMap_t m_tobjs
Definition: THistSvc.h:298
THistSvc::getHist
StatusCode getHist(const std::string &name, TH1 *&, size_t index=0) const override
Return histogram with given name as TH1*, THistSvcMT still owns object.
Definition: THistSvc.cpp:353
THistSvc::charToMode
static Mode charToMode(const char typ)
Convert a char to a Mode enum.
Definition: THistSvc.h:228
THistSvc::m_outputfile
Gaudi::Property< std::vector< std::string > > m_outputfile
Definition: THistSvc.h:386
THistSvc::THistID::file
TFile * file
Definition: THistSvc.h:247
THistSvc::regEfficiency
StatusCode regEfficiency(const std::string &name) override
Register a new TEfficiency with a given name.
Definition: THistSvc.cpp:456
THistSvc::changeDir
TDirectory * changeDir(const THistSvc::THistID &hid) const
Definition: THistSvc.cpp:1746
THistSvc::idMap_t
std::unordered_multimap< std::string, vhid_t * > idMap_t
Definition: THistSvc.h:290
THistSvc::ObjectType::TTREE
@ TTREE
THistSvc::m_Wstream
std::vector< std::string > m_Wstream
Definition: THistSvc.h:272
THistSvc.icc
THistSvc::APPEND
@ APPEND
Definition: THistSvc.h:222
THistSvc::m_ids
idMap_t m_ids
Definition: THistSvc.h:295
THistSvc::m_okToConnect
bool m_okToConnect
Definition: THistSvc.h:398
THistSvc::streamMap
std::multimap< std::string, std::string > streamMap
Definition: THistSvc.h:301
THistSvc::THistID::operator<<
friend std::ostream & operator<<(std::ostream &ost, const THistID &hid)
Definition: THistSvc.h:262
THistSvc::regHist
StatusCode regHist(const std::string &name) override
Register a new ROOT histogram TH*X with a name.
Definition: THistSvc.cpp:333
THistSvc::removeDoubleSlash
void removeDoubleSlash(std::string &) const
Definition: THistSvc.cpp:1784
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:203
THistSvc::THistID::obj
TObject * obj
Definition: THistSvc.h:246
std::map
STL class.
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:20
THistSvc::ObjectType
ObjectType
Possible TObject types.
Definition: THistSvc.h:225
THistSvc::THistID::mutex
histMut_t * mutex
Definition: THistSvc.h:248
THistSvc::GlobalDirectoryRestore
Helper class that manages ROOts global directory and file.
Definition: THistSvc.h:209
THistSvc::GlobalDirectoryRestore::~GlobalDirectoryRestore
~GlobalDirectoryRestore()
Definition: THistSvc.cpp:1459
THistSvc::READ
@ READ
Definition: THistSvc.h:222
THistSvc::getHist_i
T * getHist_i(const std::string &name, const size_t &ind=0, bool quiet=false) const
Definition: THistSvc.icc:189
THistSvc::m_compressionLevel
Gaudi::Property< int > m_compressionLevel
Definition: THistSvc.h:380
THistSvc::reinitialize
StatusCode reinitialize() override
Definition: THistSvc.cpp:184
THistSvc::getTree
StatusCode getTree(const std::string &name, TTree *&) const override
Return TTree with given name.
Definition: THistSvc.cpp:406
THistSvc::m_alreadyConnectedOutFiles
std::set< std::string > m_alreadyConnectedOutFiles
list of already connected files.
Definition: THistSvc.h:280
Service.h
ITHistSvc.h
THistSvc::regTree
StatusCode regTree(const std::string &name) override
Register a new TTree with a given name.
Definition: THistSvc.cpp:380
THistSvc::regHist_i
StatusCode regHist_i(std::unique_ptr< T > hist, const std::string &name, bool shared)
Definition: THistSvc.icc:27
THistSvc::WRITE
@ WRITE
Definition: THistSvc.h:222
THistSvc::m_files
std::map< std::string, std::pair< TFile *, Mode > > m_files
Definition: THistSvc.h:300
THistSvc::connect
StatusCode connect(const std::string &)
Definition: THistSvc.cpp:1569
THistSvc::p_fileMgr
IFileMgr * p_fileMgr
Definition: THistSvc.h:394
IIncidentListener.h
THistSvc::existsHist
bool existsHist(const std::string &name) const override
Check if histogram with given name is managed by THistSvcMT.
Definition: THistSvc.cpp:678
FILEMGR_CALLBACK_ARGS
#define FILEMGR_CALLBACK_ARGS
Definition: IFileMgr.h:287
THistSvc::THistID::operator<
bool operator<(THistID const &rhs) const
Definition: THistSvc.h:260
THistSvc::exists
bool exists(const std::string &name) const override
Check if object with given name is managed by THistSvcMT exists calls existsHist and only works for T...
Definition: THistSvc.cpp:676
THistSvc::THistID::mode
Mode mode
Definition: THistSvc.h:249
THistSvc::hlist_t
std::list< vhid_t * > hlist_t
Definition: THistSvc.h:286
THistSvc::m_hasTTrees
bool m_hasTTrees
Definition: THistSvc.h:399
THistSvc::readTree
TTree * readTree(const std::string &name) const
Definition: THistSvc.cpp:1472
THistSvc::ObjectType::TGRAPH
@ TGRAPH
THistSvc::THistID::THistID
THistID(const THistID &rhs)=default
std::multimap< std::string, std::string >
THistSvc::GlobalDirectoryRestore::m_gErrorIgnoreLevel
int m_gErrorIgnoreLevel
Definition: THistSvc.h:217
THistSvc::GlobalDirectoryRestore::m_gDirectory
TDirectory * m_gDirectory
Definition: THistSvc.h:215
THistSvc::ObjectType::UNKNOWN
@ UNKNOWN
std::mutex
STL class.
THistSvc::m_uids
uidMap_t m_uids
Definition: THistSvc.h:294
THistSvc::m_alreadyConnectedInFiles
std::set< std::string > m_alreadyConnectedInFiles
list of already connected files.
Definition: THistSvc.h:276
THistSvc::updateFiles
void updateFiles()
Handle case where TTree grows beyond TTree::fgMaxTreeSize.
Definition: THistSvc.cpp:1474
LockedHandle
Definition: LockedHandle.h:38
THistSvc::io_reinit
StatusCode io_reinit() override
callback method to reinitialize the internal state of the component for I/O purposes (e....
Definition: THistSvc.cpp:1350
THistSvc::m_svcMut
THistSvcMutex_t m_svcMut
Definition: THistSvc.h:403
THistSvc::findHistID
size_t findHistID(const std::string &id, const THistID *&hid, const size_t &index=0) const
Definition: THistSvc.cpp:1961
THistSvc::ObjectType::TH1
@ TH1
IIncidentSvc
Definition: IIncidentSvc.h:33
THistSvc::m_fileStreams
streamMap m_fileStreams
Definition: THistSvc.h:302
Incident
Definition: Incident.h:27
std::unique_ptr
STL class.
THistSvc::THistID::type
ObjectType type
Definition: THistSvc.h:250
std::unordered_map< std::string, vhid_t * >
THistSvc::THistID::shared
bool shared
Definition: THistSvc.h:252
THistSvc::regGraph
StatusCode regGraph(const std::string &name) override
Register a new TGraph with a given name.
Definition: THistSvc.cpp:415
std::set< std::string >
THistSvc::getGraphs
std::vector< std::string > getGraphs() const override
Definition: THistSvc.cpp:706
THistSvc::THistID
Helper struct that bundles the histogram ID with a mutex, TFile and TObject*.
Definition: THistSvc.h:244
Gaudi::Property< int >
THistSvc::uidMap_t
std::unordered_map< std::string, vhid_t * > uidMap_t
Definition: THistSvc.h:288
THistSvc::THistID::THistID
THistID()=default
THistSvc::m_sharedFiles
std::map< std::string, std::string > m_sharedFiles
Definition: THistSvc.h:305
MsgStream.h
THistSvc::dump
void dump() const
Definition: THistSvc.cpp:2006
THistSvc::MergeRootFile
void MergeRootFile(TDirectory *, TDirectory *)
Definition: THistSvc.cpp:1788