ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
CaloCellTimeCorrTool Class Reference

Tool to shift cell time values. More...

#include <CaloCellTimeCorrTool.h>

Inheritance diagram for CaloCellTimeCorrTool:
Collaboration diagram for CaloCellTimeCorrTool:

Public Member Functions

 CaloCellTimeCorrTool (const std::string &type, const std::string &name, const IInterface *parent)
 
 ~CaloCellTimeCorrTool ()
 
virtual StatusCode initialize () override
 
virtual StatusCode process (CaloCellContainer *theCellContainer, const EventContext &ctx) const override
 

Private Attributes

SG::ReadCondHandleKey< AthenaAttributeListm_timeShiftFldr {this,"Folder","/CALO/Ofl/CellTimeCorr","Key (=foldername) of AttrListCollection"}
 

Detailed Description

Tool to shift cell time values.

Definition at line 20 of file CaloCellTimeCorrTool.h.

Constructor & Destructor Documentation

◆ CaloCellTimeCorrTool()

CaloCellTimeCorrTool::CaloCellTimeCorrTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 10 of file CaloCellTimeCorrTool.cxx.

12  :
13  base_class (type, name, parent) {}

◆ ~CaloCellTimeCorrTool()

CaloCellTimeCorrTool::~CaloCellTimeCorrTool ( )
default

Member Function Documentation

◆ initialize()

StatusCode CaloCellTimeCorrTool::initialize ( )
overridevirtual

Definition at line 18 of file CaloCellTimeCorrTool.cxx.

18  {
20  return StatusCode::SUCCESS;
21 }

◆ process()

StatusCode CaloCellTimeCorrTool::process ( CaloCellContainer theCellContainer,
const EventContext &  ctx 
) const
overridevirtual

Definition at line 25 of file CaloCellTimeCorrTool.cxx.

26  {
27 
29 
30 
31  //Possible optimization: If the following lines turn out to be slow to be executed on every event,
32  //put them into a conditions algo
33  const coral::Blob& blob = (**timeShiftHdl)["CaloCondBlob16M"].data<coral::Blob>();
34  if (blob.size()<3) {
35  ATH_MSG_DEBUG("Found empty blob, no corretion needed");
36  return StatusCode::SUCCESS;
37  }
38 
39  std::unique_ptr<const CaloCondBlobFlt> corrValues(CaloCondBlobFlt::getInstance(blob));
40  ATH_MSG_DEBUG("Database folder has values for " << corrValues->getNChans() << " channels and " << corrValues->getNGains() << " gains.");
41 
42  CaloCellContainer::iterator it=theCaloCellContainer->begin();
43  CaloCellContainer::iterator it_e=theCaloCellContainer->end();
44  for(;it!=it_e;++it) {
45  CaloCell* theCell=(*it);
46  const IdentifierHash& hash_id=theCell->caloDDE()->calo_hash();
47  if (hash_id<corrValues->getNChans()) {
48  const float& shift= corrValues->getData(hash_id);
49  theCell->setTime(theCell->time()+shift);
50  }//end if hash_id<NChans
51  }//end loop over cells
52  return StatusCode::SUCCESS;
53 }

Member Data Documentation

◆ m_timeShiftFldr

SG::ReadCondHandleKey<AthenaAttributeList> CaloCellTimeCorrTool::m_timeShiftFldr {this,"Folder","/CALO/Ofl/CellTimeCorr","Key (=foldername) of AttrListCollection"}
private

Definition at line 35 of file CaloCellTimeCorrTool.h.


The documentation for this class was generated from the following files:
CaloCellTimeCorrTool::m_timeShiftFldr
SG::ReadCondHandleKey< AthenaAttributeList > m_timeShiftFldr
Definition: CaloCellTimeCorrTool.h:35
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
CaloCell::setTime
virtual void setTime(float time)
set time
Definition: CaloCell.cxx:151
skel.it
it
Definition: skel.GENtoEVGEN.py:396
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
CaloCell::time
float time() const
get time (data member)
Definition: CaloCell.h:352
CaloDetDescrElement::calo_hash
IdentifierHash calo_hash() const
cell calo hash
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:412
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CaloCell::caloDDE
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition: CaloCell.h:305
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloCondBlobFlt::getInstance
static CaloCondBlobFlt * getInstance(coral::Blob &blob)
Returns a pointer to a non-const CaloCondBlobFlt.
Definition: CaloCondBlobFlt.cxx:12
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
CaloCondBlobAlgs_fillNoiseFromASCII.blob
blob
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:96