Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <CaloAddCellPedShift.h>
|
virtual StatusCode | initialize () override |
| standard Athena-Algorithm method More...
|
|
virtual StatusCode | execute () override |
| standard Athena-Algorithm method More...
|
|
virtual StatusCode | finalize () override |
| standard Athena-Algorithm method More...
|
|
virtual StatusCode | stop () override |
| standard Athena-Algorithm method More...
|
|
| AthAlgorithm (const std::string &name, ISvcLocator *pSvcLocator) |
| Constructor with parameters: More...
|
|
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 |
|
|
Gaudi::Property< std::string > | m_fname {this,"inputFile",""} |
|
ServiceHandle< ITHistSvc > | m_thistSvc {this,"THistSvc","THistSvc"} |
|
SG::ReadCondHandleKey< LArOnOffIdMapping > | m_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"} |
|
SG::ReadCondHandleKey< CaloDetDescrManager > | m_caloMgrKey {this,"CaloDetDescrManager","CaloDetDescrManager","SG Key for CaloDetDescrManager in the Condition Store" } |
|
SG::ReadCondHandleKey< CondAttrListCollection > | m_pedKey {this,"FolderName","/CALO/Pedestal/CellPedestal"} |
|
const CaloCell_ID * | m_calo_id =nullptr |
|
const LArOnlineID * | m_onlineID =nullptr |
|
ToolHandle< ICaloCoolIdTool > | m_caloCoolIdTool {this,"CaloCoolIdTool","CaloCoolIdTool"} |
|
int | m_iCool =0 |
|
int | m_SubHash =0 |
|
int | m_Hash =0 |
|
int | m_OffId =0 |
|
float | m_eta =0 |
|
float | m_phi =0 |
|
int | m_layer =0 |
|
int | m_Gain =0 |
|
int | m_bec =0 |
|
int | m_posneg =0 |
|
int | m_FT =0 |
|
int | m_slot =0 |
|
int | m_channel =0 |
|
float | m_ped1 =0 |
|
float | m_ped1corr =0 |
|
float | m_ped2 =0 |
|
TTree * | m_tree =nullptr |
|
DataObjIDColl | m_extendedExtraObjects |
|
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 29 of file CaloAddCellPedShift.h.
◆ StoreGateSvc_t
◆ AthAlgorithm()
AthAlgorithm::AthAlgorithm |
Constructor with parameters:
Definition at line 51 of file AthAlgorithm.cxx.
32 std::make_unique<AthenaBaseComps::AthAlgorithmDHUpdate>
34 std::move (m_updateDataHandles));
◆ 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 CaloAddCellPedShift::execute |
( |
| ) |
|
|
overridevirtual |
◆ 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 CaloAddCellPedShift::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode CaloAddCellPedShift::initialize |
( |
| ) |
|
|
overridevirtual |
standard Athena-Algorithm method
Definition at line 18 of file CaloAddCellPedShift.cxx.
30 m_tree =
new TTree(
"mytree",
"Calo Ped ntuple");
50 ATH_MSG_INFO (
" end of CaloAddCellPedShift::initialize " );
51 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()
◆ stop()
StatusCode CaloAddCellPedShift::stop |
( |
| ) |
|
|
overridevirtual |
standard Athena-Algorithm method
Definition at line 63 of file CaloAddCellPedShift.cxx.
67 std::vector<float> pedShiftValue;
68 pedShiftValue.resize(
ncell,0.);
74 return StatusCode::FAILURE;
82 return StatusCode::FAILURE;
85 std::map<unsigned int, const CaloCondBlobFlt*> pedBlobMap;
86 for (
auto iColl=pedHdl->begin();iColl!=pedHdl->end();++iColl) {
88 unsigned int sysId =
static_cast<unsigned int>(iColl->first);
90 const coral::Blob&
blob = (iColl->second)[
"CaloCondBlob16M"].data<coral::Blob>();
93 pedBlobMap[sysId] =
flt;
99 FILE* finput = fopen(
m_fname.value().c_str(),
"r");
107 while( fscanf(finput,
"%d %d %d %d %d %f",&
bec,&pos_neg,&
FT,&slot,&
channel,&pedShift) != EOF ) {
108 ATH_MSG_INFO (
" read linbe " <<
bec <<
" " << pos_neg <<
" " <<
FT <<
" " << slot <<
" " <<
channel <<
" " << pedShift );
112 int ii = (
int) (idHash);
113 pedShiftValue[ii] = pedShift;
122 FILE*
fp = fopen(
"calopedestal.txt",
"w");
158 int ii = (
int) (idSubHash);
161 if (subCalo<3)
ngain=3;
180 unsigned int subHash2;
183 float ped1_old=
flt->getData(subHash2,dbGain,0);
184 float ped2=
flt->getData(subHash2,dbGain,1);
186 float ped1 = ped1_old + pedShiftValue[
i];
188 if (iCool<48) fprintf(
fp,
"%5u %5d %5d %8.3f %8.3f\n",iCool,ii,
gain,ped1,ped2);
193 m_OffId=(
int)(
id.get_identifier32().get_compact());
217 if (std::fabs(ped1-ped1_old)>1.)
225 return StatusCode::SUCCESS;
◆ 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_bec
int CaloAddCellPedShift::m_bec =0 |
|
private |
◆ m_cablingKey
◆ m_calo_id
◆ m_caloCoolIdTool
◆ m_caloMgrKey
◆ m_channel
int CaloAddCellPedShift::m_channel =0 |
|
private |
◆ m_detStore
◆ m_eta
float CaloAddCellPedShift::m_eta =0 |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_fname
Gaudi::Property<std::string> CaloAddCellPedShift::m_fname {this,"inputFile",""} |
|
private |
◆ m_FT
int CaloAddCellPedShift::m_FT =0 |
|
private |
◆ m_Gain
int CaloAddCellPedShift::m_Gain =0 |
|
private |
◆ m_Hash
int CaloAddCellPedShift::m_Hash =0 |
|
private |
◆ m_iCool
int CaloAddCellPedShift::m_iCool =0 |
|
private |
◆ m_layer
int CaloAddCellPedShift::m_layer =0 |
|
private |
◆ m_OffId
int CaloAddCellPedShift::m_OffId =0 |
|
private |
◆ m_onlineID
◆ m_ped1
float CaloAddCellPedShift::m_ped1 =0 |
|
private |
◆ m_ped1corr
float CaloAddCellPedShift::m_ped1corr =0 |
|
private |
◆ m_ped2
float CaloAddCellPedShift::m_ped2 =0 |
|
private |
◆ m_pedKey
◆ m_phi
float CaloAddCellPedShift::m_phi =0 |
|
private |
◆ m_posneg
int CaloAddCellPedShift::m_posneg =0 |
|
private |
◆ m_slot
int CaloAddCellPedShift::m_slot =0 |
|
private |
◆ m_SubHash
int CaloAddCellPedShift::m_SubHash =0 |
|
private |
◆ m_thistSvc
ServiceHandle<ITHistSvc> CaloAddCellPedShift::m_thistSvc {this,"THistSvc","THistSvc"} |
|
private |
◆ m_tree
TTree* CaloAddCellPedShift::m_tree =nullptr |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Gaudi::Property< std::string > m_fname
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
Class for storing a number of floats (Flt) and functions on those.
SG::ReadCondHandleKey< CondAttrListCollection > m_pedKey
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
bool is_em_endcap(const Identifier id) const
test if the id belongs to the EM Endcap
int pos_neg(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
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 calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
This class is a collection of AttributeLists where each one is associated with a channel number....
bool is_hec(const Identifier id) const
test if the id belongs to the HEC
float eta_raw() const
cell eta_raw
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
bool is_em(const Identifier id) const
test if the id belongs to LArEM
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
ServiceHandle< ITHistSvc > m_thistSvc
bool is_fcal(const Identifier id) const
test if the id belongs to the FCAL - true also for MiniFCAL
::StatusCode StatusCode
StatusCode definition for legacy code.
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
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...
IdentifierHash subcalo_cell_hash(const Identifier cellId, int &subCalo) const
create hash id from 'global' cell id
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
StatusCode initialize(bool used=true)
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
static unsigned int getDbCaloGain(int caloGain)
Returns the non-negative gainId to be used with the COOL DB.
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...
static CaloCondBlobFlt * getInstance(coral::Blob &blob)
Returns a pointer to a non-const CaloCondBlobFlt.
#define ATH_MSG_WARNING(x)
const CaloCell_ID * m_calo_id
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
ToolHandle< ICaloCoolIdTool > m_caloCoolIdTool
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
const LArOnlineID * m_onlineID
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
float phi_raw() const
cell phi_raw
size_type calo_cell_hash_max(void) const
cell 'global' hash table max size