10 class ICondDBDataAccess;
11 class ICondDBFolderMgr;
18 #include "EVENT/LCCollection.h"
26 typedef std::vector< lcio::LCCollection* >
ColVec ;
69 DBInterface(
const std::string& folder,
bool update=
false ) ;
78 DBInterface(
const std::string& dbInit,
const std::string& folder,
bool update=
false) ;
106 const std::string&
dbName() {
return _dbName ; }
112 lcio::LCCollection* col,
113 const std::string& description ) ;
141 const std::string& tag=
"" ) ;
171 const std::string& tag=
"" ) ;
200 const std::string& tag=
"" ) ;
208 const std::string& tag=
"" ) ;
245 void tagFolder(
const std::string& tagName,
const std::string& description=
"", std::string usingTagName =
"");
299 ICondDBMgr* _condDBmgr = nullptr ;
300 ICondDBDataAccess* _condDataAccess = nullptr ;
301 ICondDBFolderMgr* _condFolderMgr = nullptr ;
302 ICondDBTagMgr * _condTagMgr = nullptr ;
307 std::string _dbInit{} ;
308 std::string _folder{} ;
310 std::string _dbName{} ;
315 #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:106
ICondDBDataAccess * condDataAccess()
The db access object - use for direct access to the conditions database.
Definition: DBInterface.hh:89
ICondDBTagMgr * condTagMgr()
The tag manager - use for direct access to the conditions database.
Definition: DBInterface.hh:97
lcio::LCCollection * collectionFromCondDBObject(ICondDBObject *object, const std::string &tag)
Creates an LCColleciton from the data in the ICondDBObject.
Definition: DBInterface.cc:446
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:192
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:826
void init()
Initializes the database access.
Definition: DBInterface.cc:73
const std::string & folderName()
The folder used for this DB access.
Definition: DBInterface.hh:102
ICondDBMgr * condDBMgr()
The db manager object - use for direct access to the conditions database.
Definition: DBInterface.hh:85
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:534
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:719
void findAllCollections(ColVec &colVec)
Debug Method: Creates collections for all conditions data in current folder.
Definition: DBInterface.cc:412
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:223
void dump2File()
Debug Method: Creates an LCIO file with the all conditions data in the folder.
Definition: DBInterface.cc:627
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:848
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:255
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:93
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:288