VFrameMetaDB


class description - source file - inheritance tree

class VFrameMetaDB : public VVirtualFrameInfoDB


    public:
VFrameMetaDB VFrameMetaDB() VFrameMetaDB VFrameMetaDB(const VFrameMetaDB&) VFrameMetaDB VFrameMetaDB(char* filename, Option_t* mode = "READ", char* frfilenames, Option_t* option = "R") virtual void ~VFrameMetaDB() Int_t AddCondition(char* name, VGPSTime time, Float_t timebefore, Float_t timeafter, Bool_t triggerStatus, Float_t amplitude, Float_t prob, TString varNames, TArrayF tvars, Int_t group) virtual Int_t AddFiles(const char* filenames, Option_t* option = "R") Int_t AddFiles(const char* filenames, const char* extrapath, Option_t* option) TArrayF AnalyzeTriggerString(char* string, TString& outputnames) virtual void Build(char* pathtofiles, char* filename, Option_t* option = "R") Bool_t BuildNewCondition(char* name, const char* varnames) static TClass* Class() virtual void Close() virtual VConditionSet* CreateConditionSet(const char* condfs, const char* selfs = "0") virtual void Draw(const char* selexp, const char* selection, Option_t* option, Double_t start = 0, Double_t length = 0) Int_t FindIndex(Double_t gpstime, Double_t& frbegin, Double_t& frend) Int_t FindIndex(Int_t approxindex, Double_t gpstime) Int_t FindNearestGECondIndex(Int_t conditionnumber, Double_t gpstime, Double_t& frbegin, Double_t& frend) Int_t FindNearestGECondIndex(const char* condname, Double_t gpstime, Double_t& frbegin, Double_t& frend) Int_t FindNearestGEIndex(Double_t gpstime, VConditionFormula* condf, Double_t& frbegin, Double_t& frend, Double_t& cobegin, Double_t& coend, Int_t& cogroup) Int_t FindNearestGEIndex(Double_t gpstime, Double_t& frbegin, Double_t& frend) Int_t FindNearestLEIndex(Double_t gpstime, Double_t& frbegin, Double_t& frend) FrameH* FrameReadHeader(FrFile* iFile, int frnum) virtual VConditionNames* GetConditionNames() const virtual VFrCondition** GetConditionsArray() const virtual THashList* GetConditionTree() const virtual Double_t GetDBEnd() virtual TFile* GetDBFile() const virtual VHashTable* GetDBHash() const virtual Double_t GetDBStart() virtual Double_t GetEnd() VFrCondition* GetLoadedCondition(Int_t conditionnumber) VFrCondition* GetLoadedCondition(const char* name) virtual void GetMetaData(VMetaData* meta, Double_t time) virtual TTree* GetMetaTree() const virtual Int_t GetNConditions() virtual const char* GetOption() const virtual const char* GetPathToDB() const virtual VVirtualMetaDBPlayer* GetPlayer() virtual Double_t GetStart() virtual TClass* IsA() const virtual Bool_t IsOpened() Int_t LoadNearestGECondition(Double_t gpstime, const char* name) Int_t LoadNearestGECondition(Double_t gpstime, Int_t conditionnumber = -2) Int_t LoadNextCondition(char* name) Int_t LoadNextCondition(Int_t conditionnumber) virtual void NextMetaData(VMetaData* meta, Double_t time, const char* selection) virtual void NextMetaData(VMetaData* meta) virtual void NextMetaData(VMetaData* meta, Double_t time, VConditionFormula* condf = 0) virtual void NextMetaData(VMetaData* meta, VConditionSet* condset) virtual void NextMetaData(VMetaData* meta, Double_t time, VConditionSet* condset) virtual Bool_t Open(char* pathtoDB, Option_t* openopt = "READ") virtual void PreviousMetaData(VMetaData* meta) virtual void Print(Option_t* opt) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
TFile* mDBFile the database file TString mPathToDB path to db file TString mOption DB opened option "read" or "update" Bool_t mIsOpened DB opened flag TTree* mMetaTree Meta data tree associated to this database THashList* mConditionTree The conditions trees (triggers, sms, user conditions...) in a list TTree* mConditionsIndex The conditions trees index VMetaDataFMDB* mTmpMeta Address of the frame metadata VMetaString* mTmpMetaString Strings of the meta data : filename, detector, state VFrCondition** mTmpConditions Condition objects used for I/O CondIndex_t* mTmpCondIndex Indices (first and last) of a set of conditions in it's condition tree Int_t mNConditions Number of conditions VHashTable* mHashTable Hash table associated to this database Int_t mCurMetaIndex Last accessed meta data index Int_t* mCurCondTreeIndex indices of current conditions in respective condition trees Double_t mCurFrameStart current frame start time; Double_t mCurFrameEnd current frame end time; TString mCurVectName current vector name; Int_t mCurCondGroup current condition group; UInt_t mLastRunNumber Run number of the last frame opened UInt_t mLastFrNumber Frame number of the last frame opened VConditionNames* mConditionNames Names of conditions present in the database TTree* mGroupList Group : group contents tree VGroupInfo* mTmpGroupInfo Group : one group information VGroupInfo* mLastGroupInfo Group : group info for the last group VVirtualMetaDBPlayer* mPlayer Pointer to current metadb player

