Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JROOT::JManager< JKey_t, JValue_t > Class Template Reference

Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys. More...

#include <JManager.hh>

Inheritance diagram for JROOT::JManager< JKey_t, JValue_t >:
JLANG::JPointer< JClass_t > std::map< JKey_t, JPointer< JValue_t > > JLANG::JAbstractPointer< JClass_t > JLANG::JEquals< JAbstractPointer< JClass_t > >

Public Types

typedef JPointer< JValue_t > ptr_type
 
typedef std::map< JKey_t, ptr_typemap_type
 

Public Member Functions

 JManager ()
 Default constructor.
 
 JManager (JValue_t *master, char wildcard='%', JFormat_t format=JFormat_t())
 Constructor.
 
 JManager (JValue_t *master, const std::string &name, char wildcard='%', std::ios::fmtflags format=std::ios::fmtflags())
 Constructor.
 
 JManager (const JManager &manager)
 Copy constructor.
 
void clear ()
 Clear client objects.
 
JValue_t * operator[] (JKey_t key)
 Get pointer to object for given key.
 
void Read (TDirectory &in)
 Read objects from file.
 
void Write (TDirectory &out, const bool wm=false)
 Write objects to file.
 
void Write (const char *file_name, const bool wm=false)
 Write objects to file.
 
virtual JClass_t * get () const override
 Get pointer.
 
virtual void set (JClass_t *p) override
 Set pointer.
 
template<class T >
void set (const JPointer< T > &pointer)
 Set pointer.
 
virtual void reset () override
 Reset pointer.
 
template<class T >
void reset (const JPointer< T > &pointer)
 Reset pointer.
 
void reset (JClass_t *p)
 Reset pointer.
 
JClass_t *const & getReference () const
 Get rereference to internal pointer.
 
JClass_t *& getReference ()
 Get rereference to internal pointer.
 
virtual bool equals (const JAbstractPointer &object) const
 Equals.
 
bool is_valid () const
 Check validity of pointer.
 
JClass_t * operator-> () const
 Smart pointer operator.
 
 operator JClass_t * () const
 Type conversion operator.
 

Static Public Member Functions

static JManager Read (TDirectory &in, const char *const master, const char wildcard)
 Read objects from file into manager.
 

Public Attributes

char wc
 
JFormat_t fmt
 

Protected Attributes

JClass_t * __p
 pointer to object
 

Static Private Member Functions

static void detach (...)
 Fall back for detaching object pointed to from ROOT I/O.
 
static void detach (TH1 *p)
 Implementation for detaching of object pointed to from ROOT I/O.
 

Friends

TFile & operator>> (TFile &file, JManager &object)
 Read manager from file.
 
TFile & operator<< (TFile &file, JManager &object)
 Write manager to file.
 

Detailed Description

template<class JKey_t, class JValue_t>
class JROOT::JManager< JKey_t, JValue_t >

Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys.


For each use of the map operator [], it is checked whether the corresponding client object exists.
If the corresponding client object does not yet exists, a clone is made of the master object (i.e. the 'client').
The name of the newly created object is derived from the name of the master object by replacing the wild card character with the value of the key according the optional format specifier.

Definition at line 44 of file JManager.hh.

Member Typedef Documentation

◆ ptr_type

template<class JKey_t , class JValue_t >
JPointer<JValue_t> JROOT::JManager< JKey_t, JValue_t >::ptr_type

Definition at line 50 of file JManager.hh.

◆ map_type

template<class JKey_t , class JValue_t >
std::map<JKey_t, ptr_type> JROOT::JManager< JKey_t, JValue_t >::map_type

Definition at line 51 of file JManager.hh.

Constructor & Destructor Documentation

◆ JManager() [1/4]

template<class JKey_t , class JValue_t >
JROOT::JManager< JKey_t, JValue_t >::JManager ( )
inline

Default constructor.

Definition at line 56 of file JManager.hh.

57 {}

◆ JManager() [2/4]

template<class JKey_t , class JValue_t >
JROOT::JManager< JKey_t, JValue_t >::JManager ( JValue_t * master,
char wildcard = '%',
JFormat_t format = JFormat_t() )
inline

Constructor.

Note that the manager owns the master object pointed to.
For saving the objects to file, use method JManager::Write (all objects are detached from the current ROOT directory).

Parameters
mastermaster object
wildcardwild card character
formatformat specifier for replacement of wildcard character by value of key

Definition at line 71 of file JManager.hh.

