10 class ICondDBDataAccess;
11 class ICondDBFolderMgr;
18 #include "EVENT/LCCollection.h"
26 typedef std::vector< lcio::LCCollection* >
ColVec ;
65 DBInterface(
const std::string& folder,
bool update=
false ) ;
74 DBInterface(
const std::string& dbInit,
const std::string& folder,
bool update=
false) ;
102 const std::string&
dbName() {
return _dbName ; }
108 lcio::LCCollection* col,
109 const std::string& description ) ;
137 const std::string& tag=
"" ) ;
167 const std::string& tag=
"" ) ;
196 const std::string& tag=
"" ) ;
204 const std::string& tag=
"" ) ;
241 void tagFolder(
const std::string& tagName,
const std::string& description=
"", std::string usingTagName =
"");
295 ICondDBMgr* _condDBmgr ;
296 ICondDBDataAccess* _condDataAccess ;
297 ICondDBFolderMgr* _condFolderMgr ;
298 ICondDBTagMgr * _condTagMgr ;
303 std::string _dbInit ;
304 std::string _folder ;
306 std::string _dbName ;
311 #endif // DBInterface_h
Provides a simple interface to the conditions data base for lccd.
Definition: DBInterface.hh:53
const std::string & dbName()
The db name used for this DB access.
Definition: DBInterface.hh:102
ICondDBDataAccess * condDataAccess()
The db access object - use for direct access to the conditions database.
Definition: DBInterface.hh:85
ICondDBTagMgr * condTagMgr()
The tag manager - use for direct access to the conditions database.
Definition: DBInterface.hh:93
lcio::LCCollection * collectionFromCondDBObject(ICondDBObject *object, const std::string &tag)
Creates an LCColleciton from the data in the ICondDBObject.
Definition: DBInterface.cc:447
lcio::LCCollection * findCollection(LCCDTimeStamp timeStamp, LCCDTimeStamp &since, LCCDTimeStamp &till, const std::string &tag="")
Retrieves the collection for the given point in time - returns NULL if no data is found...
Definition: DBInterface.cc:193
void tagFolder(const std::string &tagName, const std::string &description="", std::string usingTagName="")
Tag the current HEAD of the database folder as tagName.
Definition: DBInterface.cc:828
void init()
Initializes the database access.
Definition: DBInterface.cc:73
const std::string & folderName()
The folder used for this DB access.
Definition: DBInterface.hh:98
ICondDBMgr * condDBMgr()
The db manager object - use for direct access to the conditions database.
Definition: DBInterface.hh:81
void createDBFile(const std::string &tag="")
Creates an LCIO file with the all conditions data in the folder for the given tag.
Definition: DBInterface.cc:536
void createSimpleFile(LCCDTimeStamp timeStamp, const std::string &tag, bool allLayers=false)
Creates an LCIO file with one event that has a collection with the conditions data for the given time...
Definition: DBInterface.cc:721
void findAllCollections(ColVec &colVec)
Debug Method: Creates collections for all conditions data in current folder.
Definition: DBInterface.cc:413
DBInterface(const std::string &folder, bool update=false)
Default c'tor, uses lccd::getDBInitString() to determine the db initialization, i.e.
Definition: DBInterface.cc:49
lcio::long64 LCCDTimeStamp
The timestamp in LCCD is a 64bit int as defined in LCIO.
Definition: lccd.h:24
lcio::LCCollection * findNextValidCollection(LCCDTimeStamp timeStamp, LCCDTimeStamp &since, LCCDTimeStamp &till, const std::string &tag="")
Retrieves the next valid collection from the given point in time, searching forward in time - returns...
Definition: DBInterface.cc:224
void dump2File()
Debug Method: Creates an LCIO file with the all conditions data in the folder.
Definition: DBInterface.cc:629
bool folderBranchContainsTag(const std::string &tagName)
Checks if the folder given in the constructor or one of its sub folders is already tagged with the ta...
Definition: DBInterface.cc:850
lcio::LCCollection * findLastValidCollection(LCCDTimeStamp timeStamp, LCCDTimeStamp &since, LCCDTimeStamp &till, const std::string &tag="")
Retrieves the last valid collection before the given point in time, searching backwards in time - ret...
Definition: DBInterface.cc:256
void storeCollection(LCCDTimeStamp since, LCCDTimeStamp till, lcio::LCCollection *col, const std::string &description)
Stores the given collection in the database.
Definition: DBInterface.cc:135
virtual ~DBInterface()
D'tor.
Definition: DBInterface.cc:67
ICondDBFolderMgr * condFolderMgr()
The folder manager - use for direct access to the conditions database.
Definition: DBInterface.hh:89
std::vector< lcio::LCCollection * > ColVec
Convenience typedef for vector of LCCollection pointers.
Definition: DBInterface.hh:26
void findCollections(ColVec &colVec, const std::string &tag="")
Creates collections for all conditions data for the given tag and adds them to the colvec...
Definition: DBInterface.cc:289