|
ATLAS Offline Software
|
#include <LArHVPathologyDbAlg.h>
|
| LArHVPathologyDbAlg (const std::string &name, ISvcLocator *pSvcLocator) |
|
| ~LArHVPathologyDbAlg () |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute () override |
|
virtual StatusCode | stop () override |
|
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 |
|
|
StatusCode | createCondObjects (const EventContext &ctx, const CaloDetDescrManager *calodetdescrmgr) |
|
StatusCode | printCondObjects (const EventContext &ctx, const CaloDetDescrManager *calodetdescrmgr) |
|
StatusCode | registerCondObjects () |
|
std::vector< unsigned int > | getElectInd (const LArHVIdMapping &hvIdMapping, const Identifier &id, unsigned int module, unsigned int line, const CaloDetDescrManager *calodetdescrmgr) |
|
int | getHVline (const LArHVIdMapping &hvIdMapping, const Identifier &id, short unsigned int ElectInd, const CaloDetDescrManager *calodetdescrmgr) |
|
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...
|
|
Definition at line 25 of file LArHVPathologyDbAlg.h.
◆ StoreGateSvc_t
◆ LArHVPathologyDbAlg()
LArHVPathologyDbAlg::LArHVPathologyDbAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~LArHVPathologyDbAlg()
LArHVPathologyDbAlg::~LArHVPathologyDbAlg |
( |
| ) |
|
|
default |
◆ createCondObjects()
Definition at line 138 of file LArHVPathologyDbAlg.cxx.
143 ATH_MSG_INFO(
"EMB Pathologies already in SG, skipping ");
152 return StatusCode::FAILURE;
160 return StatusCode::FAILURE;
164 char commentSign(
'#');
167 unsigned short electInd, pathologyType;
178 <<
" in the input file");
179 return StatusCode::FAILURE;
190 checkChar =
static_cast<char> (
infile.get());
194 if((checkChar >=
'0') && (checkChar <=
'9')) {
197 std::vector<unsigned int> elecList;
200 infile >> cellID >> electInd >> pathologyType;
201 elecList.push_back(electInd);
203 unsigned int bec,pos_neg,
FT,slot,
channel,hvModule,hvLine;
204 infile >>
bec >> pos_neg >>
FT >> slot >>
channel >> hvModule >> hvLine >> pathologyType;
205 ATH_MSG_INFO(
" read " <<
bec <<
" " << pos_neg <<
" " <<
FT <<
" " << slot <<
" " <<
channel <<
" " << hvModule <<
" " << hvLine <<
" " << pathologyType);
208 cellID = (
unsigned int)(
id.get_identifier32().get_compact());
209 elecList=
getElectInd(**hvIdMapping,
id,hvModule,hvLine,calodetdescrmgr);
210 ATH_MSG_INFO(
" cellId , elecList size " << cellID <<
" " << elecList.size());
212 for (
unsigned int i=0;
i<elecList.size();
i++) {
214 electPath.
cellID = cellID;
215 electPath.electInd = elecList[
i];
216 if(
m_mode==2) electPath.pathologyType = ((pathologyType&0x0FFF)<<4);
217 else electPath.pathologyType = pathologyType;
218 pathologies.
m_v.push_back(electPath);
220 <<
"," << elecList[
i]
221 <<
"," << pathologyType <<
")");
224 else if(checkChar==commentSign) {
226 std::getline(
infile,commentLine);
241 if(!
sc.isSuccess()) {
249 return StatusCode::SUCCESS;
◆ 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 LArHVPathologyDbAlg::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 86 of file LArHVPathologyDbAlg.cxx.
90 const EventContext& ctx = Gaudi::Hive::currentContext();
92 int nevt = ctx.eventID().event_number();
105 return StatusCode::FAILURE;
111 if(!
sc.isSuccess()) {
◆ 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();
◆ getElectInd()
Definition at line 330 of file LArHVPathologyDbAlg.cxx.
337 std::vector<unsigned int>
list;
346 unsigned int nelec =
cell->getNumElectrodes();
347 for (
unsigned int i=0;
i<nelec;
i++) {
349 for (
unsigned int igap=0;igap<2;igap++) {
350 if (electrode.
hvLineNo(igap, &hvIdMapping)==HVline) {
351 list.push_back(2*
i+igap);
361 unsigned int nelec =
cell->getNumElectrodes();
362 for (
unsigned int i=0;
i<nelec;
i++) {
364 for (
unsigned int igap=0;igap<2;igap++) {
365 if (electrode.
hvLineNo(igap, &hvIdMapping)==HVline) {
366 list.push_back(2*
i+igap);
377 for (
unsigned int igap=0;igap<2;igap++) {
378 if (hvmodule.
hvLineNo(igap, &hvIdMapping)==HVline) {
379 list.push_back(igap);
389 for (
unsigned int igap=0;igap<2;igap++) {
390 if (hvmodule.
hvLineNo(igap, &hvIdMapping)==HVline) {
391 list.push_back(igap);
401 unsigned int nsubgaps =
cell->getNumSubgaps();
402 for (
unsigned int i=0;
i<nsubgaps;
i++) {
404 if (subgap.
hvLineNo(&hvIdMapping)==HVline) {
415 for (
unsigned int i=0;
i<nlines;
i++) {
418 if (
line2->hvLineNo(&hvIdMapping)==HVline) {
◆ getHVline()
Definition at line 430 of file LArHVPathologyDbAlg.cxx.
436 unsigned int igap, ielec;
443 unsigned int nelec =
cell->getNumElectrodes();
445 ielec = std::div(ElectInd - igap, 2).quot;
447 ATH_MSG_ERROR(
"Wrong electrode number " << ielec <<
" for cell "<<
id.get_identifier32().get_compact());
450 return cell->getElectrode(ielec).hvLineNo(igap, &hvIdMapping);
458 unsigned int nelec =
cell->getNumElectrodes();
460 ielec = std::div(ElectInd - igap, 2).quot;
462 ATH_MSG_ERROR(
"Wrong electrode number " << ielec <<
" for cell "<<
id.get_identifier32().get_compact());
465 return cell->getElectrode(ielec).hvLineNo(igap, &hvIdMapping);
475 ATH_MSG_ERROR(
"Wrong igap "<<ElectInd<<
" for EMBPS cell "<<
id.get_identifier32().get_compact());
478 return hvmodule.
hvLineNo(ElectInd, &hvIdMapping);
488 ATH_MSG_ERROR(
"Wrong igap "<<ElectInd<<
" for EMECPS cell "<<
id.get_identifier32().get_compact());
491 return hvmodule.
hvLineNo(ElectInd, &hvIdMapping);
500 unsigned int nsubgaps =
cell->getNumSubgaps();
501 if( ElectInd >= nsubgaps) {
502 ATH_MSG_ERROR(
"Wrong igap "<<ElectInd<<
" for HEC cell "<<
id.get_identifier32().get_compact());
505 return cell->getSubgap(ElectInd).hvLineNo(&hvIdMapping);
514 if( ElectInd >= nlines) {
515 ATH_MSG_ERROR(
"Wrong line "<<ElectInd<<
" for FCAL cell "<<
id.get_identifier32().get_compact());
520 return line2->hvLineNo(&hvIdMapping);
522 ATH_MSG_ERROR(
"Do not have HVLine for "<<ElectInd<<
" for FCAL cell "<<
id.get_identifier32().get_compact());
◆ initialize()
StatusCode LArHVPathologyDbAlg::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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.
◆ printCondObjects()
Definition at line 252 of file LArHVPathologyDbAlg.cxx.
261 return StatusCode::FAILURE;
264 std::ofstream *
fout=
nullptr;
281 for(
unsigned i=0;
i<pathologyContainer->
m_v.size(); ++
i) {
295 int hvmodule=HVLine/1000;
308 delete pathologyContainer;
◆ registerCondObjects()
StatusCode LArHVPathologyDbAlg::registerCondObjects |
( |
| ) |
|
|
private |
◆ renounce()
◆ renounceArray()
◆ stop()
StatusCode LArHVPathologyDbAlg::stop |
( |
| ) |
|
|
overridevirtual |
◆ 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_cablingKey
◆ m_caloIdMgr
◆ m_caloMgrKey
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_folder
StringProperty LArHVPathologyDbAlg::m_folder |
|
private |
◆ m_hvCablingKey
◆ m_inpFile
StringProperty LArHVPathologyDbAlg::m_inpFile |
|
private |
◆ m_larem_id
◆ m_larfcal_id
◆ m_larhec_id
◆ m_laronline_id
◆ m_mode
int LArHVPathologyDbAlg::m_mode |
|
private |
◆ m_outFile
StringProperty LArHVPathologyDbAlg::m_outFile |
|
private |
◆ m_outpTag
StringProperty LArHVPathologyDbAlg::m_outpTag |
|
private |
◆ m_pathologyTool
◆ m_regSvc
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_writeCondObjs
BooleanProperty LArHVPathologyDbAlg::m_writeCondObjs |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
const LArFCAL_ID * m_larfcal_id
StatusCode registerCondObjects()
const LArEM_ID * m_larem_id
GeoIntrusivePtr< const HECCell > HECCellConstLink
@Class: HECCellConstLink
LAr EMEC Detector Element.
Smart Pointer to EMEC Cells. This reference counted link allocates on demand. It audits the total poi...
bool is_lar_fcal(Identifier id) const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
const LArEM_ID * getEM_ID(void) const
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
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...
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
int sampling(const Identifier id) const
return sampling according to :
SG::ReadCondHandleKey< LArHVIdMapping > m_hvCablingKey
const LArOnlineID * m_laronline_id
const std::string & key() const
Return the StoreGate ID for the referenced object.
LAr EMB Detector Element.
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
GeoIntrusivePtr< const EMBCell > EMBCellConstLink
ToolHandle< ILArHVPathologyDbTool > m_pathologyTool
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
LAr HEC Detector Element.
BooleanProperty m_writeCondObjs
A tile of the forward calorimeter readout geometry.
ServiceHandle< IIOVRegistrationSvc > m_regSvc
StatusCode printCondObjects(const EventContext &ctx, const CaloDetDescrManager *calodetdescrmgr)
int hvLineNo(int iGap, const LArHVIdMapping *hvIdMapping) const
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
const LArHEC_ID * getHEC_ID(void) const
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.
LAr FCAL Detector Element.
const LArFCAL_ID * getFCAL_ID(void) const
int hvLineNo(const LArHVIdMapping *hvIdMapping) const
StatusCode createCondObjects(const EventContext &ctx, const CaloDetDescrManager *calodetdescrmgr)
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
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...
int hvLineNo(int iGap, const LArHVIdMapping *hvIdMapping) const
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
bool is_lar_hec(Identifier id) const
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
static unsigned int getNumHVLines()
Get num hvlines.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
unsigned short pathologyType
std::vector< unsigned int > getElectInd(const LArHVIdMapping &hvIdMapping, const Identifier &id, unsigned int module, unsigned int line, const CaloDetDescrManager *calodetdescrmgr)
int hvLineNo(int iGap, const LArHVIdMapping *hvIdMapping) const
std::vector< LArHVElectPathologyDb > m_v
int barrel_ec(const Identifier id) const
return barrel_ec according to :
StatusCode initialize(bool used=true)
const LArHEC_ID * m_larhec_id
DataObjIDColl m_extendedExtraObjects
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
This class provides the client interface for accessing the detector description information common to...
int getHVline(const LArHVIdMapping &hvIdMapping, const Identifier &id, short unsigned int ElectInd, const CaloDetDescrManager *calodetdescrmgr)
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Describes one HV Module within the EMEc Presampler.
AthAlgorithm()
Default constructor:
const CaloIdManager * m_caloIdMgr
bool is_lar_em(Identifier id) const
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
int hvLineNo(int iGap, const LArHVIdMapping *hvIdMapping) const
Describes one HV Module within the EMB Presampler.