Class Description

                                                                      
 Local data base                                                      
                                                                      
 The local database is used to quickly access frame data contained in 
 a handful of different frame files.                                  
                                                                      


void Build(char* pathtofiles, char* filename, Option_t* option)
 Builds the frame database
 pathtofiles is the path to the directory containing the frame files
 used to build the DB
 filename is the name of the ROOT file that is the DB. It will be created
 in the current directory

Bool_t Open(char* pathtoDB, Option_t* openopt)
 Open the Frame database "pathtoDB"

void Close()
 Closes this metadb

Bool_t BuildNewCondition(char* name, const char* varnames)
 Add a condition to this database. Builds a new condition tree and adds
 a branch in the index tree. If the index tree already has entries, fill
 the newly created branch with 0's for the size of the index tree.
 "name" is the name of the new condition tree.
 The consistency of the structure is maintained so that the same index is
 used in Condition Names, tree list, TmpConditions objects, TmpCondIndex.
 On return, 0 = error, 1 = OK

Int_t AddFiles(const char* filenames, Option_t* option)
 Add files described by "filenames" in the database
 The options are :
     "R" means a recursive search will be done. This is the default.
     "S" a simple search is performed, not looking at directories.

FrameH* FrameReadHeader(FrFile* iFile, int frnum)
 Reads only the frame header for the frame number
 frnum in the specified file. Builds a frame structure (temporary)
 Builds a frame structure (temporary)
 This routine takes code from the relevant parts of the Framelib.
 (Thanks, Benoit !)

Int_t AddFiles(const char* filenames, const char* extrapath, Option_t* option)
 Add files described by "filenames" in the database
 The options are :
     "R" means a recursive search will be done. This is the default.
     "S" a simple search is performed, not looking at directories.
     if option contains "P" then it is a primary call, not the result
     of a recursive one
 extrapath is put in front of the filenames, needed in the database

Int_t AddCondition(char* name, VGPSTime time, Float_t timebefore, Float_t timeafter, Bool_t triggerStatus, Float_t amplitude, Float_t prob, TString varNames, TArrayF tvars, Int_t group)
 Add a defined condition to the database. Fills the corresponding tree,
 and if the condition type (name) doesn't exist, builds a new tree and
 a new index branch.
 return the index of the new entry in the condition tree

TArrayF AnalyzeTriggerString(char* string, TString& outputnames)
 Analyze the inputs or statistics string in predefined format
 used in the FrameLib.

Double_t GetStart()
 Returns the start time of the first frame in the metadatabase

Double_t GetEnd()
 Returns the end time of the last frame in the metadatabase

Int_t FindIndex(Int_t approxindex, Double_t gpstime)
 Finds the index of the frame meta corresponding to time "gpstime"
 in the metadata tree. approxindex is an approximate value of the index.
 (usually the right one !)
 The search is made in the same group of frames (consecutive frames)