73 :
74 ptr_type(master),
75 map_type(),
76 wc (wildcard),
77 fmt(format)
78 {
79 using namespace std;
80 using namespace JPP;
81
82 if (!this->is_valid()) {
83 THROW(JException, "No valid master");
84 }
85
86 if (string(this->get()->GetName()).find(wc) == string::npos) {
87 THROW(JException, "Invalid wildcard <" << this->get()->GetName() << "> '" << wc << "'");
88 }
89
90 detach(this->get());
91
92 resetObject(this->get(), true);
93 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
bool is_valid() const
Check validity of pointer.
General exception.
Definition JException.hh:24
virtual JClass_t * get() const override
Get pointer.
Definition JPointer.hh:64
JPointer< JValue_t > ptr_type
Definition JManager.hh:50
std::map< JKey_t, ptr_type > map_type
Definition JManager.hh:51
JFormat_t fmt
Definition JManager.hh:363
static void detach(...)
Fall back for detaching object pointed to from ROOT I/O.
Definition JManager.hh:369
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
void resetObject(JManager< JKey_t, JValue_t > *object, const bool reset=false)
Reset JManager object.
Definition JManager.hh:394

◆ JManager() [3/4]

template<class JKey_t , class JValue_t >
JROOT::JManager< JKey_t, JValue_t >::JManager ( JValue_t * master,
const std::string & name,
char wildcard = '%',
std::ios::fmtflags format = std::ios::fmtflags() )
inline

Constructor.

Note that the manager owns the master object pointed to.
For saving the objects to file, use method JManager::Write (all objects are detached from the current ROOT directory).

Parameters
mastermaster object
namename of master
wildcardwild card character
formatformat specifier for replacement of wildcard character by value of key

Definition at line 108 of file JManager.hh.

111 :
112 ptr_type(master),
113 map_type(),
114 wc (wildcard),
115 fmt(format)
116 {
117 using namespace std;
118 using namespace JPP;
119
120 if (!this->is_valid()) {
121 THROW(JException, "No valid master");
122 }
123
124 this->get()->SetName(name.c_str());
125
126 if (string(this->get()->GetName()).find(wc) == string::npos) {
127 THROW(JException, "Invalid wildcard <" << this->get()->GetName() << "> '" << wc << "'");
128 }
129
130 detach(this->get());
131
132 resetObject(this->get(), true);
133 }

◆ JManager() [4/4]

template<class JKey_t , class JValue_t >
JROOT::JManager< JKey_t, JValue_t >::JManager ( const JManager< JKey_t, JValue_t > & manager)
inline

Copy constructor.

Note that the master object of the given manager is cloned and the wildcard copied.
The client objects are not copied.

Parameters
managermanager

Definition at line 144 of file JManager.hh.

144 :
145 ptr_type(NULL),
146 map_type(),
147 wc (manager.wc),
148 fmt(manager.fmt)
149 {
150 using namespace JPP;
151
152 if (manager.is_valid()) {
153
154 this->set((JValue_t*) manager.get()->Clone());
155
156 detach(this->get());
157
158 resetObject(this->get(), true);
159 }
160 }
virtual void set(JClass_t *p) override
Set pointer.
Definition JPointer.hh:75

Member Function Documentation

◆ clear()

template<class JKey_t , class JValue_t >
void JROOT::JManager< JKey_t, JValue_t >::clear ( )
inline

Clear client objects.

Definition at line 166 of file JManager.hh.

167 {
168 for (typename map_type::iterator i = this->begin(); i != this->end(); ++i) {
169 i->second.reset();
170 }
171
172 this->clear();
173 }
void clear()
Clear client objects.
Definition JManager.hh:166

◆ operator[]()

template<class JKey_t , class JValue_t >
JValue_t * JROOT::JManager< JKey_t, JValue_t >::operator[] ( JKey_t key)
inline

Get pointer to object for given key.

Parameters
keykey
Returns
pointer to client object

Definition at line 182 of file JManager.hh.

183 {
184 using namespace std;
185 using namespace JPP;
186
187 typename map_type::iterator i = this->find(key);
188
189 if (i == this->end()) {
190
191 string buffer = this->get()->GetName();
192 string::size_type ipos = buffer.find(wc);
193
194 ostringstream os;
195
196 fmt.put(os);
197
198 os << key;
199
200 buffer.replace(ipos, 1, os.str());
201
202 JValue_t* p = (JValue_t*) this->get()->Clone(buffer.c_str());
203
204 detach(p);
205
206 resetObject(p, true);
207
208 this->insert(make_pair(key,p));
209
210 return p;
211
212 } else {
213
214 return i->second;
215 }
216 }
void put(std::ostream &out) const
Put format specificaton to given output stream.
Definition JManip.hh:599

◆ Read() [1/2]

template<class JKey_t , class JValue_t >
static JManager JROOT::JManager< JKey_t, JValue_t >::Read ( TDirectory & in,
const char *const master,
const char wildcard )
inlinestatic

Read objects from file into manager.

Parameters
ininput file or directory
mastermaster name
wildcardwild card character
Returns
manager

Definition at line 227 of file JManager.hh.

228 {
229 using namespace std;
230 using namespace JPP;
231
232 JManager manager;
233
234 TString buffer = master;
235
236 const Ssiz_t pos = buffer.Index(wildcard);
237
238 const TString a = buffer(0, pos);
239 const TString b = buffer(pos+1, buffer.Length());
240
241 buffer.ReplaceAll("[", "\\[");
242 buffer.ReplaceAll("]", "\\]");
243
244 buffer.ReplaceAll(wildcard, ".*");
245
246 const TRegexp regexp(buffer);
247
248 TIter iter(in.GetListOfKeys());
249
250 for (TKey* key; (key = (TKey*) iter.Next()) != NULL; ) {
251
252 const TString tag(key->GetName());
253
254 // option match
255
256 if (tag.Index(regexp) != -1) {
257
258 JValue_t* p = dynamic_cast<JValue_t*>(key->ReadObj());
259
260 if (p != NULL) {
261
262 detach(p);
263
264 string buffer = p->GetName();
265
266 if (a.Length() != 0) { buffer.replace(buffer.find(a), a.Length(), ""); }
267 if (b.Length() != 0) { buffer.replace(buffer.find(b), b.Length(), ""); }
268
269 JKey_t key;
270
271 istringstream(buffer) >> key;
272
273 manager.insert(make_pair(key, p));
274 }
275 }
276 }
277
278 return manager;
279 }
const double a

◆ Read() [2/2]

template<class JKey_t , class JValue_t >
void JROOT::JManager< JKey_t, JValue_t >::Read ( TDirectory & in)
inline

Read objects from file.

Parameters
ininput file or directory

Definition at line 287 of file JManager.hh.

288 {
289 if (this->is_valid()) {
290
291 JManager buffer = Read(in, this->get()->GetName(), this->wc);
292
293 this->swap(buffer);
294 }
295 }
static JManager Read(TDirectory &in, const char *const master, const char wildcard)
Read objects from file into manager.
Definition JManager.hh:227

◆ Write() [1/2]

template<class JKey_t , class JValue_t >
void JROOT::JManager< JKey_t, JValue_t >::Write ( TDirectory & out,
const bool wm = false )
inline

Write objects to file.

Parameters
outoutput file or directory
wmwrite master

Definition at line 304 of file JManager.hh.

305 {
306 for (typename map_type::iterator i = this->begin(); i != this->end(); ++i) {
307 out.WriteTObject(i->second);
308 }
309
310 if (wm) {
311 out.WriteTObject(this->get());
312 }
313 }

◆ Write() [2/2]

template<class JKey_t , class JValue_t >
void JROOT::JManager< JKey_t, JValue_t >::Write ( const char * file_name,
const bool wm = false )
inline

Write objects to file.

Parameters
file_namefile name
wmwrite master

Definition at line 322 of file JManager.hh.

323 {
324 TFile out(file_name, "RECREATE");
325
326 this->Write(out, wm) ;
327
328 out.Write();
329 out.Close();
330 }
void Write(TDirectory &out, const bool wm=false)
Write objects to file.
Definition JManager.hh:304

◆ detach() [1/2]

template<class JKey_t , class JValue_t >
static void JROOT::JManager< JKey_t, JValue_t >::detach ( ...)
inlinestaticprivate

Fall back for detaching object pointed to from ROOT I/O.

Definition at line 369 of file JManager.hh.

370 {}

◆ detach() [2/2]

template<class JKey_t , class JValue_t >
static void JROOT::JManager< JKey_t, JValue_t >::detach ( TH1 * p)
inlinestaticprivate

Implementation for detaching of object pointed to from ROOT I/O.

Parameters
ppointer to object

Definition at line 378 of file JManager.hh.

379 {
380 if (p != NULL) {
381 p->SetDirectory(0);
382 }
383 }

◆ get()

template<class JClass_t >
virtual JClass_t * JLANG::JPointer< JClass_t >::get ( ) const
inlineoverridevirtualinherited

◆ set() [1/2]

template<class JClass_t >
virtual void JLANG::JPointer< JClass_t >::set ( JClass_t * p)
inlineoverridevirtualinherited

Set pointer.

Parameters
ppointer to object

Implements JLANG::JAbstractPointer< JClass_t >.

Reimplemented in JLANG::JSharedPointer< JClass_t, JMemory_t >, JLANG::JSharedPointer< JAbstractAutoPointer< JBase_t > >, JLANG::JSharedPointer< JAccessibleObjectIterator< Evt > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JDAQSummaryslice > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JHead_t > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JTail_t > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JTypeList< JDAQEvent, JNullType > > >, JLANG::JSharedPointer< JAccessibleObjectIterator< KM3NETDAQ::JDAQEvent > >, JLANG::JSharedPointer< JAccessibleObjectIterator< T > >, JLANG::JSharedPointer< JAccessibleObjectOutput< T > >, JLANG::JSharedPointer< JBase_t >, JLANG::JSharedPointer< JFIT::JMEstimator >, JLANG::JSharedPointer< JLOGGER::JLogger >, JLANG::JSharedPointer< JNET::JControlHost >, JLANG::JSharedPointer< JObjectIterator< T > >, JLANG::JSharedPointer< JObjectOutput< JHead_t > >, JLANG::JSharedPointer< JObjectOutput< JTail_t > >, JLANG::JSharedPointer< JObjectOutput< T > >, JLANG::JSharedPointer< JParserElementInterface >, JLANG::JSharedPointer< JPropertiesElementInterface >, JLANG::JSharedPointer< JRadiation >, JLANG::JSharedPointer< JRewindableObjectIterator< const event_type > >, JLANG::JSharedPointer< JRewindableObjectIterator< JHead_t > >, JLANG::JSharedPointer< JRewindableObjectIterator< JTail_t > >, JLANG::JSharedPointer< JRewindableObjectIterator< T > >, JLANG::JSharedPointer< JTOOLS::JMultiMapTransformer >, JLANG::JSharedPointer< JTRIGGER::JDAQHitSelector >, JLANG::JSharedPointer< JTRIGGER::JMatch >, and JLANG::JSharedPointer< match_type >.

Definition at line 75 of file JPointer.hh.

76 {
77 this->__p = p;
78 }

◆ set() [2/2]

template<class JClass_t >
template<class T >
void JLANG::JPointer< JClass_t >::set ( const JPointer< T > & pointer)
inlineinherited

Set pointer.

Parameters
pointerpointer to object

Definition at line 96 of file JPointer.hh.

97 {
98 this->set(pointer.get());
99 }

◆ reset() [1/3]

template<class JClass_t >
virtual void JLANG::JPointer< JClass_t >::reset ( )
inlineoverridevirtualinherited

Reset pointer.

Implements JLANG::JAbstractPointer< JClass_t >.

Reimplemented in JLANG::JSharedPointer< JClass_t, JMemory_t >, JLANG::JSharedPointer< JAbstractAutoPointer< JBase_t > >, JLANG::JSharedPointer< JAccessibleObjectIterator< Evt > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JDAQSummaryslice > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JHead_t > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JTail_t > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JTypeList< JDAQEvent, JNullType > > >, JLANG::JSharedPointer< JAccessibleObjectIterator< KM3NETDAQ::JDAQEvent > >, JLANG::JSharedPointer< JAccessibleObjectIterator< T > >, JLANG::JSharedPointer< JAccessibleObjectOutput< T > >, JLANG::JSharedPointer< JBase_t >, JLANG::JSharedPointer< JFIT::JMEstimator >, JLANG::JSharedPointer< JLOGGER::JLogger >, JLANG::JSharedPointer< JNET::JControlHost >, JLANG::JSharedPointer< JObjectIterator< T > >, JLANG::JSharedPointer< JObjectOutput< JHead_t > >, JLANG::JSharedPointer< JObjectOutput< JTail_t > >, JLANG::JSharedPointer< JObjectOutput< T > >, JLANG::JSharedPointer< JParserElementInterface >, JLANG::JSharedPointer< JPropertiesElementInterface >, JLANG::JSharedPointer< JRadiation >, JLANG::JSharedPointer< JRewindableObjectIterator< const event_type > >, JLANG::JSharedPointer< JRewindableObjectIterator< JHead_t > >, JLANG::JSharedPointer< JRewindableObjectIterator< JTail_t > >, JLANG::JSharedPointer< JRewindableObjectIterator< T > >, JLANG::JSharedPointer< JTOOLS::JMultiMapTransformer >, JLANG::JSharedPointer< JTRIGGER::JDAQHitSelector >, JLANG::JSharedPointer< JTRIGGER::JMatch >, JLANG::JSharedPointer< match_type >, JLANG::JStorage< JClass_t, JMemory_t >, JLANG::JStorage< JAbstractAutoPointer< JBase_t >, JNew >, JLANG::JStorage< JAccessibleObjectIterator< Evt >, JNew >, JLANG::JStorage< JAccessibleObjectIterator< JDAQSummaryslice >, JNew >, JLANG::JStorage< JAccessibleObjectIterator< JHead_t >, JNew >, JLANG::JStorage< JAccessibleObjectIterator< JTail_t >, JNew >, JLANG::JStorage< JAccessibleObjectIterator< JTypeList< JDAQEvent, JNullType > >, JNew >, JLANG::JStorage< JAccessibleObjectIterator< KM3NETDAQ::JDAQEvent >, JNew >, JLANG::JStorage< JAccessibleObjectIterator< T >, JNew >, JLANG::JStorage< JAccessibleObjectOutput< T >, JNew >, JLANG::JStorage< JBase_t, JNew >, JLANG::JStorage< JClass_t, JNew >, JLANG::JStorage< JDETECTOR::JCLBDefaultSimulatorInterface::JStateMachine, JNew >, JLANG::JStorage< JDETECTOR::JCLBDefaultSimulatorInterface::JTDC, JNew >, JLANG::JStorage< JDETECTOR::JCLBSimulator, JNew >, JLANG::JStorage< JDETECTOR::JK40Simulator, JNew >, JLANG::JStorage< JDETECTOR::JModuleRouter, JNew >, JLANG::JStorage< JDETECTOR::JPMTSimulator, JNew >, JLANG::JStorage< JFIT::JMEstimator, JNew >, JLANG::JStorage< JIO::JReader, JNew >, JLANG::JStorage< JIO::JWriter, JNew >, JLANG::JStorage< JLANG::JMultiPipe< T, N >, JNew >, JLANG::JStorage< JLOGGER::JLogger, JNew >, JLANG::JStorage< JNET::JControlHost, JNew >, JLANG::JStorage< JNET::JControlHostObjectOutput, JNew >, JLANG::JStorage< JNET::JServerSocket, JNew >, JLANG::JStorage< JObjectIterator< T >, JNew >, JLANG::JStorage< JObjectOutput< JHead_t >, JNew >, JLANG::JStorage< JObjectOutput< JTail_t >, JNew >, JLANG::JStorage< JObjectOutput< T >, JNew >, JLANG::JStorage< JParserElementInterface, JNew >, JLANG::JStorage< JPropertiesElementInterface, JNew >, JLANG::JStorage< JRadiation, JNew >, JLANG::JStorage< JRewindableObjectIterator< const event_type >, JNew >, JLANG::JStorage< JRewindableObjectIterator< JHead_t >, JNew >, JLANG::JStorage< JRewindableObjectIterator< JTail_t >, JNew >, JLANG::JStorage< JRewindableObjectIterator< T >, JNew >, JLANG::JStorage< JTOOLS::JFunction1D, JNew >, JLANG::JStorage< JTOOLS::JMultiMapTransformer, JNew >, JLANG::JStorage< JTRIGGER::JBuildL1, JNew >, JLANG::JStorage< JTRIGGER::JBuildL2, JNew >, JLANG::JStorage< JTRIGGER::JDAQHitSelector, JNew >, JLANG::JStorage< JTRIGGER::JMatch, JNew >, JLANG::JStorage< JTRIGGER::JTimesliceRouter, JNew >, JLANG::JStorage< JTRIGGER::JTrigger3DMuon, JNew >, JLANG::JStorage< JTRIGGER::JTrigger3DShower, JNew >, JLANG::JStorage< JTRIGGER::JTriggerMXShower, JNew >, JLANG::JStorage< JTRIGGER::JTriggerNB, JNew >, JLANG::JStorage< match_type, JNew >, and JLANG::JStorage< TFile >.

Definition at line 84 of file JPointer.hh.

85 {
86 this->__p = NULL;
87 }

◆ reset() [2/3]

template<class JClass_t >
template<class T >
void JLANG::JPointer< JClass_t >::reset ( const JPointer< T > & pointer)
inlineinherited

Reset pointer.

Parameters
pointerpointer to object

Definition at line 108 of file JPointer.hh.

109 {
110 this->reset(pointer.get());
111 }
virtual void reset() override
Reset pointer.
Definition JPointer.hh:84

◆ reset() [3/3]

template<class JClass_t >
void JLANG::JAbstractPointer< JClass_t >::reset ( JClass_t * p)
inlineinherited

Reset pointer.

Parameters
ppointer to object

Definition at line 94 of file JAbstractPointer.hh.

95 {
96 if (this->get() != p) {
97
98 this->reset();
99
100 if (p != NULL) {
101 this->set(p);
102 }
103 }
104 }
virtual void set(JClass_t *p)=0
Set pointer.
virtual JClass_t * get() const =0
Get pointer.
virtual void reset()=0
Reset pointer.

◆ getReference() [1/2]

template<class JClass_t >
JClass_t *const & JLANG::JPointer< JClass_t >::getReference ( ) const
inlineinherited

Get rereference to internal pointer.

Returns
reference to internal pointer

Definition at line 119 of file JPointer.hh.

120 {
121 return __p;
122 }

◆ getReference() [2/2]

template<class JClass_t >
JClass_t *& JLANG::JPointer< JClass_t >::getReference ( )
inlineinherited

Get rereference to internal pointer.

Returns
reference to internal pointer

Definition at line 130 of file JPointer.hh.

131 {
132 return __p;
133 }

◆ equals()

template<class JClass_t >
virtual bool JLANG::JAbstractPointer< JClass_t >::equals ( const JAbstractPointer< JClass_t > & object) const
inlinevirtualinherited

Equals.

The equality is evaluated by comparison of the internal pointers.

Parameters
objectabstract pointer
Returns
true if equals; else false

Definition at line 50 of file JAbstractPointer.hh.

51 {
52 return this->get() == object.get();
53 }

◆ is_valid()

template<class JClass_t >
bool JLANG::JAbstractPointer< JClass_t >::is_valid ( ) const
inlineinherited

Check validity of pointer.

Returns
true if pointer not null; else false

Definition at line 83 of file JAbstractPointer.hh.

84 {
85 return this->get() != NULL;
86 }

◆ operator->()

template<class JClass_t >
JClass_t * JLANG::JAbstractPointer< JClass_t >::operator-> ( ) const
inlineinherited

Smart pointer operator.

Returns
pointer to object

Definition at line 112 of file JAbstractPointer.hh.

113 {
114 if (!is_valid())
115 THROW(JNullPointerException, "JAbstractPointer::operator->()");
116 else
117 return this->get();
118 }

◆ operator JClass_t *()

template<class JClass_t >
JLANG::JAbstractPointer< JClass_t >::operator JClass_t * ( ) const
inlineinherited

Type conversion operator.

Returns
pointer to object

Definition at line 126 of file JAbstractPointer.hh.

127 {
128 return this->get();
129 }

Friends And Related Symbol Documentation

◆ operator>>

template<class JKey_t , class JValue_t >
TFile & operator>> ( TFile & file,
JManager< JKey_t, JValue_t > & object )
friend

Read manager from file.

Parameters
filefile
objectmanager
Returns
file

Definition at line 340 of file JManager.hh.

341 {
342 object.Read(file);
343
344 return file;
345 }

◆ operator<<

template<class JKey_t , class JValue_t >
TFile & operator<< ( TFile & file,
JManager< JKey_t, JValue_t > & object )
friend

Write manager to file.

Parameters
filefile
objectmanager
Returns
file

Definition at line 355 of file JManager.hh.

356 {
357 object.Write(file);
358
359 return file;
360 }

Member Data Documentation

◆ wc

template<class JKey_t , class JValue_t >
char JROOT::JManager< JKey_t, JValue_t >::wc

Definition at line 362 of file JManager.hh.

◆ fmt

template<class JKey_t , class JValue_t >
JFormat_t JROOT::JManager< JKey_t, JValue_t >::fmt

Definition at line 363 of file JManager.hh.

◆ __p

template<class JClass_t >
JClass_t* JLANG::JPointer< JClass_t >::__p
protectedinherited

pointer to object

Definition at line 136 of file JPointer.hh.


The documentation for this class was generated from the following file: