[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tagdata base description for April Integration




Hello All,
Below you will find a description of my plan for integration of 
GC-tagdatabase.  Please comment if you feel there are things that
should be changed particularly if you feel they should be changed by Monday.
David



You should set the environment variable $TAG_DIR 
temporarily $TAG_DIR = /gc-obj/zimm/tag
this variable is used in making the corba link to the index builder.

***** I, Overview ******************************************
There are two prinicpal programs with the tagdatabase
 
BuildMaps.C
fillTag.C

there is also a ddl file tagdb.ddl
this file includes the ddl for the event (oParticles) databases themselves.

BuildMaps reads in a given events database, copies each of its elements
to a new database and builds a map over the new database. I need the map
to get the OIDs from the database.

fillTag reads in a events database file (specified at the command 
line at the time of this writing) and builds a tag database 
over the specified db.

***** II, Configuration ******************************************
The Objectivity configuration for the present scheme has::

50 event databases
each with about 200-300 events at 0.5MBytes/event.

50 copies of those data bases with maps.  That is::
there will be a database Run0061.db and a database Run0061Map.db
with the same information, but a map as well.

1 Map container with 50 maps of the above copied (mapped) dbases

1 tagdatabase which contains 50 containers each with a set of tag 
objects for its associated mapped database.  These are extremely small 
compared to the events themselves.

**** III, Contents of the tag ******************************************
The tag database ddl can be found in the tagdb file in the $TAG_DIR 
directory.

It contains::

***** EVENT HEADER 		EvHdr
An event hdr object (An object with an association the event and an
association to the tag.)  which is essentially unused.  It has two 
public run and event numbers.

***** An OID Struct 		EvOID
This struct contains the OID for the EVENT object associated with the tag.
struct EvOID { \
	d_Long dbaseID; \
	d_Long contID; \
	d_Long pageID; \
	d_Long slotID; \
};

***** An TagVArray 	TagArray
This can be used to add tags to the database after it has
been created.
class TagArray {
class TagArray {
	public:
	d_Boolean	flag;
	d_Char		label[40];
	d_Double	real64;
	d_Float		real32;
	d_Long		int32;
	d_Short		num16;
	d_ULong		unum32;
	d_UShort	unum16;
	EvOID		dbase;
	TagArray() {};
};

********* The event tag object		EvTag
DATA
private:
	d_Long _N_Ev;		// Event Number
	d_Long _N_Rn;		// Run Number
	d_Long _nPip; 		// Number of positive pions
	d_Long _nPim; 		// Number of negative pions
	d_Long _nPi0; 		// Number of neutral pions
	d_Long _nKap; 		// Number of positive Kaons
	d_Long _nKam; 		// Number of - Kaons
        d_Long _nLap; 		// Number of positive Lambdas
        d_Long _nLam; 		// Number of negative Lambdas
	d_Float _Mt; 		// Sum of all transverse masses
	d_Float _Tot_px; 	// Sum of all px in detector
	d_Float _Tot_py; 	// Sum of all py in detector
	d_Float _Tot_pz; 	// Sum of all pz in detector
	d_Long _nTags;		// number of tags
	EvOID _ObjID;  		// Struct for Event ID FD-DB-PG-SL
	d_Long _Set;		// unused

******* METHODS
public:
These methods are used in filling the tag data base (done once!)
// Fill Methods
ooStatus PutLong (char* TagElem, d_Long TagVal,  ooHandle(EvTag)& EvTagH) ;
ooStatus PutFloat(char* TagElem, d_Float TagVal, ooHandle(EvTag)& EvTagH) ;
ooStatus PutEvOID(d_Long* dbid, d_Long* contid, d_Long* pageid, d_Long*slotid ) ;

These methods are used to extract information from the tagdata base via 
objectivity connection.
//Index Methods
d_Long GetLong(char* TagElement, d_Long TagVal) ;
d_Float GetFloat(char* TagElement, d_Float TagVal) ;
EvOID GetEvOID() ;

Some AssociationsooVArray(TagArray) tagArray;
NOTE!!!!! I have used a direct association from the tag data base to the 
event object for simplicity!  This could easily change if it is an April 
priority.

ooRef(EvHdr)  toHdr_Ev <-> toEvTag_Hdr;
ooRef(oParticles) toEvComp_Tag;

**** CORBA Connection to the QE
//
//      Description of tagDBIndexI, the CORBA interface between
//      the tagDB and the Index Builder.
//
//      ti stands for Tagdb/Index
//
//      tiWrongType is thrown when a value of the wrong type was 
//      requested by the Index Builder
//
exception tiWrongType {};

enum type_t { t_undefined, t_int, t_float, t_string };

struct propInfo { string name; type_t type; };

typedef sequence<propInfo> propInfoList;

typedef string<8> OID_T;

interface tagDBIndexI {

        unsigned long getNumEvents();
        propInfoList getPropertyInfo();

        void firstEvent();
        void nextEvent();

        OID_T getOID() raises (tiWrongType);
        long getInt() raises (tiWrongType);
        float getFloat() raises (tiWrongType);

        // string getString() raises (tiWrongType);


};