Int_t FindIndex(Double_t gpstime, Double_t& frbegin, Double_t& frend)
 Finds the index of the frame meta corresponding to time "gpstime"
 in the metadata tree
 returns also the begin and end time of the frame

Int_t FindNearestGEIndex(Double_t gpstime, VConditionFormula* condf, Double_t& frbegin, Double_t& frend, Double_t& cobegin, Double_t& coend, Int_t& cogroup)
 Finds the index of the frame that contains data for time "gpstime"
 or the frame that is the nearest next one and that satisfies the selection
 formula "condf". (GE stands for Greater or Equal)
 The time is a GPS time expressed as a double : seconds.nanoseconds
 If the pointer to condition is null, suppose no condition asked, will return
 the next nearest frame index.

Int_t FindNearestGEIndex(Double_t gpstime, Double_t& frbegin, Double_t& frend)
 Finds the index of the frame that contains data for time "gpstime"
 or the frame that is the nearest next one (GE stands for Greater or Equal)
 The time is a GPS time expressed as a double : seconds.nanoseconds
 the next nearest frame index.

Int_t FindNearestLEIndex(Double_t gpstime, Double_t& frbegin, Double_t& frend)
 Finds the index of the frame that contains data for time "gpstime"
 or the frame that is the nearest PREVIOUS one (LE stands for Lower or Equal)
 The time is a GPS time expressed as a double : seconds.nanoseconds
 returns the next nearest frame index.

Int_t FindNearestGECondIndex(const char* condname, Double_t gpstime, Double_t& condbegin, Double_t& condend)
 Finds the index of the condition that contains data for time "gpstime"
 or the condition that is the nearest next one.
 (GE stands for Greater or Equal)
 The time is a GPS time expressed as a double : seconds.nanoseconds
 returns the index searched for.

Int_t FindNearestGECondIndex(Int_t conditionnumber, Double_t gpstime, Double_t& condbegin, Double_t& condend)
 Finds the index of the condition that contains data for time "gpstime"
 or the condition that is the nearest next one.
 (GE stands for Greater or Equal)
 The time is a GPS time expressed as a double : seconds.nanoseconds
 returns the index searched for.

Int_t LoadNearestGECondition(Double_t gpstime, const char* name)
 Loads the condition "name" that is nearest next to the time "gpstime"
 The reference is the start time of the condition, i.e. the time of the
 maximum - timeBefore.
 If name = "*", loads all the present conditions. To load only relevant
 conditions, one should set the branches in the condition trees to active
 or inactive state.
 These conditions are loaded into variables internal to the database
 return the index.

Int_t LoadNearestGECondition(Double_t gpstime, Int_t conditionnumber)
 Loads the condition corresponding to number "conditionnumber",
 that is nearest next to the time "gpstime"
 The reference is the start time of the condition, i.e. the time of the
 maximum - timeBefore.
 If conditionnumber = -2, loads all the present conditions. To load only relevant
 conditions, one should set the branches in the condition trees to active
 or inactive state.
 These conditions are loaded into variables internal to the database
 return the index.

Int_t LoadNextCondition(char* name)
 Loads the condition named "name" and nearest
 next one to the previously loaded. This method should only be called
 in conjunction with LoadNearestGECondition(). Using LoadNearestGECondition()
 in one function and LoadNextCondition() in another should be avoided in
 order to keep the consistency of the conditions loading.
 The condition is loaded into variables internal to the database
 return the index.

Int_t LoadNextCondition(Int_t conditionnumber)
 Loads the condition that is defined by "condition number" and nearest
 next one to the previously loaded. This method should only be called
 in conjunction with LoadNearestGECondition(). Using LoadNearestGECondition()
 in one function and LoadNextCondition() in another should be avoided in
 order to keep the consistency of the conditions loading.
 The condition is loaded into variables internal to the database
 return the index.

