1 #ifndef GAUDISVC_THISTSVC_H 2 #define GAUDISVC_THISTSVC_H 25 class THistSvc :
public extends<Service, ITHistSvc, IIncidentListener, IIoComponent>
60 StatusCode getTHists( TDirectory* td, TList& tl,
bool recurse =
false,
bool reg =
false )
override;
66 StatusCode getTTrees( TDirectory* td, TList& tl,
bool recurse =
false,
bool reg =
false )
override;
103 THistID() : id(
"" ), temp( true ), obj( 0 ), file( 0 ), mode( INVALID ) {}
104 THistID(
const THistID& rhs ) : id( rhs.id ), temp( rhs.temp ), obj( rhs.obj ), file( rhs.file ), mode( rhs.mode )
107 THistID(
std::string& i,
bool& t, TObject* o, TFile* f ) : id( i ), temp( t ), obj( o ), file( f ), mode( INVALID )
111 : id( i ), temp( t ), obj( o ), file( f ), mode( m )
118 template <
typename T>
120 template <
typename T>
122 template <
typename T>
152 void MergeRootFile( TDirectory* target, TDirectory* source );
158 "maximum file size in MB. if exceeded, will cause an abort. -1 to never check."};
199 #ifndef GAUDISVC_THISTSVC_ICC
StatusCode getGraph(const std::string &name, TGraph *&) const override
StatusCode initialize() override
THistID(std::string &i, bool &t, TObject *o, TFile *f, Mode m)
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
const std::string & name() const override
Retrieve name of the service.
THistID(const THistID &rhs)
Implementation of property with value of concrete type.
std::vector< std::string > getGraphs() const override
bool exists(const std::string &name) const override
bool findStream(const std::string &name, std::string &root, std::string &rem, TFile *&file) const
StatusCode getTHists(TDirectory *td, TList &, bool recurse=false) const override
bool browseTDir(TDirectory *dir) const
StatusCode rootOpenAction(FILEMGR_CALLBACK_ARGS)
void copyFileLayout(TDirectory *, TDirectory *)
helper function to recursively copy the layout of a TFile into a new TFile
TDirectory * changeDir(const THistSvc::THistID &hid) const
void setupCompressionLevel(Gaudi::Details::PropertyBase &cmp)
Gaudi::Property< std::vector< std::string > > m_outputfile
std::multimap< std::string, THistID > idMap
std::vector< std::string > getHists() const override
std::vector< std::string > m_Wstream
#define FILEMGR_CALLBACK_ARGS
Gaudi::Property< int > m_autoSave
~THistSvc() override=default
Gaudi::Property< std::vector< std::string > > m_inputfile
std::string dirname(std::string &dir) const
StatusCode readTree(const std::string &name, TTree *&) const
std::vector< std::string > m_Rstream
This class is used for returning status codes from appropriate routines.
Gaudi::Property< bool > m_print
void handle(const Incident &) override
Gaudi::Property< int > m_maxFileSize
std::multimap< std::string, std::string > streamMap
StatusCode getTree(const std::string &name, TTree *&) const override
~GlobalDirectoryRestore()
StatusCode rootOpenErrAction(FILEMGR_CALLBACK_ARGS)
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Gaudi::Property< int > m_compressionLevel
void parseString(const std::string &id, std::string &root, std::string &rem) const
StatusCode getHist_i(const std::string &name, T *&hist, bool quiet=false) const
THistID(std::string &i, bool &t, TObject *o, TFile *f)
StatusCode finalize() override
bool operator<(THistID const &rhs) const
StatusCode regHist(const std::string &name) override
StatusCode getTTrees(TDirectory *td, TList &, bool recurse=false) const override
StatusCode reinitialize() override
StatusCode regHist_i(T *hist, const std::string &name)
Base class used to extend a class implementing other interfaces.
StatusCode readHist_i(const std::string &name, T *&hist) const
Base class for all Incidents (computing events).
std::map< TObject *, THistID > objMap
std::map< std::string, std::pair< TFile *, Mode > > m_files
StatusCode connect(const std::string &)
StatusCode readHist(const std::string &name, TH1 *&) const
std::set< std::string > m_alreadyConnectedOutFiles
list of already connected files.
StatusCode deReg(TObject *obj) override
StatusCode regTree(const std::string &name) override
StatusCode getHist(const std::string &name, TH1 *&) const override
std::map< std::string, std::string > m_sharedFiles
std::vector< std::string > getTrees() const override
std::map< std::string, THistID > uidMap
std::set< std::string > m_alreadyConnectedInFiles
list of already connected files.
void setupInputFile(Gaudi::Details::PropertyBase &inputfile)
call-back method to handle input stream property
void setupOutputFile(Gaudi::Details::PropertyBase &outputfile)
call-back method to handle output stream property
StatusCode regGraph(const std::string &name) override
Gaudi::Property< int > m_autoFlush
THistSvc(const std::string &name, ISvcLocator *svc)
StatusCode io_reinit() override
callback method to reinitialize the internal state of the component for I/O purposes (e...
The interface implemented by the IncidentSvc service.
void MergeRootFile(TDirectory *target, TDirectory *source)
void removeDoubleSlash(std::string &) const