|
ATLAS Offline Software
|
Go to the documentation of this file.
14 m_completeCaliPulseParams(nullptr), m_completeDetCellParams(nullptr), m_completePhysCaliTdiff(nullptr),
15 m_completeTdrift(nullptr), m_completeMphysOverMcal(nullptr), m_completeRinj(nullptr), m_completeTshaper(nullptr),
16 m_completeEMEC_Cphi(nullptr), m_completeEMEC_HValpha(nullptr), m_completeEMEC_HVbeta(nullptr),
17 m_completeCableLength(nullptr), m_completeCableAttenuation(nullptr),
18 m_completeOFCBin(nullptr)
49 ATH_MSG_FATAL(
"List of class names does not match foreseen number of classes, cannot go on!" ) ;
50 return StatusCode::FAILURE ;
58 return StatusCode::FAILURE ;
67 ATH_MSG_INFO(
"All parameters will be accessed through abstract interface" ) ;
69 ATH_MSG_WARNING(
"This will force dumping to Ntuple all foreseen online channels!" ) ;
73 ATH_MSG_INFO(
"All parameters will be accessed through their Complete/VsCalib class" ) ;
76 ATH_MSG_INFO(
"All foreseen online channels will be written to Ntuple" ) ;
78 ATH_MSG_INFO(
"Only channels with sensible parameters will be written to Ntuple (default)" ) ;
90 NTuple::Item<long> ntcellIndex;
91 NTuple::Item<long> ntflag, ntgain;
94 NTuple::Item<double> ntTcal, ntFstep, ntOffset, ntdTimeCal ;
95 NTuple::Item<long> ntnCB ;
97 NTuple::Item<double> ntOmega0, ntTaur ;
99 NTuple::Item<double> ntTdiff, ntTdrift ;
101 NTuple::Item<double> ntMphysOverMcal ;
103 NTuple::Item<double> ntRinj, ntTshaper ;
105 NTuple::Item<double> ntEMEC_Cphi, ntEMEC_HValpha, ntEMEC_HVbeta ;
107 NTuple::Item<double> ntCableLength, ntCableAttenuation ;
109 NTuple::Item<long> ntbin;
112 if (
sc!=StatusCode::SUCCESS) {
114 return StatusCode::FAILURE;
116 sc=
m_nt->addItem(
"gain",ntgain,-1,2);
117 if (
sc!=StatusCode::SUCCESS) {
119 return StatusCode::FAILURE;
123 sc=
m_nt->addItem(
"Tcal",ntTcal);
124 if (
sc!=StatusCode::SUCCESS) {
126 return StatusCode::FAILURE;
128 sc=
m_nt->addItem(
"Fstep",ntFstep);
129 if (
sc!=StatusCode::SUCCESS) {
131 return StatusCode::FAILURE;
133 sc=
m_nt->addItem(
"Offset",ntOffset);
134 if (
sc!=StatusCode::SUCCESS) {
136 return StatusCode::FAILURE;
138 sc=
m_nt->addItem(
"dTimeCal",ntdTimeCal);
139 if (
sc!=StatusCode::SUCCESS) {
141 return StatusCode::FAILURE;
143 sc=
m_nt->addItem(
"nCB",ntnCB);
144 if (
sc!=StatusCode::SUCCESS) {
146 return StatusCode::FAILURE;
151 sc=
m_nt->addItem(
"Omega0",ntOmega0);
152 if (
sc!=StatusCode::SUCCESS) {
154 return StatusCode::FAILURE;
156 sc=
m_nt->addItem(
"Taur",ntTaur);
157 if (
sc!=StatusCode::SUCCESS) {
159 return StatusCode::FAILURE;
164 sc=
m_nt->addItem(
"Tdiff",ntTdiff);
165 if (
sc!=StatusCode::SUCCESS) {
167 return StatusCode::FAILURE;
172 sc=
m_nt->addItem(
"Tdrift",ntTdrift);
173 if (
sc!=StatusCode::SUCCESS) {
175 return StatusCode::FAILURE;
180 sc=
m_nt->addItem(
"MphysOverMcal",ntMphysOverMcal);
181 if (
sc!=StatusCode::SUCCESS) {
183 return StatusCode::FAILURE;
188 sc=
m_nt->addItem(
"Rinj",ntRinj);
189 if (
sc!=StatusCode::SUCCESS) {
191 return StatusCode::FAILURE;
196 sc=
m_nt->addItem(
"Tshaper",ntTshaper);
197 if (
sc!=StatusCode::SUCCESS) {
199 return StatusCode::FAILURE;
204 sc=
m_nt->addItem(
"EMEC_Cphi",ntEMEC_Cphi);
205 if (
sc!=StatusCode::SUCCESS) {
207 return StatusCode::FAILURE;
212 sc=
m_nt->addItem(
"EMEC_HValpha",ntEMEC_HValpha);
213 if (
sc!=StatusCode::SUCCESS) {
215 return StatusCode::FAILURE;
220 sc=
m_nt->addItem(
"EMEC_HVbeta",ntEMEC_HVbeta);
221 if (
sc!=StatusCode::SUCCESS) {
223 return StatusCode::FAILURE;
228 sc=
m_nt->addItem(
"CableLength",ntCableLength);
229 if (
sc!=StatusCode::SUCCESS) {
231 return StatusCode::FAILURE;
236 sc=
m_nt->addItem(
"CableAttenuation",ntCableAttenuation);
237 if (
sc!=StatusCode::SUCCESS) {
239 return StatusCode::FAILURE;
244 sc=
m_nt->addItem(
"OFCBin",ntbin);
245 if (
sc!=StatusCode::SUCCESS) {
247 return StatusCode::FAILURE;
417 HWIdentifier chid = HWIdentifier(
p.first) ;
419 const std::vector<bool> &
flags = (
p.second).
flags() ;
420 if (
flags.empty() )
continue ;
483 if (
sc!=StatusCode::SUCCESS) {
485 return StatusCode::FAILURE;
492 return StatusCode::SUCCESS;
496 template <
class DATA >
504 return StatusCode::FAILURE ;
507 std::string detStoreKey;
517 if ( dataName.substr(dataName.length()-8,8) != std::string(
"Complete") ) {
518 ATH_MSG_ERROR(
"Function scanReadoutChannels cannot be called for data class " << dataName ) ;
519 return StatusCode::FAILURE ;
522 ATH_MSG_VERBOSE(
"Trying to retrieve " << dataName <<
" from detector store with key="<< detStoreKey <<
" ...");
525 if (
sc == StatusCode::FAILURE ) {
530 if (
sc == StatusCode::FAILURE ) {
531 ATH_MSG_ERROR(
"Could not retrieve " << dataName <<
" from detector store!" ) ;
544 typename DATA::ConstConditionsMapIterator
it = data_object->begin(
gain) ;
545 typename DATA::ConstConditionsMapIterator it_e = data_object->end(
gain) ;
546 for ( ;
it!=it_e ;
it++ ) {
548 ATH_MSG_VERBOSE(
" ... channel " << std::hex << chid.get_compact()<< std::dec);
552 flags.set(classIndex) ;
554 for (
unsigned g=0 ;
g<3 ;
g++ ) {
556 flags.set(classIndex) ;
568 template <
class DATA >
575 return StatusCode::FAILURE ;
581 if ( dataName.substr(dataName.length()-7,7) != std::string(
"VsCalib") ) {
582 ATH_MSG_ERROR(
"Function scanCalibChannels cannot be called for data class " << dataName ) ;
583 return StatusCode::FAILURE ;
586 ATH_MSG_VERBOSE(
"Trying to retrieve " << dataName <<
" from detector store with key="<< detStoreKey <<
" ...");
589 if (
sc == StatusCode::FAILURE ) {
594 if (
sc == StatusCode::FAILURE ) {
595 ATH_MSG_ERROR(
"Could not retrieve " << dataName <<
" from detector store!" ) ;
605 typename DATA::Const_CB_It cb_it = data_object->begin() ;
606 typename DATA::Const_CB_It cb_it_e = data_object->end() ;
607 for ( ; cb_it!=cb_it_e ; cb_it++ ) {
608 const typename DATA::CB_Tvec_pair & cb_params_set = *cb_it ;
609 const typename DATA::CB_Id & cb_identifier = cb_params_set.first ;
610 const typename DATA::T_vector & cb_params = cb_params_set.second ;
611 HWIdentifier cb_HWid(cb_identifier) ;
612 unsigned nchan = cb_params.size() ;
618 ATH_MSG_VERBOSE(
" ... B/EC=" << b_ec <<
" P/N=" << p_n <<
" FT=" <<
ft <<
" slot=" << slot
619 <<
" nchan=" <<
nchan ) ;
627 for (
unsigned g=0 ;
g<3 ;
g++ ) {
629 flags.set(classIndex) ;
640 template <
class DATA >
649 return StatusCode::FAILURE ;
655 ATH_MSG_VERBOSE(
"Trying to retrieve " << dataName <<
" from detector store through abstract interface I" << detStoreKey <<
" ...");
657 if (
sc == StatusCode::FAILURE ) {
658 ATH_MSG_WARNING(
"Could not retrieve " << dataName <<
" from detector store!" ) ;
664 ATH_MSG_VERBOSE(
"Trying to retrieve "<<dataName<<
" from detector store with key="<<detStoreKey<<
" ...");
666 if (
sc == StatusCode::FAILURE ) {
670 if (
sc == StatusCode::FAILURE ) {
671 ATH_MSG_WARNING(
"Could not retrieve " << dataName <<
" from detector store!" ) ;
676 ATH_MSG_INFO(dataName <<
" retrieved successfully from det store");
677 return StatusCode::SUCCESS ;
718 const ILArRinj* abstract_object =
nullptr;
bool m_allChannels2Ntuple
This class implements the ILArEMEC_Cphi interface.
const LArCaliPulseParamsComplete * m_completeCaliPulseParams
This class implements the ILArTdrift interface.
virtual const short & nCB(const HWIdentifier &CellID, int gain) const
std::vector< std::map< HWIdentifier, DumpFlags > > m_dump_flags_map
virtual const float & Tdiff(const HWIdentifier &CellID, int gain) const
const LArPhysCaliTdiffComplete * m_completePhysCaliTdiff
virtual const int & bin(const HWIdentifier &chid, const int &gain) const
std::vector< std::string > m_keylist
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
This include file contains inline functions describing LAr Parameters properties used in LArReadParam...
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
const LArOFCBinComplete * m_completeOFCBin
bool msgLvl(const MSG::Level lvl) const
#define ATH_MSG_VERBOSE(x)
virtual const float & EMEC_HValpha(const HWIdentifier &CellID) const
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
This class implements the ILArCableLength interface.
virtual const float & Tshaper(const HWIdentifier &CellID) const
bool isGainDependent(unsigned index)
virtual const float & MphysOverMcal(const HWIdentifier &chid, int gain) const override
virtual const float & dTimeCal(const HWIdentifier &CellID, int gain) const
const LArEMEC_CphiComplete * m_completeEMEC_Cphi
This class implements the ILArRinj interface.
const LArMphysOverMcalComplete * m_completeMphysOverMcal
virtual StatusCode stop()
id_range channel_range() const
StatusCode retrieveAbstractInterface(const LArCaliPulseParamsComplete *&data_object)
This class implements the ILArMphysOverMcal interface.
virtual const float & Omega0(const HWIdentifier &CellID, int gain) const
std::vector< std::string > m_classNames
const LArEMEC_HVbetaComplete * m_completeEMEC_HVbeta
This class implements the ILArPhysCaliTdiff interface ` *.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual const float & CableLength(const HWIdentifier &CellID) const
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
This class implements the ILArEMEC_HVbeta interface.
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
This class implements the ILArEMEC_HValpha interface.
virtual const float & Taur(const HWIdentifier &CellID, int gain) const
This class implements the ILArCableAttenuation interface.
@ CaliPulseParamsComplete
This class implements the ILArCaliPulseParams interface.
LArParams2Ntuple(const std::string &name, ISvcLocator *pSvcLocator)
virtual const float & Fstep(const HWIdentifier &CellID, int gain) const
virtual const float & EMEC_HVbeta(const HWIdentifier &CellID) const
virtual const float & Offset(const HWIdentifier &CellID, int gain) const
virtual const float & CableAttenuation(const HWIdentifier &CellID) const
StatusCode scanCalibChannels(const DATA *&data_object)
const LArRinjComplete * m_completeRinj
StatusCode retrieveFromDetStore(const DATA *&data_object)
const LArEMEC_HValphaComplete * m_completeEMEC_HValpha
bool m_useAbstractInterface
const LArOnlineID_Base * m_onlineId
const LArDetCellParamsComplete * m_completeDetCellParams
id_range calib_channel_range() const
const LArCableAttenuationComplete * m_completeCableAttenuation
bool fillFromIdentifier(const HWIdentifier &id)
virtual const float & Rinj(const HWIdentifier &CellID) const
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
@ CableAttenuationComplete
#define ATH_MSG_WARNING(x)
const LArTdriftComplete * m_completeTdrift
Gaudi::Property< bool > m_isSC
static const unsigned m_nClasses
bool isValid(const LArCaliPulseParamsP &p)
const std::vector< std::string > & ClassNames()
virtual const float & Tcal(const HWIdentifier &CellID, int gain) const
StoreGateSvc * m_detStore
unsigned getClassIndex(const LArCaliPulseParamsComplete *)
const LArTshaperComplete * m_completeTshaper
virtual const float & Tdrift(const HWIdentifier &CellID) const
std::string keyword(const std::string &classname)
const LArCableLengthComplete * m_completeCableLength
virtual const float & EMEC_Cphi(const HWIdentifier &CellID) const
StatusCode scanReadoutChannels(const DATA *&data_object)
std::vector< std::string > m_detStoreKeys
This class implements the ILArDetCellParams interface.
std::vector< std::string > m_detStoreJo
This class implements the ILArTshaper interface.