Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
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);
int NMultilayers() const
return geometry information
std::set< NtupleStationId > m_rt_filled
void compress(const AmgSymMatrix(N) &covMatrix, std::vector< float > &vec)
void SetMultilayer(const int &ml)
int NLayers(int ml) const
bool InitializeGeometry(const MdtIdHelper &mdtIdHelper, const MuonGM::MuonDetectorManager *detMgr)
initialize geometry information
std::string regionId() const
return the region id string
std::map< bool, coral::AttributeList > m_mdtrt_cool_row
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< cool::IFolderPtr > m_mdtt0_fld
StatusCode finalize()
finalize functions
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
bool StoreT0Chamber(const NtupleStationId &id, const std::string &file, unsigned int creation_flags=0)
std::set< NtupleStationId > m_t0_filled
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
std::vector< std::string > m_t0_folder
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
std::vector< bool > m_compressed_t0
bool AppendT0(float t0, int validflag, float adc0)
StatusCode initialize()
Is called at the beginning of the analysis.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< cool::IFolderPtr > m_mdtrt_fld
static constexpr uint64_t MAXTIMESTAMP
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
ServiceHandle< RegionSelectionSvc > m_reg_sel_svc
bool create_folder(const unsigned int &fldr_nr, const bool &is_rt)
std::string m_cool_connection_string
ToolHandleArray< IMuonCalibConditionsSource > m_calibration_sources
std::vector< bool > m_compressed_rt
std::map< bool, coral::AttributeList > m_mdtt0_cool_row
std::vector< std::string > m_tagrt
std::vector< std::string > m_rt_folder
StatusCode initialize(bool used=true)
std::vector< std::string > m_tagt0
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
#define ATH_MSG_WARNING(x)
std::ostringstream m_data_string
StatusCode execute()
execute function NOTE: This will read all events at once
bool StoreRtChamber(const NtupleStationId &id, const std::map< int, SamplePoint > &points, const std::string &file, unsigned int creation_flags=0)
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
bool StartT0Chamber(const NtupleStationId &sid)
std::string description
glabal timer - how long have I taken so far?
CoolInserter(const std::string &name, ISvcLocator *pSvcLocator)