1 #ifndef __JROOTFILEREADER__
2 #define __JROOTFILEREADER__
24 namespace JPP {
using namespace JROOT; }
42 inline void getObject(TFile* file,
const char* key,
T*& ps)
45 file->GetObject(key, ps);
119 virtual void open(
const char* file_name)
123 actionAtFileOpen<T>(this->
getFile());
138 if (cycleOld != cycleNew) {
150 actionAtFileRead<T>(__p);
153 return (cycleOld == cycleNew && __p != NULL);
195 cycleNew += (Short_t) ns;
197 cycleNew = numeric_limits<Short_t>::max();
199 return cycleNew - cycleOld;
237 virtual void open(
const char* file_name)
241 if (this->
get() != NULL) {
242 actionAtFileOpen<T>(this->
get()->GetCurrentFile());
std::ostream & rewind(std::ostream &out)
Rewind character.
TObject * getObject(const JRootObjectID &id)
Get TObject.
virtual void open(const char *file_name)
Open file.
virtual void open(const char *file_name)
Open file.
Interface for object iteration with rewinding.
JRootFileReader()
Default constructor.
unsigned int skip_type
Type definition for number of objects to skip.
JRootFileReader(const char *file_name, const char *key=getName(JType< T >()))
Constructor.
Auxiliary class for a type holder.
T * open(const std::string &file_name)
Open file.
virtual void reset()
Reset pointer.
TFile * getFile(const std::string &file_name, const std::string &option="exist")
Get TFile pointer.
virtual void open(const char *file_name)
Open file.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
Data type dependent action methods for customised ROOT version management.
virtual bool hasNext()
Check availability of next element.
virtual void rewind()
Rewind.
Interface for object iteration with named access.
const char * getName()
Get ROOT name of given data type.
virtual skip_type skip(const skip_type ns)
Skip items.
JTemplateTreeReader object iterator.
JAccessibleObjectIterator< T >::pointer_type pointer_type
Short_t getCycle() const
Get cycle number of last read object.
virtual const pointer_type & next()
Get next element.