Gaudi Framework, version v24r2

Home   Generated: Wed Dec 4 2013
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
IoComponentMgr.h
Go to the documentation of this file.
1 
2 // IoComponentMgr.h
3 // Header file for class IoComponentMgr
4 // Author: S.Binet<binet@cern.ch>
6 #ifndef GAUDIMP_IOCOMPONENTMGR_H
7 #define GAUDIMP_IOCOMPONENTMGR_H 1
8 
9 // Python includes
10 #include <Python.h>
11 
12 // STL includes
13 #include <string>
14 #include <map>
15 #include <list>
16 
17 // FrameWork includes
18 #include "GaudiKernel/Service.h"
19 
20 // GaudiKernel
24 
25 // Forward declaration
26 class ISvcLocator;
27 template <class TYPE> class SvcFactory;
28 
29 
30 class IoComponentMgr: public extends2<Service, IIoComponentMgr,
31  IIncidentListener> {
32 
33  friend class SvcFactory<IoComponentMgr>;
34 
36  // Public methods:
38  public:
39 
40  // Copy constructor:
41 
43  IoComponentMgr( const std::string& name, ISvcLocator* pSvcLocator );
44 
46  virtual ~IoComponentMgr();
47 
48  // Assignment operator:
49  //IoComponentMgr &operator=(const IoComponentMgr &alg);
50 
52 
53  virtual StatusCode initialize();
54  virtual StatusCode finalize();
55 
57 
58  void handle(const Incident&);
59 
61  // Const methods:
63 
66  virtual
67  bool io_hasitem (IIoComponent* iocomponent) const;
68 
72  virtual
73  bool io_contains (IIoComponent* iocomponent,
74  const std::string& fname) const;
75 
77  // Non-const methods:
79 
86  virtual
87  StatusCode io_register (IIoComponent* iocomponent);
88 
95  virtual
96  StatusCode io_register (IIoComponent* iocomponent,
98  const std::string& fname,
99  const std::string& pfn);
100 
104  virtual
105  StatusCode io_update (IIoComponent* iocomponent,
106  const std::string& old_fname,
107  const std::string& new_fname);
108 
112  virtual
113  StatusCode io_update (IIoComponent* iocomponent,
114  const std::string& work_dir);
115 
116  // VT. new method
119  virtual
120  StatusCode io_update_all (const std::string& work_dir);
121 
125  virtual
126  StatusCode io_retrieve (IIoComponent* iocomponent,
127  std::string& fname);
128 
133  virtual
135 
140  virtual
142 
144  // Private data:
146  private:
147 
150  std::string m_oldabspath; // VT. store absolute path
153 
154  IoComponentEntry():m_oldfname(""),m_oldabspath(""),m_newfname(""), // VT. changes
155  m_iomode(IIoComponentMgr::IoMode::INVALID) {}
156  IoComponentEntry(const std::string& f, const std::string& p, // VT. changes
158  : m_oldfname(f), m_oldabspath(p),m_newfname(""), m_iomode(t){} // VT. changes
160  m_oldabspath(rhs.m_oldabspath), // VT. changes
161  m_newfname(rhs.m_newfname),
162  m_iomode(rhs.m_iomode){}
163  bool operator < (IoComponentEntry const &rhs) const {
164  if (m_oldfname == rhs.m_oldfname) {
165  return (m_iomode < rhs.m_iomode);
166  } else {
167  return (m_oldfname < rhs.m_oldfname);
168  }
169  }
170 
172  os << "old: \"" << c.m_oldfname
173  << "\" absolute path: \"" << c.m_oldabspath
174  << "\" new: \"" << c.m_newfname
175  << "\" m: " << ( (c.m_iomode == IIoComponentMgr::IoMode::READ) ?
176  "R" : "W" );
177  return os;
178  }
179 
180  };
181 
182 
183 
185  IoComponentMgr();
186 
187  mutable MsgStream m_log;
188 
192 
196 
197 
198  // This is the registry
201 
203 
206 
207  bool findComp(IIoComponent*, const std::string&, iodITR& ) const;
209  bool findComp(const std::string&, std::pair<iodITR,iodITR>& ) const;
210 
211  std::string list() const;
212 
213 
214 };
215 
216 
217 #endif //> !GAUDIMP_IOCOMPONENTMGR_H

Generated at Wed Dec 4 2013 14:33:10 for Gaudi Framework, version v24r2 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004