class HldGrepFileSource: public HldFileSourceBase

Function Members (Methods)

public:
HldGrepFileSource(TString dir = "", TString opt = "Grep", Int_t grepInterval = 5, Int_t refId = -1, Int_t off = 5)
virtual~HldGrepFileSource()
voidTObject::AbstractMethod(const char* method) const
virtual voidaddFile(const Text_t* fileName, Int_t refId = -1)
voidHldSource::addUnpacker(HldUnpack* unpacker)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
EDsStateHldSource::dumpEvt()
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual Bool_tHldSource::finalize()
Bool_tHldSource::finalizeUnpacker()
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual const Text_t*HldFileSourceBase::getCurrentFileName()
virtual Int_tHldFileSourceBase::getCurrentRefId()
virtual Int_tHldFileSourceBase::getCurrentRunId()
Bool_tHldSource::getDecodingStyle()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
TList*HldFileSourceBase::getListOfFiles()
virtual const char*TObject::GetName() const
virtual EDsStategetNextEvent(Bool_t doUnpack = kTRUE)
virtual Bool_tgetNextFile()
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual Int_tgetRunId(const Text_t* fileName)
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual Bool_tHldFileSourceBase::init()
Bool_tHldSource::initUnpacker()
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
HldSource&HldSource::operator=(const HldSource&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual Bool_tHldSource::reinit()
voidTObject::ResetBit(UInt_t f)
virtual Bool_trewind()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
EDsStateHldSource::scanEvt()
EDsStateHldSource::scanIt(HldEvt* evt)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidHDataSource::setCursorToPreviousEvent()
voidHldFileSourceBase::setDirectory(const Text_t* direc)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidHldSource::setDump()
voidHDataSource::setEventAddress(HEvent** ev)
voidsetMaxEventPerFile(Int_t n)
static voidTObject::SetObjectStat(Bool_t stat)
voidHldSource::setOldDecodingStyle(Bool_t decodingStyle = kTRUE)
voidsetRefId(Int_t id = -1)
voidHldSource::setScanned(Bool_t scanned = kTRUE)
virtual voidTObject::SetUniqueID(UInt_t uid)
EDsStateHldSource::showIt(HldEvt* evt)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual EDsStateHDataSource::skipEvents(Int_t nEv)
voidstop()
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
Int_tcheckDir(TString dir)
voidHldSource::decodeHeader(HEventHeader* dest)
Int_tdecodeOption(TString opt)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
Int_tgetNewFile()
Int_tloopForNewFile()
voidTObject::MakeZombie()
static Int_tselectFiles(const dirent* entry)

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Bool_tdostop! flag to stop the source from file reading (ckecked each event)
TStringHldFileSourceBase::fCurrentDirCurrent directory for addFile
HldFileDesc*HldFileSourceBase::fCurrentFilePointer to current file.
HEvent**HDataSource::fEventAddr! Address of the event to fill
Int_tHldFileSourceBase::fEventLimitEvent counter and maximun event nr per file
Int_tHldFileSourceBase::fEventNr
TListHldFileSourceBase::fFileListList with all files to be analyzed
HldEvt*HldSource::fReadEvent! Buffer where the data is first read.
TList*HldSource::fUnpackerList! List of the unpackers used to extract data
Int_tfirst! flag : 0 if no file has be selected
static TStringfullname! full filename: path/file
static TStringfullnamesort! full filename for sorting: path/modtime_file
Int_tinterval! time interval in seconds for grep on dir
Bool_tHldSource::isDumped
Bool_tHldSource::isScanned
TIterator*HldFileSourceBase::iterIterator over list of files
static time_tlastfile! last modification time of last used file
Int_tmode! flag : 1 take newest file , 1: start from given file/time than take the next in list
Bool_tHldSource::oldDecodingStyle
static TStringpath! path to directory used for grep of new hld files
Int_treferenceId! referrence ID for files
static time_ttcurrent! current time
static time_ttimelimit! time stamp for the search of new files (files should be newer)
static Int_ttimeoffset! offset in seconds required to t_current
TStopwatchtimer! timer for grep interval

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HldGrepFileSource(TString dir = "", TString opt = "Grep", Int_t grepInterval = 5, Int_t refId = -1, Int_t off = 5)
  This "data source" reads the HLD data from files on disk.
  The user provides a directory name and the source will grep
  the newest files from the disk. If after a given check interval
  a new file is found, the current one will be closed and the reading
  continues with the new one. The source will run in an endless loop
  and wait for new files. The user has to exit the program by himself.

  dir          : directory where the hld files are located
  opt          : select between the 2 possible modes of the source
                 1. "Grep" (default) : search for the newest files in intervals
                    of grepInterval seconds
                 2. "Date: 02/05/2005 22:00:00" select all files newer than date
                    and read them sequentional
                 3. "File: myname.hld" select all files newer than this file and
                    read them sequential
  grepInterval : time interval for checking for new files
  refId        : -1 (default) reference run for init procedure
~HldGrepFileSource(void)
 Destructor for a LMD file data source
Int_t getRunId(const Text_t* fileName)
 Get the run Id from the file filename
 In case of failure returns -1
EDsState getNextEvent(Bool_t doUnpack = kTRUE)
 Tries to read a new event from the LMD file and put
 the info into the HEvent structure.
 The set directory is checked in interval seconds
 for new files. If a new file is available
 it is opened for reading. If the last event of
 the current file is reached an endless loop
 for new files on the disk is performed. The
 loop ends only in case of success!
Int_t loopForNewFile()
 check if a new file is on the disk.
 performs endless loop until succes!
 A sleep of the set time interval in seconds
 is performed before next try.
Int_t checkDir(TString dir)
 Checks the directory dir. In case of empty
 strings (default) or not existing directory
 this function exit the program. No chance
 to go on for lazy users ...Strategy of breaking
 as soon as possible. If the directory name does
 not end with "/" the slash is added
Int_t decodeOption(TString opt)
 Decodes the option string. In case of not known
 option or wrong format this function exit the program.
 No chance to go on for lazy users ...Strategy of breaking
 as soon as possible. Depending on the decoded option
 the mode (=1 for "Grep", =2 for sequential reading) switch
 is set.
  opt  : select between the 2 possible modes of the source
         1. "Grep" (default) : search for the newest files in intervals
            of grepInterval seconds
         2. "Date: 02/05/2005 22:00:00" select all files newer than date
             and read them sequentional
         3. "File: myname.hld" select all files newer than this file and
            read them sequential
Int_t selectFiles(const dirent* entry)
 This is the select function called with scandir(.....)
 Selects files going to the list of files for sorting/selection.
 Returns 1 if a file is selected otherwise 0.
 Only hld files and files newer or equal than the time stamp
 lastfile are taken into account. Files smaller 500k are
 ignored.
Int_t getNewFile()
 Loops on the set directory for new hld files.
 the dir is scanned with scandir(). The selected
 files newer or equal time stamp lastfile goes
 to the list of candidates. The list will be sorted
 by last modification of the files.
 In "Grep" mode (mode=1) the second newest file
 is opened (preventing from reading a file which is
 in writing process). The time stamp lastfile is set
 to the selected files last modification time.
 In "File/Date" mode (mode=2) the list is sequential
 read.
void setMaxEventPerFile(Int_t n)
{fEventLimit = n; }
void setRefId(Int_t id = -1)
{referenceId=id;}
void stop()
{dostop=kTRUE;}
void addFile(const Text_t* fileName, Int_t refId = -1)
{Error("addFile()","This function is not implemented!");exit(1);}
Bool_t getNextFile()
{Warning("getNextFile()","This function is a dummy implementation!");return kTRUE;}
Bool_t rewind()
{Error("rewind()","This function is not implemented!") ;exit(1);return kTRUE;}

Last change: Sat May 22 13:17:57 2010
Last generated: 2010-05-22 13:17

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.