|
ATLAS Offline Software
|
#include <CscCondDbAlg.h>
|
| CscCondDbAlg (const std::string &name, ISvcLocator *svc) |
|
virtual | ~CscCondDbAlg ()=default |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute (const EventContext &) const override |
|
virtual bool | isReEntrant () const override |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. More...
|
|
virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
|
virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
virtual bool | filterPassed (const EventContext &ctx) const |
|
virtual void | setFilterPassed (bool state, const EventContext &ctx) const |
|
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 |
|
|
StatusCode | loadDataHv (writeHandle_t &, CscCondDbData *, const EventContext &) const |
|
StatusCode | loadData (CscCondDbData *, const CondAttrListCollection *, const std::string &, bool=false) const |
|
StatusCode | loadDataF001 (writeHandle_t &, CscCondDbData *, const EventContext &) const |
|
StatusCode | loadDataNoise (writeHandle_t &, CscCondDbData *, const EventContext &) const |
|
StatusCode | loadDataPed (writeHandle_t &, CscCondDbData *, const EventContext &) const |
|
StatusCode | loadDataPSlope (writeHandle_t &, CscCondDbData *, const EventContext &) const |
|
StatusCode | loadDataRMS (writeHandle_t &, CscCondDbData *, const EventContext &) const |
|
StatusCode | loadDataStatus (writeHandle_t &, CscCondDbData *, const EventContext &) const |
|
StatusCode | loadDataT0Base (writeHandle_t &, CscCondDbData *, const EventContext &) const |
|
StatusCode | loadDataT0Phase (writeHandle_t &, CscCondDbData *, const EventContext &) const |
|
StatusCode | cache (const std::string &, CscCondDbData *, const std::string &) const |
|
StatusCode | cacheASM (const std::string &, CscCondDbData *, const std::string &) const |
|
StatusCode | getAsmScope (int, int &, int &, int &, int &, int &) const |
|
StatusCode | recordParameter (unsigned int, const std::string &, CscCondDbData *, const std::string &) const |
|
StatusCode | recordParameter (IdentifierHash, const std::string &, CscCondDbData *, const std::string &) const |
|
StatusCode | recordParameterF001 (IdentifierHash, std::string, CscCondDbData *) const |
|
StatusCode | recordParameterNoise (IdentifierHash, std::string, CscCondDbData *) const |
|
StatusCode | recordParameterPed (IdentifierHash, std::string, CscCondDbData *) const |
|
StatusCode | recordParameterPSlope (IdentifierHash, std::string, CscCondDbData *) const |
|
StatusCode | recordParameterRMS (IdentifierHash, std::string, CscCondDbData *) const |
|
StatusCode | recordParameterStatus (IdentifierHash, std::string, CscCondDbData *) const |
|
StatusCode | recordParameterT0Base (IdentifierHash, std::string, CscCondDbData *) const |
|
StatusCode | recordParameterT0Phase (IdentifierHash, std::string, CscCondDbData *) const |
|
template<typename T > |
StatusCode | getParameter (IdentifierHash chanHash, std::string data, T &token) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
Gaudi::Property< bool > | m_isOnline {this, "isOnline", false, ""} |
|
Gaudi::Property< bool > | m_isData {this, "isData", false, ""} |
|
Gaudi::Property< bool > | m_isRun1 {this, "isRun1", false, ""} |
|
Gaudi::Property< bool > | m_onlineOfflinePhiFlip {this, "onlineOfflinePhiFlip", true, ""} |
|
Gaudi::Property< std::string > | m_defaultDatabaseReadVersion {this, "defaultDatabaseReadVersion", "02-00", ""} |
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
SG::WriteCondHandleKey< CscCondDbData > | m_writeKey {this, "WriteKey", "CscCondDbData", "Key of output CSC condition data"} |
|
SG::ReadCondHandleKey< CondAttrListCollection > | m_readKey_folder_da_hv |
|
SG::ReadCondHandleKey< CondAttrListCollection > | m_readKey_folder_da_f001 |
|
SG::ReadCondHandleKey< CondAttrListCollection > | m_readKey_folder_da_noise |
|
SG::ReadCondHandleKey< CondAttrListCollection > | m_readKey_folder_da_ped |
|
SG::ReadCondHandleKey< CondAttrListCollection > | m_readKey_folder_da_pslope |
|
SG::ReadCondHandleKey< CondAttrListCollection > | m_readKey_folder_da_rms |
|
SG::ReadCondHandleKey< CondAttrListCollection > | m_readKey_folder_da_status |
|
SG::ReadCondHandleKey< CondAttrListCollection > | m_readKey_folder_da_t0base |
|
SG::ReadCondHandleKey< CondAttrListCollection > | m_readKey_folder_da_t0phase |
|
Gaudi::Property< bool > | m_pslopeFromDB |
| The pslope is the gain of each CSC channel. More...
|
|
const float | m_DEFAULT_PSLOPE = 0.175 |
| The CSC gain was originally 5.304 ADC counts per fC, but later increased to 5.7 ADC counts per fC, so the pslope equals 1/5.7 = 0.175438. More...
|
|
Gaudi::Property< float > | m_pslope |
|
DataObjIDColl | m_extendedExtraObjects |
| Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
|
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Definition at line 27 of file CscCondDbAlg.h.
◆ StoreGateSvc_t
◆ writeHandle_t
◆ CscCondDbAlg()
CscCondDbAlg::CscCondDbAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svc |
|
) |
| |
◆ ~CscCondDbAlg()
virtual CscCondDbAlg::~CscCondDbAlg |
( |
| ) |
|
|
virtualdefault |
◆ cache()
StatusCode CscCondDbAlg::cache |
( |
const std::string & |
data, |
|
|
CscCondDbData * |
writeCdo, |
|
|
const std::string & |
parName |
|
) |
| const |
|
private |
Definition at line 291 of file CscCondDbAlg.cxx.
292 std::istringstream
ss(
data);
293 std::string valueStr;
294 unsigned int chanAddress = 0;
296 bool started =
false;
300 if (valueStr ==
"<END_DATA>")
break;
302 if (valueStr ==
"<BEGIN_DATA>") {
306 if (!started)
continue;
308 std::istringstream iss(valueStr);
311 if (chanAddress == 0) {
312 iss >> std::hex >> chanAddress;
323 return StatusCode::SUCCESS;
◆ cacheASM()
StatusCode CscCondDbAlg::cacheASM |
( |
const std::string & |
data, |
|
|
CscCondDbData * |
writeCdo, |
|
|
const std::string & |
parName |
|
) |
| const |
|
private |
Definition at line 326 of file CscCondDbAlg.cxx.
327 std::istringstream
ss(
data);
328 std::string valueStr;
329 std::string chanAddress;
330 bool setAddress =
false;
332 bool started =
false;
336 if (valueStr ==
"<END_DATA>")
break;
338 if (valueStr ==
"<BEGIN_DATA>") {
342 if (!started)
continue;
344 std::istringstream iss(valueStr);
356 int asmNum =
atoi(chanAddress.substr(3, 1).c_str());
359 if (chanAddress[5] ==
'A')
361 else if (chanAddress[5] ==
'C')
364 ATH_MSG_FATAL(
"Bad ASMID String in CSC COOL database \"" << chanAddress <<
"\" (wheel " << chanAddress[5] <<
" doesn't exist!");
365 return StatusCode::FAILURE;
371 if (stationPhi < 1 || stationPhi > 8 || stationName < 50 || stationName > 51) {
372 ATH_MSG_FATAL(
"Bad ASMID String in CSC COOL database: \"" << chanAddress <<
"\"");
374 return StatusCode::FAILURE;
377 int chamberLayer = 2;
384 if (!
getAsmScope(asmNum, measuresPhi, layerSince, layerUntil, stripSince, stripUntil).isSuccess()) {
386 return StatusCode::FAILURE;
390 unsigned int index = 0;
393 for (
int iStrip = stripSince; iStrip < stripUntil; iStrip++) {
394 for (
int iLayer = layerSince; iLayer < layerUntil; iLayer++) {
402 static std::atomic<bool> conversionFailPrinted =
false;
404 if (!conversionFailPrinted.load()) {
406 "Failed to retrieve offline identifier from ASM cool "
409 <<
". This is likely due to the fact that the CSCCool "
411 <<
"more entries than the detector layout.");
412 conversionFailPrinted.store(
true);
416 if (
m_idHelperSvc->cscIdHelper().get_channel_hash(chanId, hashIdentifier)) {
420 if (
index == UINT_MAX)
continue;
424 <<
"\nchamberLayer " << chamberLayer <<
"\niLayer " << iLayer
425 <<
"\nmeasuresPhi " << measuresPhi <<
"\niStrip " << iStrip);
437 return StatusCode::SUCCESS;
◆ cardinality()
unsigned int AthReentrantAlgorithm::cardinality |
( |
| ) |
const |
|
overridevirtualinherited |
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 55 of file AthReentrantAlgorithm.cxx.
◆ 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);
◆ 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.
◆ 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.
◆ 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 CscCondDbAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
Definition at line 53 of file CscCondDbAlg.cxx.
58 if (writeHandle.isValid()) {
59 ATH_MSG_DEBUG(
"CondHandle " << writeHandle.fullKey() <<
" is already valid."
60 <<
" In theory this should not be called, but may happen"
61 <<
" if multiple concurrent events are being processed out of order.");
62 return StatusCode::SUCCESS;
64 std::unique_ptr<CscCondDbData> writeCdo{std::make_unique<CscCondDbData>()};
87 if (writeHandle.record(std::move(writeCdo)).isFailure()) {
88 ATH_MSG_FATAL(
"Could not record CscCondDbData " << writeHandle.key() <<
" with EventRange " << writeHandle.getRange()
89 <<
" into Conditions Store");
90 return StatusCode::FAILURE;
92 ATH_MSG_DEBUG(
"Recorded new " << writeHandle.key() <<
" with range " << writeHandle.getRange() <<
" into Conditions Store");
94 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 & AthReentrantAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 79 of file AthReentrantAlgorithm.cxx.
86 return Algorithm::extraOutputDeps();
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ getAsmScope()
StatusCode CscCondDbAlg::getAsmScope |
( |
int |
asmNum, |
|
|
int & |
measuresPhi, |
|
|
int & |
layerSince, |
|
|
int & |
layerUntil, |
|
|
int & |
stripSince, |
|
|
int & |
stripUntil |
|
) |
| const |
|
private |
Definition at line 441 of file CscCondDbAlg.cxx.
451 }
else if (asmNum == 2) {
457 }
else if (asmNum == 3) {
463 }
else if (asmNum == 4) {
469 }
else if (asmNum == 5) {
476 ATH_MSG_FATAL(
"ASM number \"" << asmNum <<
"\" is invalid. It needs to end in a number from 1-5.");
477 return StatusCode::FAILURE;
479 return StatusCode::SUCCESS;
◆ getParameter()
template<typename T >
StatusCode CscCondDbAlg::getParameter |
( |
IdentifierHash |
chanHash, |
|
|
std::string |
data, |
|
|
T & |
token |
|
) |
| const |
|
inlineprivate |
Definition at line 115 of file CscCondDbAlg.h.
117 std::istringstream iss(
data);
120 ATH_MSG_VERBOSE(
"Recorded token " << token <<
" for channelHash " << chanHash);
121 return StatusCode::SUCCESS;
◆ initialize()
StatusCode CscCondDbAlg::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 18 of file CscCondDbAlg.cxx.
24 ATH_MSG_WARNING(
"You have activated the retrieval of the pslope per CSC channel from the COOL database. "
25 <<
"Please make sure that a correct PSLOPE database is in place which uses geometrical CSC hashes in hex format "
26 <<
"as keys and different values of the pslopes for the different CSC channels as values, otherwise please run "
27 <<
"with the ReadPSlopeFromDatabase property set to false");
30 if (!(pslope > 0 && pslope < 1)) {
31 ATH_MSG_FATAL(
"The Pslope cannot be set to a value <=0 or >=1");
32 return StatusCode::FAILURE;
35 <<
"). Please check whether this is really intended.");
49 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.
◆ isClonable()
bool AthReentrantAlgorithm::isClonable |
( |
| ) |
const |
|
overridevirtualinherited |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, InDet::SiSPGNNTrackMaker, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ isReEntrant()
virtual bool CscCondDbAlg::isReEntrant |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ loadData()
Definition at line 234 of file CscCondDbAlg.cxx.
238 for (itr = readCdo->
begin(); itr != readCdo->
end(); ++itr) {
240 std::string
data = atr[
"Data"].data<std::string>();
243 std::istringstream
ss(
data);
253 if (
version ==
"02-00" && parAsm) {
255 ATH_MSG_ERROR(
"Failed caching from COOL string version 02-00 in ASM format");
256 return StatusCode::FAILURE;
258 }
else if (
version ==
"02-00") {
260 ATH_MSG_ERROR(
"Failed caching from COOL string version 02-00");
261 return StatusCode::FAILURE;
266 ATH_MSG_WARNING(
"Don't recognize CSC COOL string version " <<
version <<
". Will treat as default version "
270 ATH_MSG_ERROR(
"Failed caching from COOL string version 02-00 in ASM format");
271 return StatusCode::FAILURE;
275 ATH_MSG_ERROR(
"Failed caching from COOL string version 02-00");
276 return StatusCode::FAILURE;
281 <<
". Currently, only version 02-00 is supported. The keys of the database have to be geometrical CSC hashes "
283 return StatusCode::FAILURE;
288 return StatusCode::SUCCESS;
◆ loadDataF001()
Definition at line 178 of file CscCondDbAlg.cxx.
180 writeHandle.addDependency(readHandle);
181 return loadData(writeCdo, *readHandle,
"f001");
◆ loadDataHv()
Definition at line 98 of file CscCondDbAlg.cxx.
101 if (readCdo ==
nullptr) {
103 return StatusCode::FAILURE;
105 writeHandle.addDependency(readHandle);
107 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandle.fullKey() <<
" readCdo->size()= " << readCdo->size());
108 ATH_MSG_DEBUG(
"Range of input is " << readHandle.getRange() <<
", range of output is " << writeHandle.getRange());
111 std::map<Identifier, int> layerMap;
112 int hv_state, lv_state, hv_setpoint0, hv_setpoint1;
113 unsigned int chan_index = 0;
114 for (itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
115 unsigned int chanNum = readCdo->chanNum(chan_index);
116 const std::string& csc_chan_name = readCdo->chanName(
chanNum);
121 hv_state = *(
static_cast<const int*
>((atr[
"HVState"]).addressOfData()));
122 lv_state = *(
static_cast<const int*
>((atr[
"LVState"]).addressOfData()));
123 hv_setpoint0 = *(
static_cast<const int*
>((atr[
"HVSetpoint0"]).addressOfData()));
124 hv_setpoint1 = *(
static_cast<const int*
>((atr[
"HVSetpoint1"]).addressOfData()));
129 if ((hv_state != 1 or lv_state != 1 or hv_setpoint0 < 1000 or hv_setpoint1 < 1000) && !
tokens.empty()) {
131 std::string number_layer =
tokens[1].substr(1, 2);
135 char eta_side =
tokens[0][0];
136 if (eta_side ==
'A')
eta = +1;
137 if (eta_side ==
'C')
eta = -1;
140 char size_side =
tokens[0][1];
145 std::string sector_side =
tokens[0].substr(2, 4);
146 if (sector_side ==
"01" || sector_side ==
"02")
phi = 1;
147 else if (sector_side ==
"03" || sector_side ==
"04")
phi = 2;
148 else if (sector_side ==
"05" || sector_side ==
"06")
phi = 3;
149 else if (sector_side ==
"07" || sector_side ==
"08")
phi = 4;
150 else if (sector_side ==
"09" || sector_side ==
"10")
phi = 5;
151 else if (sector_side ==
"11" || sector_side ==
"12")
phi = 6;
152 else if (sector_side ==
"13" || sector_side ==
"14")
phi = 7;
153 else if (sector_side ==
"15" || sector_side ==
"16")
phi = 8;
157 std::string WireLayerstring = std::string(
chamber_name);
158 WireLayerstring +=
'_';
159 WireLayerstring += eta_side;
160 WireLayerstring +=
'_';
161 WireLayerstring += sector_side;
162 WireLayerstring +=
'_';
163 WireLayerstring +=
layer;
166 int& mapval = layerMap[ChamberId];
174 return StatusCode::SUCCESS;
◆ loadDataNoise()
Definition at line 185 of file CscCondDbAlg.cxx.
187 writeHandle.addDependency(readHandle);
188 return loadData(writeCdo, *readHandle,
"noise");
◆ loadDataPed()
Definition at line 192 of file CscCondDbAlg.cxx.
194 writeHandle.addDependency(readHandle);
195 return loadData(writeCdo, *readHandle,
"ped");
◆ loadDataPSlope()
Definition at line 199 of file CscCondDbAlg.cxx.
201 writeHandle.addDependency(readHandle);
202 return loadData(writeCdo, *readHandle,
"pslope");
◆ loadDataRMS()
Definition at line 206 of file CscCondDbAlg.cxx.
208 writeHandle.addDependency(readHandle);
209 return loadData(writeCdo, *readHandle,
"rms");
◆ loadDataStatus()
Definition at line 213 of file CscCondDbAlg.cxx.
215 writeHandle.addDependency(readHandle);
216 return loadData(writeCdo, *readHandle,
"status");
◆ loadDataT0Base()
Definition at line 220 of file CscCondDbAlg.cxx.
222 writeHandle.addDependency(readHandle);
223 return loadData(writeCdo, *readHandle,
"t0base");
◆ loadDataT0Phase()
Definition at line 227 of file CscCondDbAlg.cxx.
229 writeHandle.addDependency(readHandle);
230 return loadData(writeCdo, *readHandle,
"t0phase",
true);
◆ 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.
◆ recordParameter() [1/2]
◆ recordParameter() [2/2]
StatusCode CscCondDbAlg::recordParameter |
( |
unsigned int |
chanAddress, |
|
|
const std::string & |
data, |
|
|
CscCondDbData * |
writeCdo, |
|
|
const std::string & |
parName |
|
) |
| const |
|
private |
Definition at line 483 of file CscCondDbAlg.cxx.
491 return StatusCode::SUCCESS;
496 ATH_MSG_WARNING(
"recordParameter(): Failed to retrieve channel Identifier hash for Identifier " <<
channelId.get_compact()
497 <<
". Not recording parameter...");
498 return StatusCode::SUCCESS;
◆ recordParameterF001()
Definition at line 533 of file CscCondDbAlg.cxx.
535 if (
getParameter(chanHash, std::move(
data), token).isFailure())
return StatusCode::FAILURE;
537 return StatusCode::SUCCESS;
◆ recordParameterNoise()
Definition at line 541 of file CscCondDbAlg.cxx.
543 if (
getParameter(chanHash, std::move(
data), token).isFailure())
return StatusCode::FAILURE;
545 return StatusCode::SUCCESS;
◆ recordParameterPed()
Definition at line 549 of file CscCondDbAlg.cxx.
551 if (
getParameter(chanHash, std::move(
data), token).isFailure())
return StatusCode::FAILURE;
553 return StatusCode::SUCCESS;
◆ recordParameterPSlope()
Definition at line 557 of file CscCondDbAlg.cxx.
560 if (
getParameter(chanHash, std::move(
data), token).isFailure())
return StatusCode::FAILURE;
566 return StatusCode::SUCCESS;
◆ recordParameterRMS()
Definition at line 570 of file CscCondDbAlg.cxx.
572 if (
getParameter(chanHash, std::move(
data), token).isFailure())
return StatusCode::FAILURE;
574 return StatusCode::SUCCESS;
◆ recordParameterStatus()
Definition at line 578 of file CscCondDbAlg.cxx.
580 if (
getParameter(chanHash, std::move(
data), token).isFailure())
return StatusCode::FAILURE;
582 return StatusCode::SUCCESS;
◆ recordParameterT0Base()
Definition at line 586 of file CscCondDbAlg.cxx.
588 if (
getParameter(chanHash, std::move(
data), token).isFailure())
return StatusCode::FAILURE;
590 return StatusCode::SUCCESS;
◆ recordParameterT0Phase()
Definition at line 594 of file CscCondDbAlg.cxx.
596 if (
getParameter(chanHash, std::move(
data), token).isFailure())
return StatusCode::FAILURE;
598 return StatusCode::SUCCESS;
◆ renounce()
◆ renounceArray()
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ sysExecute()
StatusCode AthReentrantAlgorithm::sysExecute |
( |
const EventContext & |
ctx | ) |
|
|
overridevirtualinherited |
Execute an algorithm.
We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.
Definition at line 67 of file AthReentrantAlgorithm.cxx.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ sysInitialize()
StatusCode AthReentrantAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.
Reimplemented in InputMakerBase, and HypoBase.
Definition at line 96 of file AthReentrantAlgorithm.cxx.
107 if ( cs.retrieve().isFailure() ) {
109 return StatusCode::SUCCESS;
111 if (cs->regHandle(
this,*
h).isFailure()) {
112 sc = StatusCode::FAILURE;
113 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ 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_DEFAULT_PSLOPE
const float CscCondDbAlg::m_DEFAULT_PSLOPE = 0.175 |
|
private |
The CSC gain was originally 5.304 ADC counts per fC, but later increased to 5.7 ADC counts per fC, so the pslope equals 1/5.7 = 0.175438.
Definition at line 110 of file CscCondDbAlg.h.
◆ m_defaultDatabaseReadVersion
Gaudi::Property<std::string> CscCondDbAlg::m_defaultDatabaseReadVersion {this, "defaultDatabaseReadVersion", "02-00", ""} |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects |
|
privateinherited |
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 153 of file AthReentrantAlgorithm.h.
◆ m_idHelperSvc
◆ m_isData
Gaudi::Property<bool> CscCondDbAlg::m_isData {this, "isData", false, ""} |
|
private |
◆ m_isOnline
Gaudi::Property<bool> CscCondDbAlg::m_isOnline {this, "isOnline", false, ""} |
|
private |
◆ m_isRun1
Gaudi::Property<bool> CscCondDbAlg::m_isRun1 {this, "isRun1", false, ""} |
|
private |
◆ m_onlineOfflinePhiFlip
Gaudi::Property<bool> CscCondDbAlg::m_onlineOfflinePhiFlip {this, "onlineOfflinePhiFlip", true, ""} |
|
private |
◆ m_pslope
Gaudi::Property<float> CscCondDbAlg::m_pslope |
|
private |
Initial value:
"in case someone comes up with a new default value for pslope in the future"}
Definition at line 111 of file CscCondDbAlg.h.
◆ m_pslopeFromDB
Gaudi::Property<bool> CscCondDbAlg::m_pslopeFromDB |
|
private |
Initial value:{
this, "ReadPSlopeFromDatabase", false,
"read the pslope parameter from the conditions database (if it is not the same value for all channels)"}
The pslope is the gain of each CSC channel.
It was intended to be retrieved by calibration with the pulser runs, but the pulses caused overload in the amplifiers because every channel fires at once. This leads to errors that are larger than the variation between channels. Consequently, the pslope is the same for all channels. In the future, one could try to calibrate from data. The support for the pslope in the database is maintained by having a boolean property ReadPSlopeFromDatabase. If it is set to false, the value of the property PSlope is used for all channels.
Definition at line 103 of file CscCondDbAlg.h.
◆ m_readKey_folder_da_f001
Initial value:{this, "ReadKey_FT", "/CSC/FTHOLD",
"Key of input CSC condition data F001"}
Definition at line 79 of file CscCondDbAlg.h.
◆ m_readKey_folder_da_hv
Initial value:{this, "ReadKey_HV", "/CSC/DCS/LAYERSTATE",
"Key of input CSC condition data HV"}
Definition at line 77 of file CscCondDbAlg.h.
◆ m_readKey_folder_da_noise
Initial value:{this, "ReadKey_NO", "/CSC/NOISE",
"Key of input CSC condition data NOISE"}
Definition at line 81 of file CscCondDbAlg.h.
◆ m_readKey_folder_da_ped
Initial value:{this, "ReadKey_PD", "/CSC/PED",
"Key of input CSC condition data PEDESTALS"}
Definition at line 83 of file CscCondDbAlg.h.
◆ m_readKey_folder_da_pslope
Initial value:{this, "ReadKey_PS", "/CSC/PSLOPE",
"Key of input CSC condition data PSLOPE"}
Definition at line 85 of file CscCondDbAlg.h.
◆ m_readKey_folder_da_rms
Initial value:{this, "ReadKey_RM", "/CSC/RMS",
"Key of input CSC condition data RMS"}
Definition at line 87 of file CscCondDbAlg.h.
◆ m_readKey_folder_da_status
Initial value:{this, "ReadKey_ST", "/CSC/STAT",
"Key of input CSC condition data STATUS"}
Definition at line 89 of file CscCondDbAlg.h.
◆ m_readKey_folder_da_t0base
Initial value:{this, "ReadKey_TB", "/CSC/T0BASE",
"Key of input CSC condition data T0BASE"}
Definition at line 91 of file CscCondDbAlg.h.
◆ m_readKey_folder_da_t0phase
Initial value:{this, "ReadKey_TP", "/CSC/T0PHASE",
"Key of input CSC condition data T0PHASE"}
Definition at line 93 of file CscCondDbAlg.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_writeKey
The documentation for this class was generated from the following files:
char data[hepevt_bytes_allocation_ATLAS]
constexpr uint8_t stationPhi
station Phi 1 to 8
const_iterator end() const
StatusCode recordParameterT0Phase(IdentifierHash, std::string, CscCondDbData *) const
Scalar phi() const
phi method
StatusCode recordParameter(unsigned int, const std::string &, CscCondDbData *, const std::string &) const
StatusCode loadDataF001(writeHandle_t &, CscCondDbData *, const EventContext &) const
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_folder_da_t0base
Scalar eta() const
pseudorapidity method
void setChannelNoise(IdentifierHash, float)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< std::string > tokenize(const std::string &the_str, std::string_view delimiters)
Splits the string into smaller substrings.
Gaudi::Property< bool > m_isOnline
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
value_type get_compact() const
Get the compact id.
void setChannelPSlope(IdentifierHash, float)
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
StatusCode recordParameterT0Base(IdentifierHash, std::string, CscCondDbData *) const
#define ATH_MSG_VERBOSE(x)
StatusCode recordParameterPed(IdentifierHash, std::string, CscCondDbData *) const
bool empty() const
Test if the key is blank.
This class is a collection of AttributeLists where each one is associated with a channel number....
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_folder_da_ped
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_folder_da_hv
StatusCode loadDataPSlope(writeHandle_t &, CscCondDbData *, const EventContext &) const
Gaudi::Property< bool > m_onlineOfflinePhiFlip
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Gaudi::Property< float > m_pslope
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_folder_da_noise
StatusCode recordParameterRMS(IdentifierHash, std::string, CscCondDbData *) const
Gaudi::Property< bool > m_isData
void setChannelRMS(IdentifierHash, float)
AthReentrantAlgorithm()
Default constructor:
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
void setChannelPed(IdentifierHash, float)
Gaudi::Property< bool > m_pslopeFromDB
The pslope is the gain of each CSC channel.
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::WriteCondHandleKey< CscCondDbData > m_writeKey
StatusCode loadDataRMS(writeHandle_t &, CscCondDbData *, const EventContext &) const
StatusCode loadDataNoise(writeHandle_t &, CscCondDbData *, const EventContext &) const
StatusCode cache(const std::string &, CscCondDbData *, const std::string &) const
void setChannelT0Phase(IdentifierHash, bool)
void setChannelStatus(IdentifierHash, int)
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_folder_da_pslope
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
void setDeadStation(std::string_view, Identifier)
StatusCode cacheASM(const std::string &, CscCondDbData *, const std::string &) const
void setDeadLayer(std::string_view, Identifier)
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StatusCode loadDataStatus(writeHandle_t &, CscCondDbData *, const EventContext &) const
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
StatusCode loadDataPed(writeHandle_t &, CscCondDbData *, const EventContext &) const
StatusCode getParameter(IdentifierHash chanHash, std::string data, T &token) const
virtual StatusCode sysInitialize() override
Override sysInitialize.
StatusCode initialize(bool used=true)
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_folder_da_f001
StatusCode loadData(CscCondDbData *, const CondAttrListCollection *, const std::string &, bool=false) const
void setChannelF001(IdentifierHash, float)
StatusCode recordParameterF001(IdentifierHash, std::string, CscCondDbData *) const
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_folder_da_t0phase
StatusCode getAsmScope(int, int &, int &, int &, int &, int &) const
StatusCode onlineToOfflineIds(const CscIdHelper *, const unsigned int &, Identifier &, Identifier &) const
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_folder_da_status
#define ATH_MSG_WARNING(x)
ChanAttrListMap::const_iterator const_iterator
StatusCode recordParameterNoise(IdentifierHash, std::string, CscCondDbData *) const
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_folder_da_rms
StatusCode recordParameterStatus(IdentifierHash, std::string, CscCondDbData *) const
const float m_DEFAULT_PSLOPE
The CSC gain was originally 5.304 ADC counts per fC, but later increased to 5.7 ADC counts per fC,...
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
StatusCode loadDataT0Phase(writeHandle_t &, CscCondDbData *, const EventContext &) const
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Gaudi::Property< std::string > m_defaultDatabaseReadVersion
constexpr uint8_t stationEta
1 to 3
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
StatusCode recordParameterPSlope(IdentifierHash, std::string, CscCondDbData *) const
StatusCode loadDataT0Base(writeHandle_t &, CscCondDbData *, const EventContext &) const
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
void setChannelT0Base(IdentifierHash, float)