14 #include "CoolKernel/ConstRecordAdapter.h"
15 #include "CoolKernel/FolderSpecification.h"
16 #include "CoralBase/Attribute.h"
17 #include "CoralBase/AttributeList.h"
42 m_reg_sel_svc(
"RegionSelectionSvc",
name),
43 m_cool_connect(false),
67 ATH_MSG_FATAL(
"Configuration error: Number of folders and tags do not match!");
68 return StatusCode::FAILURE;
81 }
catch (cool::DatabaseDoesNotExist &
e) {
85 }
catch (cool::Exception &
e) {
86 ATH_MSG_FATAL(
"Cannot create database and datbasae does not exist!");
87 return StatusCode::FAILURE;
110 ATH_MSG_FATAL(
"IOV has to be set, if no calibration source provides it!");
111 return StatusCode::FAILURE;
128 return StatusCode::SUCCESS;
138 return StatusCode::FAILURE;
140 return StatusCode::SUCCESS;
149 return StatusCode::FAILURE;
152 return StatusCode::SUCCESS;
162 if (MuonDetMgr ==
nullptr) {
163 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object");
186 m_data_string << t0 <<
"," << validflag <<
"," << adc0 <<
",";
219 cool::RecordSpecification mdtt0_rec = (
m_mdtt0_fld[
i]->payloadSpecification());
220 bool compressed(
false);
228 it.second[
"file"].data<cool::String4k>() =
file;
229 it.second[
"tech"].data<
int>() = creation_flags;
233 blob.resize(dest_len);
234 Bytef *
p =
static_cast<Bytef *
>(
blob.startingAddress());
237 blob.resize(dest_len);
251 unsigned int creation_flags) {
258 for (
int i = 0;
i < 3;
i++) {
262 if (
id.GetMl() == 0) {
268 if (
id.GetMl() != 0) {
269 if (
found[0] ||
found[
id.GetMl()])
return true;
283 cool::RecordSpecification mdtrt_rec = (
m_mdtrt_fld[
i]->payloadSpecification());
284 bool compressed(
false);
290 std::ostringstream data_column;
291 data_column << id_cp.
FixedId() <<
"," <<
points.size() << std::endl;
292 for (
const auto & point :
points) {
293 data_column << point.second.x2() <<
"," << point.second.x1() <<
"," << point.second.error() <<
",";
297 it.second[
"tech"].data<
int>() = creation_flags;
298 it.second[
"file"].data<cool::String4k>() =
file;
300 uLongf dest_len = compressBound(data_column.str().size());
302 blob.resize(dest_len);
303 Bytef *
p =
static_cast<Bytef *
>(
blob.startingAddress());
305 compress(
p, &dest_len,
reinterpret_cast<const Bytef *
>(data_column.str().c_str()), data_column.str().size());
306 blob.resize(dest_len);
308 it.second[
"data"].data<cool::String16M>() = data_column.str();
325 "<timeStamp>run-lumi</timeStamp><addrHeader><address_header service_type=\"71\" clid=\"1238547719\" "
326 "/></addrHeader><typeName>CondAttrListCollection</typeName><key>") +
331 "<timeStamp>run-lumi</timeStamp><addrHeader><address_header service_type=\"71\" clid=\"1238547719\" "
332 "/></addrHeader><typeName>CondAttrListCollection</typeName><key>") +
336 bool compressed(
false);
344 cool::RecordSpecification
spec;
345 spec.extend(
"tech", cool::StorageType::Int32);
347 spec.extend(
"file", cool::StorageType::String255);
348 spec.extend(
"data", cool::StorageType::Blob64k);
350 spec.extend(
"file", cool::StorageType::String4k);
352 spec.extend(
"data", cool::StorageType::String4k);
354 spec.extend(
"data", cool::StorageType::String16M);
357 cool::FolderSpecification
fspec(cool::FolderVersioning::MULTI_VERSION,
spec);