1 #ifndef GAUDISVC_THISTSVC_H
2 #define GAUDISVC_THISTSVC_H
55 virtual std::vector<std::string>
getHists()
const;
56 virtual std::vector<std::string>
getTrees()
const;
57 virtual std::vector<std::string>
getGraphs()
const;
60 bool recurse=
false)
const;
62 bool recurse=
false)
const;
65 bool recurse=
false,
bool reg=
false);
67 bool recurse=
false,
bool reg=
false);
70 bool recurse=
false)
const;
72 bool recurse=
false)
const;
75 bool recurse=
false,
bool reg=
false);
77 bool recurse=
false,
bool reg=
false);
79 virtual bool exists(
const std::string& name)
const;
124 THistID(std::string&
i,
bool& t, TObject* o, TFile* f)
132 return (obj < rhs.
obj);
137 template <
typename T>
139 template <
typename T>
141 template <
typename T>
154 std::string
dirname(std::string& dir)
const;
160 std::string& rem, TFile*&
file)
const;
161 void parseString(
const std::string&
id, std::string&
root, std::string& rem)
194 typedef std::map<std::string, THistID>
uidMap;
195 typedef std::multimap<std::string, THistID>
idMap;
196 typedef std::map<TObject*, THistID>
objMap;
197 typedef std::multimap<std::string, std::string>
streamMap;
203 std::map<std::string, std::pair<TFile*,Mode> >
m_files;
221 #ifndef GAUDISVC_THISTSVC_ICC
Definition of the MsgStream class used to transmit messages.
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...
THistID(const THistID &rhs)
virtual StatusCode deReg(TObject *obj)
void handle(const Incident &)
Inform that a new incident has occurred.
IntegerProperty m_autoFlush
IntegerProperty m_autoSave
virtual StatusCode getGraph(const std::string &name, TGraph *&) const
bool findStream(const std::string &name, std::string &root, std::string &rem, TFile *&file) const
bool browseTDir(TDirectory *dir) const
void setupCompressionLevel(Property &cmp)
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
std::multimap< std::string, THistID > idMap
Base class used to extend a class implementing other interfaces.
virtual StatusCode regTree(const std::string &name)
std::vector< std::string > m_Wstream
#define FILEMGR_CALLBACK_ARGS
StringArrayProperty m_inputfile
StringArrayProperty m_outputfile
virtual StatusCode regHist(const std::string &name)
virtual StatusCode reinitialize()
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
void setupOutputFile(Property &outputfile)
call-back method to handle output stream property
std::string dirname(std::string &dir) const
virtual StatusCode getTree(const std::string &name, TTree *&) const
StatusCode readTree(const std::string &name, TTree *&) const
virtual std::vector< std::string > getHists() const
std::vector< std::string > m_Rstream
This class is used for returning status codes from appropriate routines.
std::map< std::string, std::pair< TFile *, Mode > > m_files
IntegerProperty m_maxFileSize
std::multimap< std::string, std::string > streamMap
virtual std::vector< std::string > getTrees() const
virtual StatusCode getTHists(TDirectory *td, TList &, bool recurse=false) const
virtual StatusCode regGraph(const std::string &name)
~GlobalDirectoryRestore()
StatusCode rootOpenErrAction(FILEMGR_CALLBACK_ARGS)
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
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
THistID(std::string &i, bool &t, TObject *o, TFile *f)
IntegerProperty m_compressionLevel
virtual const std::string & name() const
Retrieve name of the service.
bool operator<(THistID const &rhs) const
virtual StatusCode io_reinit()
callback method to reinitialize the internal state of the component for I/O purposes (e...
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).
std::map< std::string, std::string > m_sharedFiles
Property base class allowing Property* collections to be "homogeneous".
virtual StatusCode getHist(const std::string &name, TH1 *&) const
StatusCode regHist_i(T *hist, const std::string &name)
StatusCode readHist_i(const std::string &name, T *&hist) const
Base class for all Incidents (computing events).
std::map< TObject *, THistID > objMap
StatusCode connect(const std::string &)
StatusCode readHist(const std::string &name, TH1 *&) const
virtual bool exists(const std::string &name) const
std::set< std::string > m_alreadyConnectedOutFiles
list of already connected files.
virtual std::vector< std::string > getGraphs() const
std::map< std::string, THistID > uidMap
std::set< std::string > m_alreadyConnectedInFiles
list of already connected files.
THistSvc(const std::string &name, ISvcLocator *svc)
void setupInputFile(Property &inputfile)
call-back method to handle input stream property
virtual StatusCode getTTrees(TDirectory *td, TList &, bool recurse=false) const
The interface implemented by the IncidentSvc service.
void MergeRootFile(TDirectory *target, TDirectory *source)
void removeDoubleSlash(std::string &) const