|
ATLAS Offline Software
|
#include <CoolInserter.h>
|
| CoolInserter (const std::string &name, ISvcLocator *pSvcLocator) |
|
| ~CoolInserter ()=default |
|
StatusCode | initialize () |
| Is called at the beginning of the analysis. More...
|
|
StatusCode | execute () |
| execute function NOTE: This will read all events at once More...
|
|
StatusCode | finalize () |
| finalize functions More...
|
|
bool | CoolConnect (const std::string &connection_string, const std::string &tag_t0) |
|
bool | StartT0Chamber (const NtupleStationId &sid) |
|
bool | AppendT0 (float t0, int validflag, float adc0) |
|
bool | StoreT0Chamber (const NtupleStationId &id, const std::string &file, unsigned int creation_flags=0) |
|
bool | StoreRtChamber (const NtupleStationId &id, const std::map< int, SamplePoint > &points, const std::string &file, unsigned int creation_flags=0) |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Definition at line 32 of file CoolInserter.h.
◆ StoreGateSvc_t
◆ CoolInserter()
MuonCalib::CoolInserter::CoolInserter |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~CoolInserter()
MuonCalib::CoolInserter::~CoolInserter |
( |
| ) |
|
|
inlinedefault |
◆ AppendT0()
bool MuonCalib::CoolInserter::AppendT0 |
( |
float |
t0, |
|
|
int |
validflag, |
|
|
float |
adc0 |
|
) |
| |
◆ CoolConnect()
bool MuonCalib::CoolInserter::CoolConnect |
( |
const std::string & |
connection_string, |
|
|
const std::string & |
tag_t0 |
|
) |
| |
◆ create_folder()
bool MuonCalib::CoolInserter::create_folder |
( |
const unsigned int & |
fldr_nr, |
|
|
const bool & |
is_rt |
|
) |
| |
|
inlineprivate |
Definition at line 319 of file CoolInserter.cxx.
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);
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode MuonCalib::CoolInserter::execute |
( |
| ) |
|
execute function NOTE: This will read all events at once
Definition at line 143 of file CoolInserter.cxx.
149 return StatusCode::FAILURE;
152 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode MuonCalib::CoolInserter::finalize |
( |
| ) |
|
finalize functions
Definition at line 131 of file CoolInserter.cxx.
138 return StatusCode::FAILURE;
140 return StatusCode::SUCCESS;
◆ initialize()
StatusCode MuonCalib::CoolInserter::initialize |
( |
| ) |
|
Is called at the beginning of the analysis.
Definition at line 64 of file CoolInserter.cxx.
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;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ StartT0Chamber()
Definition at line 155 of file CoolInserter.cxx.
162 if (MuonDetMgr ==
nullptr) {
163 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object");
◆ StoreRtChamber()
Definition at line 250 of file CoolInserter.cxx.
253 MuonFixedId fid(
id.FixedId());
256 NtupleStationId id_cp(
id);
258 for (
int i = 0;
i < 3;
i++) {
259 id_cp.SetMultilayer(
i);
262 if (
id.GetMl() == 0) {
264 if (
found[1]) { id_cp.SetMultilayer(2); }
265 if (
found[2]) { id_cp.SetMultilayer(1); }
266 if (!
found[1] && !
found[2]) { id_cp.SetMultilayer(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();
◆ StoreT0Chamber()
bool MuonCalib::CoolInserter::StoreT0Chamber |
( |
const NtupleStationId & |
id, |
|
|
const std::string & |
file, |
|
|
unsigned int |
creation_flags = 0 |
|
) |
| |
Definition at line 193 of file CoolInserter.cxx.
194 MuonFixedId fid(
id.FixedId());
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);
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_app
cool::Application MuonCalib::CoolInserter::m_app |
|
private |
◆ m_aver_adc
float MuonCalib::CoolInserter::m_aver_adc |
|
private |
◆ m_aver_t0
float MuonCalib::CoolInserter::m_aver_t0 |
|
private |
◆ m_calibration_sources
◆ m_compressed_rt
std::vector<bool> MuonCalib::CoolInserter::m_compressed_rt |
|
private |
◆ m_compressed_t0
std::vector<bool> MuonCalib::CoolInserter::m_compressed_t0 |
|
private |
◆ m_cool_connect
bool MuonCalib::CoolInserter::m_cool_connect |
|
private |
◆ m_cool_connection_string
std::string MuonCalib::CoolInserter::m_cool_connection_string |
|
private |
◆ m_data_string
std::ostringstream MuonCalib::CoolInserter::m_data_string |
|
private |
◆ m_db
cool::IDatabasePtr MuonCalib::CoolInserter::m_db |
|
private |
◆ m_DetectorManagerKey
Initial value:{this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}
Definition at line 87 of file CoolInserter.h.
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_idHelperSvc
◆ m_iov_end
int MuonCalib::CoolInserter::m_iov_end = 0 |
|
private |
◆ m_iov_start
int MuonCalib::CoolInserter::m_iov_start = 0 |
|
private |
◆ m_iovt_end
long long MuonCalib::CoolInserter::m_iovt_end |
|
private |
◆ m_iovt_start
long long MuonCalib::CoolInserter::m_iovt_start |
|
private |
◆ m_mdtrt_cool_row
std::map<bool, coral::AttributeList> MuonCalib::CoolInserter::m_mdtrt_cool_row |
|
private |
◆ m_mdtrt_fld
std::vector<cool::IFolderPtr> MuonCalib::CoolInserter::m_mdtrt_fld |
|
private |
◆ m_mdtt0_cool_row
std::map<bool, coral::AttributeList> MuonCalib::CoolInserter::m_mdtt0_cool_row |
|
private |
◆ m_mdtt0_fld
std::vector<cool::IFolderPtr> MuonCalib::CoolInserter::m_mdtt0_fld |
|
private |
◆ m_n_tubes_added
int MuonCalib::CoolInserter::m_n_tubes_added |
|
private |
◆ m_n_tubes_chamber
int MuonCalib::CoolInserter::m_n_tubes_chamber |
|
private |
◆ m_reg_sel_svc
◆ m_rt_created
bool MuonCalib::CoolInserter::m_rt_created |
|
private |
◆ m_rt_filled
◆ m_rt_folder
std::vector<std::string> MuonCalib::CoolInserter::m_rt_folder |
|
private |
◆ m_sid
◆ m_t0_created
bool MuonCalib::CoolInserter::m_t0_created |
|
private |
◆ m_t0_filled
◆ m_t0_folder
std::vector<std::string> MuonCalib::CoolInserter::m_t0_folder |
|
private |
◆ m_tagrt
std::vector<std::string> MuonCalib::CoolInserter::m_tagrt |
|
private |
◆ m_tagt0
std::vector<std::string> MuonCalib::CoolInserter::m_tagt0 |
|
private |
◆ m_varHandleArraysDeclared
◆ m_version
std::string MuonCalib::CoolInserter::m_version |
|
private |
◆ m_vhka
The documentation for this class was generated from the following files:
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
std::vector< ALFA_RawData_p1 > t0
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
std::set< NtupleStationId > m_t0_filled
virtual void setOwner(IDataHandleHolder *o)=0
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)
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< cool::IFolderPtr > m_mdtrt_fld
static constexpr uint64_t MAXTIMESTAMP
ServiceHandle< RegionSelectionSvc > m_reg_sel_svc
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
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
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
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)
DataObjIDColl m_extendedExtraObjects
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
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
std::string description
glabal timer - how long have I taken so far?