#ifndef TodbGscUtils_hxx_seen #define TodbGscUtils_hxx_seen #include #include #include #include /// Set of useful ODB access methods functions. /// Warning: these methods are rather expensive (they may /// make multiple database queries), so they should be used with care. namespace odbGscUtils { static int odb_gsc_error = -9999; /// Get a particular ODB variable. This method adds additional error checking. /// Namely checks that the event context matchs information in database. /// Return double value. double GetODBVarDouble(COMET::ICOMETContext context,const char *table, const char *fieldname); /// Get a particular ODB variable. This method adds additional error checking. /// Namely checks that the event context matchs information in database. /// Return integer value. int GetODBVarInteger(COMET::ICOMETContext context,const char *table, const char *fieldname); /// Get a particular ODB variable. This method adds additional error checking. /// Namely checks that the event context matchs information in database. /// Return string value. std::string GetODBVarString(COMET::ICOMETContext context,const char *table, const char *fieldname); /// This method checks whether there is valid ODB information for this particular /// event context. In particular, it will return false if /// a) The context shows that this is simulated data (no ODB info for simulated data). /// b) The bool IsODBContextValid(COMET::ICOMETContext context); } #endif