20 const std::string& recordType )
23 std::auto_ptr<WriterProxy> writer(factory->create( recordType +
"@Writer" )) ;
24 if( writer.get() == 0 )
26 throw cond::Exception(
"DataWriter: could not create WriterProxy with name "
27 + recordType +
"@Writer" ) ;
60 bool logTransactions )
74 boost::shared_ptr<L1TriggerKeyList> pointer(keyList);
92 const std::string& payloadToken,
94 bool logTransactions )
102 throw cond::Exception(
"DataWriter: PoolDBOutputService not available."
106 bool iovUpdated =
true ;
120 poolDb->
tagInfo( esRecordName, tagInfo ) ;
145 << poolDb->
tag( esRecordName )
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() ;
184 iov.
load(iovToken ) ;
187 if( iP != iov.
end() ){
188 payloadToken = iP->token();
200 throw cond::Exception(
"DataWriter: PoolDBOutputService not available."
205 poolDb->
tagInfo( recordName, tagInfo ) ;
212 std::string keyListToken =
214 if( keyListToken.empty() )
std::string lastPayloadToken(const std::string &recordName)
const_iterator end() const
std::string payloadToken(const std::string &recordName, edm::RunNumber_t runNumber)
std::string lastPayloadToken
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)
const_iterator find(cond::Time_t time) const
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...
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
iov_range_iterator const_iterator
T get(const Candidate &c)
void load(const std::string &token)