21 const std::string& recordType )
24 std::auto_ptr<WriterProxy> writer(factory->create( recordType +
"@Writer" )) ;
25 if( writer.get() == 0 )
27 throw cond::Exception(
"DataWriter: could not create WriterProxy with name "
28 + recordType +
"@Writer" ) ;
61 bool logTransactions )
75 boost::shared_ptr<L1TriggerKeyList> pointer(keyList);
93 const std::string& payloadToken,
95 bool logTransactions )
103 throw cond::Exception(
"DataWriter: PoolDBOutputService not available."
107 bool iovUpdated =
true ;
121 poolDb->
tagInfo( esRecordName, tagInfo ) ;
146 <<
" SINCE " << sinceRun ;
159 throw cond::Exception(
"DataWriter: PoolDBOutputService not available."
164 std::string iovTag = poolDb->
tag( recordName ) ;
171 std::string iovToken ;
172 if( metadata.
hasTag( iovTag ) )
174 iovToken = metadata.
getToken( iovTag ) ;
176 if( iovToken.empty() )
178 return std::string() ;
196 throw cond::Exception(
"DataWriter: PoolDBOutputService not available."
201 poolDb->
tagInfo( recordName, tagInfo ) ;
208 std::string keyListToken =
210 if( keyListToken.empty() )
std::string lastPayloadToken(const std::string &recordName)
std::string payloadToken(const std::string &recordName, edm::RunNumber_t runNumber)
std::string lastPayloadToken
std::string payloadToken(const std::string &iovToken, cond::Time_t currenttime)
std::string tag(const std::string &recordName)
std::string classNameForTypeId(const std::type_info &typeInfo)
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
bool isNewTagRequest(const std::string &recordName)
cond::DbSession session() const
cond::Time_t beginOfTime() const
std::string writePayload(const edm::EventSetup &setup, const std::string &recordType)
void writeKeyList(L1TriggerKeyList *keyList, edm::RunNumber_t sinceRun=0, bool logTransactions=false)
int start(bool readOnly=false)
start transaction
bool fillLastTriggerKeyList(L1TriggerKeyList &output)
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
std::string storeObject(const T *object, const std::string &containerName)
void tagInfo(const std::string &recordName, cond::TagInfo &result)
void readObject(const std::string &payloadToken, T &outputObject)
cond::Time_t endOfTime() const
cond::ValidityInterval lastInterval
bool updateIOV(const std::string &esRecordName, const std::string &payloadToken, edm::RunNumber_t sinceRun, bool logTransactions=false)
int commit()
commit transaction. Will disconnect from database if connection timeout==0 or connectted time close t...
T get(const Candidate &c)