VFrCondition* GetLoadedCondition(const char* name)
 Returns the condition "name" just loaded (have to do a
 LoadNearestGECondition or LoadNextCondition() before calling this method

void Draw(const char* selexp, const char* selection, Option_t* option, Double_t start, Double_t length)
   Draws expression selexp for conditions defined in the database
   Builds a TGraph representing selexp over time, vetoed by selection

   selexp is an expression (formula) referencing a combination of conditions
   Example:
      selexp = trig.amp   simplest case: draw a plot of amplitude of
                                          condition named trig
             = sqrt(trig.p)            : draw distribution of sqrt(trig.p)
             = x*y/z                   : where x, y and z are conditions
                                         defined in the database
   Note that selexp may contain a selection.
   example, if selexp= x*(y<0), the value plotted will be x if y<0
   and will be 0 otherwise.

   selection is an expression with a combination of the conditions.
   In a selection all the C++ operators are authorized.
   The value corresponding to the selection expression is used as a veto
   to plot the points. If it is not 0, the point is plotted.
   The value returned is not relevant, only relevant is
   (selection==0) -> point skipped or (selection!=0) -> point plotted

   Examples:
       selection1 = "x<y && sqrt(z)>3.2"
       selection2 = "(x+y)*(sqrt(z)>3.2"
   selection1 returns a value = 0 or 1
   selection2 returns a value  = x+y if sqrt(z)>3.2
              returns a value  = 0 otherwise.
   Warning : if there is no selection (selection=""), selexp itself
             will be taken as selection expression, i.e. only points where
             selexp != 0 will be plotted

   option is the drawing option
       see TGraph::Draw for the list of all drawing options.

   start is the start time of the first conditions to process
      (default is beginning of database values)
   length is the length in time of the data to process (default is all data)


void Print(Option_t* opt)
 Prints information about the database and it's contents
 option :
     "full" : prints all the database info. VERY LONG. mainly for test
     "conditions" : prints only conditions names

VVirtualMetaDBPlayer* GetPlayer()
 Load the VMetaDBPlayer (if not already done)
 Pointer to player is mPlayer

void GetMetaData(VMetaData* meta, Double_t gpstime)
 Retrieve the meta data corresponding to time

void NextMetaData(VMetaData* meta)
 Retrieve the next meta data

void PreviousMetaData(VMetaData* meta)
 Retrieve the previous meta data

void NextMetaData(VMetaData* meta, VConditionSet* condset0)
 Retrieve the next meta data with condition set

void NextMetaData(VMetaData* meta, Double_t time, VConditionSet* condset0)
 Retrieve the next meta data after time "time" with condition set condset

void NextMetaData(VMetaData* meta, Double_t gpstime, VConditionFormula* condf)
 Retrieve the next meta data with time greater or equal to "time"
 and selection condition

void NextMetaData(VMetaData* meta, Double_t gpstime, const char* selection)
 Retrieve the next meta data with time greater or equal to "time"
 and selection condition

VConditionSet* CreateConditionSet(const char* condfs, const char* selfs)
 Creates a condition set adapted to this Frame Info DB



Inline Functions


            VFrameMetaDB VFrameMetaDB()
            VFrameMetaDB VFrameMetaDB(char* filename, Option_t* mode = "READ", char* frfilenames, Option_t* option = "R")
                  TFile* GetDBFile() const
             const char* GetOption() const
             const char* GetPathToDB() const
                  Bool_t IsOpened()
                  TTree* GetMetaTree() const
              THashList* GetConditionTree() const
        VConditionNames* GetConditionNames() const
                   Int_t GetNConditions()
             VHashTable* GetDBHash() const
                Double_t GetDBStart()
                Double_t GetDBEnd()
          VFrCondition** GetConditionsArray() const
           VFrCondition* GetLoadedCondition(Int_t conditionnumber)
                 TClass* Class()
                 TClass* IsA() const
                    void ShowMembers(TMemberInspector& insp, char* parent)
                    void Streamer(TBuffer& b)
                    void StreamerNVirtual(TBuffer& b)
            VFrameMetaDB VFrameMetaDB(const VFrameMetaDB&)
                    void ~VFrameMetaDB()
Last update: Tue Jul 1 17:28:45 2003


- ROOT page - VEGA page - Class index - Top of the page

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