ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Attributes | Static Private Attributes | List of all members
D3PD::TileCellDetailsFillerTool Class Reference

#include <TileCellDetailsFillerTool.h>

Inheritance diagram for D3PD::TileCellDetailsFillerTool:
Collaboration diagram for D3PD::TileCellDetailsFillerTool:

Public Member Functions

 TileCellDetailsFillerTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual StatusCode initialize ()
 Standard Gaudi initialize method. More...
 
virtual StatusCode book ()
 Declare tuple variables. More...
 
virtual StatusCode fill (const CaloCell &p)
 Fill one block — type-safe version. More...
 
void DumpCellInfo ()
 
virtual StatusCode configureD3PD (IAddVariable *tree, const std::type_info &ti)
 Configure during initialization: type-check. More...
 
StatusCode configureD3PD (IAddVariable *tree)
 Configure the parent tree. More...
 
virtual StatusCode fillUntyped (const void *p, bool again=false)
 Fill one block. More...
 
virtual StatusCode fillAgain (const CaloCell &p)
 Fill one block, after AGAIN has been returned (type-safe). More...
 
virtual StatusCode addVariable (const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
 Add a variable to the tuple. More...
 
template<class T >
StatusCode addVariable (const std::string &name, T *&ptr, const std::string &docstring="")
 Make the template implementation from IAddVariable visible. More...
 
template<class T , class U >
StatusCode addVariable (const std::string &name, T *&ptr, const std::string &docstring, const U &defval)
 Make the template implementation from IAddVariable visible. More...
 
virtual StatusCode addVariable (const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)=0
 Make the template implementation from IAddVariable visible. More...
 
template<class T >
StatusCode addVariable (const std::string &name, T *&ptr, const std::string &docstring="")
 Add a variable to the tuple. More...
 
template<class T , class U >
StatusCode addVariable (const std::string &name, T *&ptr, const std::string &docstring, const U &defval)
 Add a variable to the tuple. More...
 
virtual StatusCode addDimensionedVariable (const std::string &name, const std::type_info &ti, void *&ptr, const std::string &dim, const std::string &docstring="", const void *defval=0)
 Add a variable to the tuple. More...
 
template<class T >
StatusCode addDimensionedVariable (const std::string &name, T *&ptr, const std::string &dim, const std::string &docstring="")
 Add a variable to the tuple. More...
 
template<class T , class U >
StatusCode addDimensionedVariable (const std::string &name, T *&ptr, const std::string &dim, const std::string &docstring, const U &defval)
 Add a variable to the tuple. More...
 
virtual StatusCode addDimensionedVariable (const std::string &name, const std::type_info &ti, void *&ptr, const std::string &dim, const std::string &docstring="", const void *defval=0)=0
 Add a variable to the tuple. More...
 
template<class T >
StatusCode addDimensionedVariable (const std::string &name, T *&ptr, const std::string &dim, const std::string &docstring="")
 Add a variable to the tuple. More...
 
template<class T , class U >
StatusCode addDimensionedVariable (const std::string &name, T *&ptr, const std::string &dim, const std::string &docstring, const U &defval)
 Add a variable to the tuple. More...
 

Protected Member Functions

StatusCode configureImpl (IAddVariable *tree, const std::type_info &ti, const std::type_info &fill_ti)
 Configure during initialization: type-check. More...
 
StatusCode configureImpl (IAddVariable *tree, const std::type_info &ti, const std::vector< const std::type_info * > &tis, size_t &which)
 Configure during initialization: type-check. More...
 
StatusCode convert (void const *&p) const
 Do type conversion. More...
 

Protected Attributes

ObjectMetadata m_metadata
 Metadata about the variables created by this object. More...
 

Private Types

enum  CELL_CHANNEL { E1_CHANNEL = 12 }
 

Private Attributes

const TileIDm_tileid
 
const TileHWIDm_tilehwid
 
const TileCablingServicem_cabling
 
ToolHandle< ITileBadChanToolm_tileBadChanTool
 
bool m_saveCellDetails
 
bool m_savePosition
 
bool m_run2plus
 
float * m_timeCells
 
float * m_xCells
 
float * m_yCells
 
float * m_zCells
 
float * m_tdiffCells
 
float * m_ediffCells
 
uint16_t * m_moduleCells
 
uint16_t * m_partitionCells
 
uint16_t * m_towerCells
 
uint16_t * m_sampleCells
 
short * m_gain1Cells
 
short * m_gain2Cells
 
short * m_chan1Cells
 
short * m_chan2Cells
 
short * m_pmt1Cells
 
short * m_pmt2Cells
 
uint16_t * m_status1Cells
 
uint16_t * m_status2Cells
 
uint16_t * m_qual1Cells
 
uint16_t * m_qual2Cells
 
uint8_t * m_qbits1
 
uint8_t * m_qbits2
 
bool m_notRealE1run2 [2][64]
 
std::string m_prefix
 Property: the variable prefix for this block. More...
 
std::string m_suffix
 Property: the variable prefix for this block. More...
 
std::string m_blockName
 Property: the name of this block. More...
 
TypeConverter m_converter
 Helper to do type conversions. More...
 
IAddVariablem_tree
 Reference to the block name. More...
 

Static Private Attributes

static const std::string s_emptyString
 Used to provide a default value for blockName. More...
 

Detailed Description

Definition at line 26 of file TileCellDetailsFillerTool.h.

Member Enumeration Documentation

◆ CELL_CHANNEL

Enumerator
E1_CHANNEL 

Definition at line 121 of file TileCellDetailsFillerTool.h.

121 {E1_CHANNEL = 12};

Constructor & Destructor Documentation

◆ TileCellDetailsFillerTool()

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

Definition at line 27 of file TileCellDetailsFillerTool.cxx.

29  :
30  BlockFillerTool<CaloCell>(type,name,parent),
31  m_tileid (0),
32  m_tilehwid(0),
33  m_cabling(0),
34  m_tileBadChanTool("TileBadChanTool"),
35  m_run2plus(false),
36  m_notRealE1run2{{}}
37  {
38  declareProperty("SaveCellDetails", m_saveCellDetails = true);
39  declareProperty("SavePositionInfo", m_savePosition = true );
40  declareProperty("TileBadChanTool", m_tileBadChanTool);
41 
42  TileCellDetailsFillerTool::book().ignore(); // Avoid coverity warnings
43  }

Member Function Documentation

◆ addDimensionedVariable() [1/6]

StatusCode D3PD::AddVariable::addDimensionedVariable ( const std::string &  name,
const std::type_info &  ti,
void *&  ptr,
const std::string &  dim,
const std::string &  docstring = "",
const void *  defval = 0 
)
virtualinherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
typeThe type of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
dimDimension for the variable. (Presently unimplemented!)
docstringDocumentation string for this variable.
defvalPointer to the default value to use for this variable. Null for no default (generally means to fill with zeros). Of the type given by ti. Only works for basic types.

If called from the constructor, the only effect is to clear ptr.

Implements D3PD::IAddVariable.

Definition at line 123 of file AddVariable.cxx.

129 {
130  if (!m_tree) {
131  // Called from constructor --- just initialize pointer.
132  ptr = 0;
133  return StatusCode::SUCCESS;
134  }
135 
137  ti, ptr, dim,
138  docstring, defval ) );
140  ti, ptr, dim,
141  docstring, defval);
142 }

◆ addDimensionedVariable() [2/6]

virtual StatusCode D3PD::IAddVariable::addDimensionedVariable
inherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
typeThe type of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
dimDimension for the variable. (Presently unimplemented!)
docstringDocumentation string for this variable.
defvalPointer to the default value to use for this variable. Null for no default (generally means to fill with zeros). Of the type given by ti. Only works for basic types.

If called from the constructor, the only effect is to clear ptr.

◆ addDimensionedVariable() [3/6]

template<class T , class U >
StatusCode D3PD::IAddVariable::addDimensionedVariable ( class T  ,
class U   
)
inherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
dimDimension for the variable. (Presently unimplemented!)
docstringDocumentation string for this variable.
defvalPointer to the default value to use for this variable. Only works for basic types.

If called from the constructor, the only effect is to clear ptr.

◆ addDimensionedVariable() [4/6]

template<class T , class U >
StatusCode D3PD::IAddVariable::addDimensionedVariable ( const std::string &  name,
T *&  ptr,
const std::string &  dim,
const std::string &  docstring,
const U &  defval 
)
inherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
dimDimension for the variable. (Presently unimplemented!)
docstringDocumentation string for this variable.
defvalPointer to the default value to use for this variable. Only works for basic types.

If called from the constructor, the only effect is to clear ptr.

◆ addDimensionedVariable() [5/6]

template<class T >
StatusCode D3PD::IAddVariable::addDimensionedVariable ( class T  )
inherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
dimDimension for the variable. (Presently unimplemented!)
docstringDocumentation string for this variable.

If called from the constructor, the only effect is to clear ptr.

◆ addDimensionedVariable() [6/6]

template<class T >
StatusCode D3PD::IAddVariable::addDimensionedVariable ( const std::string &  name,
T *&  ptr,
const std::string &  dim,
const std::string &  docstring = "" 
)
inherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
dimDimension for the variable. (Presently unimplemented!)
docstringDocumentation string for this variable.

If called from the constructor, the only effect is to clear ptr.

◆ addVariable() [1/6]

StatusCode D3PD::AddVariable::addVariable ( const std::string &  name,
const std::type_info &  ti,
void *&  ptr,
const std::string &  docstring = "",
const void *  defval = 0 
)
virtualinherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
typeThe type of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
docstringDocumentation string for this variable.
defvalPointer to the default value to use for this variable. Null for no default (generally means to fill with zeros). Of the type given by ti. Only works for basic types.

If called from the constructor, the only effect is to clear ptr.

Implements D3PD::IAddVariable.

Definition at line 85 of file AddVariable.cxx.

90 {
91  if (!m_tree) {
92  // Called from constructor --- just initialize pointer.
93  ptr = 0;
94  return StatusCode::SUCCESS;
95  }
96 
98  ti, ptr, docstring, defval ) );
100  ti, ptr, docstring, defval);
101 }

◆ addVariable() [2/6]

virtual StatusCode D3PD::IAddVariable::addVariable
inherited

Make the template implementation from IAddVariable visible.

◆ addVariable() [3/6]

template<class T , class U >
StatusCode D3PD::IAddVariable::addVariable ( class T  ,
class U   
)
inherited

Make the template implementation from IAddVariable visible.

◆ addVariable() [4/6]

template<class T , class U >
StatusCode D3PD::IAddVariable::addVariable ( const std::string &  name,
T *&  ptr,
const std::string &  docstring,
const U &  defval 
)
inherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
docstringDocumentation string for this variable.
defvalPointer to the default value to use for this variable. Only works for basic types.

If called from the constructor, the only effect is to clear ptr.

◆ addVariable() [5/6]

template<class T >
StatusCode D3PD::IAddVariable::addVariable ( class T  )
inherited

Make the template implementation from IAddVariable visible.

◆ addVariable() [6/6]

template<class T >
StatusCode D3PD::IAddVariable::addVariable ( const std::string &  name,
T *&  ptr,
const std::string &  docstring = "" 
)
inherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
docstringDocumentation string for this variable.

If called from the constructor, the only effect is to clear ptr.

◆ book()

StatusCode D3PD::TileCellDetailsFillerTool::book ( )
virtual

Declare tuple variables.

This is called at the start of the first event.

Implements D3PD::BlockFillerTool< CaloCell >.

Definition at line 72 of file TileCellDetailsFillerTool.cxx.

72  {
73  if (m_savePosition) {
77  CHECK(addVariable("PMT1",m_pmt1Cells));
78  CHECK(addVariable("PMT2",m_pmt2Cells));
79  }
80 
81  if (m_saveCellDetails){
82  CHECK(addVariable("Time",m_timeCells));
83  CHECK(addVariable("Timediff",m_tdiffCells));
84  CHECK(addVariable("Ediff",m_ediffCells));
85  CHECK(addVariable("Gain1",m_gain1Cells));
86  CHECK(addVariable("Gain2",m_gain2Cells));
87  CHECK(addVariable("Module",m_moduleCells));
88  CHECK(addVariable("Partition",m_partitionCells));
89  CHECK(addVariable("Tower",m_towerCells));
90  CHECK(addVariable("Sample",m_sampleCells));
91  CHECK(addVariable("Chan1",m_chan1Cells));
92  CHECK(addVariable("Chan2",m_chan2Cells));
93  CHECK(addVariable("Status1",m_status1Cells));
94  CHECK(addVariable("Status2",m_status2Cells));
95  CHECK(addVariable("Qual1",m_qual1Cells));
96  CHECK(addVariable("Qual2",m_qual2Cells));
97  CHECK(addVariable("QBits1",m_qbits1));
98  CHECK(addVariable("QBits2",m_qbits2));
99  }
100 
101 
102  return StatusCode::SUCCESS;
103  }

◆ configureD3PD() [1/2]

StatusCode D3PD::AddVariable::configureD3PD ( IAddVariable tree)
inherited

Configure the parent tree.

Parameters
treeThe parent IAddVariable instance.

Definition at line 61 of file AddVariable.cxx.

62 {
63  m_tree = tree;
64  m_metadata.clear();
65  return StatusCode::SUCCESS;
66 }

◆ configureD3PD() [2/2]

virtual StatusCode D3PD::BlockFillerTool< CaloCell >::configureD3PD ( IAddVariable tree,
const std::type_info &  ti 
)
virtualinherited

Configure during initialization: type-check.

Parameters
treeOur parent for tuple making.
tiGives the type of the object being passed to fillUntyped.

configureD3PD should check that the type of the object coming as input is compatible with what it expects, and raise an error otherwise.

◆ configureImpl() [1/2]

StatusCode D3PD::BlockFillerToolImpl::configureImpl ( IAddVariable tree,
const std::type_info &  ti,
const std::type_info &  fill_ti 
)
protectedinherited

Configure during initialization: type-check.

Parameters
treeOur parent for tuple making.
tiGives the type of the object being passed to fillUntyped.
fill_tiis the type of object that the user code will expect.

This is the common implementation for the configureD3PD method of IBlockFillerTool. It checks that the type of the object coming as input is compatible with what the user code is expecting, and raises an error otherwise.

Definition at line 55 of file BlockFillerToolImpl.cxx.

58 {
60  CHECK( m_converter.init (ti, fill_ti) );
61 
62  return StatusCode::SUCCESS;
63 }

◆ configureImpl() [2/2]

StatusCode D3PD::BlockFillerToolImpl::configureImpl ( IAddVariable tree,
const std::type_info &  ti,
const std::vector< const std::type_info * > &  tis,
size_t &  which 
)
protectedinherited

Configure during initialization: type-check.

Parameters
treeOur parent for tuple making.
tiGives the type of the object being passed to fillUntyped.
tisList of possible input types that we can accept.
[out]whichIndex of the accepted type.

This is the common implementation for the configureD3PD method of IBlockFillerTool. It checks that the type of the object coming as input is compatible with what the user code is expecting, and raises an error otherwise.

This version allows for one of a set of types to match. If successful, WHICH is set to the index (0-based) of the matching type.

Definition at line 83 of file BlockFillerToolImpl.cxx.

87 {
89  CHECK( m_converter.init (ti, tis, which) );
90  return StatusCode::SUCCESS;
91 }

◆ convert()

StatusCode D3PD::BlockFillerToolImpl::convert ( void const *&  p) const
protectedinherited

Do type conversion.

Parameters
p[in,out]Pointer to convert.

On entry, p is a pointer to an object of the type that was passed into configureImpl as ti. Convert the pointer to point to an object of the type that was given as fill_ti. If the conversion fails, the pointer is set to 0 (and FAILURE is returned).

Definition at line 105 of file BlockFillerToolImpl.cxx.

106 {
108  if (!p) {
109  REPORT_MESSAGE (MSG::ERROR)
110  << "Pointer conversion from " << m_converter.srcName() << " to "
111  << m_converter.dstName() << "failed.";
112  return StatusCode::FAILURE;
113  }
114  return StatusCode::SUCCESS;
115 }

◆ DumpCellInfo()

void D3PD::TileCellDetailsFillerTool::DumpCellInfo ( )

Definition at line 191 of file TileCellDetailsFillerTool.cxx.

191  {
192  MsgStream log( msgSvc(), name() );
193  log << MSG::INFO << "Dumping Cell info:" << endmsg;
194  if (m_savePosition) {
195  log << MSG::INFO << " X :" <<*m_xCells << endmsg;
196  log << MSG::INFO << " Y :" <<*m_yCells << endmsg;
197  log << MSG::INFO << " Z :" <<*m_zCells << endmsg;
198  log << MSG::INFO << " PMT1 :" <<*m_pmt1Cells << endmsg;
199  log << MSG::INFO << " PMT2 :" <<*m_pmt2Cells << endmsg;
200  }
201  if (m_saveCellDetails) {
202  log << MSG::INFO << " Time :" <<*m_timeCells << endmsg;
203  log << MSG::INFO << " Ediff :" <<*m_ediffCells << endmsg;
204  log << MSG::INFO << " Tdiff :" <<*m_tdiffCells << endmsg;
205  log << MSG::INFO << " Module :" <<*m_moduleCells << endmsg;
206  log << MSG::INFO << " Partition :" <<*m_partitionCells << endmsg;
207  log << MSG::INFO << " Tower :" <<*m_towerCells << endmsg;
208  log << MSG::INFO << " Sample :" <<*m_sampleCells << endmsg;
209  log << MSG::INFO << " Gain1 :" <<*m_gain1Cells << endmsg;
210  log << MSG::INFO << " Gain2 :" <<*m_gain2Cells << endmsg;
211  log << MSG::INFO << " Chan1 :" <<*m_chan1Cells << endmsg;
212  log << MSG::INFO << " Chan2 :" <<*m_chan2Cells << endmsg;
213  log << MSG::INFO << " Status1 :" <<*m_status1Cells << endmsg;
214  log << MSG::INFO << " Status2 :" <<*m_status2Cells << endmsg;
215  log << MSG::INFO << " QF1 :" <<*m_qual1Cells << endmsg;
216  log << MSG::INFO << " QF2 :" <<*m_qual2Cells << endmsg;
217  }
218  }

◆ fill()

StatusCode D3PD::TileCellDetailsFillerTool::fill ( const CaloCell p)
virtual

Fill one block — type-safe version.

Parameters
pThe input object.

This is called once per object. The caller is responsible for arranging that all the pointers for booked variables are set appropriately upon entry.

Implements D3PD::BlockFillerTool< CaloCell >.

Definition at line 105 of file TileCellDetailsFillerTool.cxx.

105  {
106  MsgStream log( msgSvc(), name() );
107  log << MSG::DEBUG << " in TileCellDetailsFillerTool::fill()" << endmsg;
108  const CaloCell* cell=&p;
109  const TileCell* tilecell = dynamic_cast<const TileCell*> (cell);
110  if(tilecell){
111  Identifier id = tilecell->ID();
112  if ( log.level() < MSG::DEBUG ) log << MSG::VERBOSE << " cell_id " << m_tileid->to_string(id,-2) << endmsg;
113  int partition(0);
114  uint32_t bad1(0),bad2(0);
115  long chan1(-1),chan2(-1),pmt1(-1),pmt2(-1);
116  long gain1 = tilecell->gain1();
117  long gain2 = tilecell->gain2();
118  long qual1 = tilecell->qual1();
119  long qual2 = tilecell->qual2();
120  int module = m_tileid->module(id);
121 
122  const CaloDetDescrElement * caloDDE = tilecell->caloDDE();
123  IdentifierHash hash1 = (gain1<0) ? TileHWID::NOT_VALID_HASH : caloDDE->onl1();
124  IdentifierHash hash2 = (gain2<0) ? TileHWID::NOT_VALID_HASH : caloDDE->onl2();
125  if (m_savePosition) {
126  *m_xCells=tilecell->x();
127  *m_yCells=tilecell->y();
128  *m_zCells=tilecell->z();
129  *m_pmt1Cells=pmt1;
130  *m_pmt2Cells=pmt2;
131  }
132  if (m_saveCellDetails) {
133  if (hash1 != TileHWID::NOT_VALID_HASH) {
134  HWIdentifier adc_id = m_tilehwid->adc_id(hash1,gain1);
135  if ( log.level() < MSG::DEBUG ) log << MSG::VERBOSE << " adc_id1 " << m_tilehwid->to_string(adc_id) << " hash " << hash1 << " " << gain1 << endmsg;
136  partition = m_tilehwid->ros(adc_id);
137  chan1 = m_tilehwid->channel(adc_id);
140  bad1 = m_tileBadChanTool->encodeStatus(m_tileBadChanTool->getAdcStatus(adc_id));
141  }
142  if (hash2 != TileHWID::NOT_VALID_HASH) {
143  HWIdentifier adc_id = m_tilehwid->adc_id(hash2,gain2);
144  if ( log.level() < MSG::DEBUG ) log << MSG::VERBOSE << " adc_id2 " << m_tilehwid->to_string(adc_id) << " hash " << hash2 << " " << gain2 << endmsg;
145  if (hash1 == TileHWID::NOT_VALID_HASH) partition = m_tilehwid->ros(adc_id);
146  chan2 = m_tilehwid->channel(adc_id);
147  pmt2 = m_cabling->channel2hole(partition,chan2);
148  bad2 = m_tileBadChanTool->encodeStatus(m_tileBadChanTool->getAdcStatus(adc_id));
149  }
150 
151 
152 
153  *m_moduleCells=module+1; // Note the +1 !!!
157  *m_qbits1=tilecell->qbit1();
158  *m_qbits2=tilecell->qbit2();
159  if(gain1>=0 && ((*m_qbits1) & TileCell::MASK_BADCH)!=0 &&
160  qual1!=qual2 && (qual1!=255 || qual2!=255))
161  gain1= !gain1;
162  if(gain2>=0 && ((*m_qbits2) & TileCell::MASK_BADCH)!=0 &&
163  qual1!=qual2 && (qual1!=255 || qual2!=255))
164  gain2= !gain2;
168  *m_chan2Cells=chan2;
169  if(tilecell->badch1())
170  *m_status1Cells=bad1+10;
171  else *m_status1Cells=bad1;
172  if(tilecell->badch2())
173  *m_status2Cells=bad2+10;
174  else *m_status2Cells=bad2;
175  *m_qual1Cells=qual1;
176  *m_qual2Cells=qual2;
177  *m_timeCells=tilecell->time();
178  *m_ediffCells=tilecell->eneDiff();
179  *m_tdiffCells=tilecell->timeDiff();
180  }
181  if ( log.level() < MSG::DEBUG )DumpCellInfo(); // Dump cell info only if in VERBOSE mode
182  }
183  else log << MSG::WARNING << " Cell of id "<< cell->ID()
184  <<" : TileHelper is_tile, but TileCell pointer is 0 "
185  << endmsg;
186 
187 
188  return StatusCode::SUCCESS;
189  }

◆ fillAgain()

virtual StatusCode D3PD::BlockFillerTool< CaloCell >::fillAgain ( const T &  p)
virtualinherited

Fill one block, after AGAIN has been returned (type-safe).

Parameters
pThe input object.

Once fill returns AGAIN, the parent should call fillAgain with the same arguments. This continues until fillAgain returns something other than AGAIN.

By default, this just calls fill().

◆ fillUntyped()

virtual StatusCode D3PD::BlockFillerTool< CaloCell >::fillUntyped ( const void *  p,
bool  again = false 
)
virtualinherited

Fill one block.

Parameters
pThe input object.
againSet if this is a subsequent call requested by an AGAIN return

This is called once per object. The type of the object at which p points is given by the ti argument to configureD3PD. The caller is responsible for arranging that all the pointers for booked variables are set appropriately upon entry.

If the return status is the special code AGAIN (defined above), then this filler tool wants to make multiple entries. The parent should set up to capture a new ‘row’ and run through the list of block filler tools again, but for this tool call fillAgainUntyped instead of fillUntyped. This should be repeated as long as fillAgainUntyped returns AGAIN.

Once fillUntyped returns AGAIN, the parent should call fillUntyped with the same p argument and again set to true. This continues until fillUntyped returns something other than AGAIN.

Not all parents may support this. In that case, returning AGAIN will be treated as an error.

◆ initialize()

StatusCode D3PD::TileCellDetailsFillerTool::initialize ( )
virtual

Standard Gaudi initialize method.

@ brief Standard Gaudi initialize method.

Definition at line 49 of file TileCellDetailsFillerTool.cxx.

50  {
52  CHECK( service("DetectorStore",detStore) );
53  CHECK( detStore->retrieve(m_tileid) );
54  CHECK( detStore->retrieve(m_tilehwid) );
55  CHECK( m_tileBadChanTool.retrieve() );
58 
59  if (m_run2plus) {
60  for (int ros = 3; ros < 5; ++ros) {
61  for (int drawer = 0; drawer < 64; ++drawer) {
63  m_notRealE1run2[ros - 3][drawer2] = (drawer2 != 0);
64  }
65  }
66  }
67 
68  return StatusCode::SUCCESS;
69  }

Member Data Documentation

◆ m_blockName

std::string D3PD::BlockFillerToolImpl::m_blockName
privateinherited

Property: the name of this block.

Definition at line 118 of file BlockFillerToolImpl.h.

◆ m_cabling

const TileCablingService* D3PD::TileCellDetailsFillerTool::m_cabling
private

Definition at line 61 of file TileCellDetailsFillerTool.h.

◆ m_chan1Cells

short* D3PD::TileCellDetailsFillerTool::m_chan1Cells
private

Definition at line 109 of file TileCellDetailsFillerTool.h.

◆ m_chan2Cells

short* D3PD::TileCellDetailsFillerTool::m_chan2Cells
private

Definition at line 110 of file TileCellDetailsFillerTool.h.

◆ m_converter

TypeConverter D3PD::BlockFillerToolImpl::m_converter
privateinherited

Helper to do type conversions.

Definition at line 121 of file BlockFillerToolImpl.h.

◆ m_ediffCells

float* D3PD::TileCellDetailsFillerTool::m_ediffCells
private

Definition at line 102 of file TileCellDetailsFillerTool.h.

◆ m_gain1Cells

short* D3PD::TileCellDetailsFillerTool::m_gain1Cells
private

Definition at line 107 of file TileCellDetailsFillerTool.h.

◆ m_gain2Cells

short* D3PD::TileCellDetailsFillerTool::m_gain2Cells
private

Definition at line 108 of file TileCellDetailsFillerTool.h.

◆ m_metadata

ObjectMetadata D3PD::AddVariable::m_metadata
protectedinherited

Metadata about the variables created by this object.

Definition at line 129 of file AddVariable.h.

◆ m_moduleCells

uint16_t* D3PD::TileCellDetailsFillerTool::m_moduleCells
private

Definition at line 103 of file TileCellDetailsFillerTool.h.

◆ m_notRealE1run2

bool D3PD::TileCellDetailsFillerTool::m_notRealE1run2[2][64]
private

Definition at line 120 of file TileCellDetailsFillerTool.h.

◆ m_partitionCells

uint16_t* D3PD::TileCellDetailsFillerTool::m_partitionCells
private

Definition at line 104 of file TileCellDetailsFillerTool.h.

◆ m_pmt1Cells

short* D3PD::TileCellDetailsFillerTool::m_pmt1Cells
private

Definition at line 111 of file TileCellDetailsFillerTool.h.

◆ m_pmt2Cells

short* D3PD::TileCellDetailsFillerTool::m_pmt2Cells
private

Definition at line 112 of file TileCellDetailsFillerTool.h.

◆ m_prefix

std::string D3PD::BlockFillerToolImpl::m_prefix
privateinherited

Property: the variable prefix for this block.

Definition at line 112 of file BlockFillerToolImpl.h.

◆ m_qbits1

uint8_t* D3PD::TileCellDetailsFillerTool::m_qbits1
private

Definition at line 117 of file TileCellDetailsFillerTool.h.

◆ m_qbits2

uint8_t* D3PD::TileCellDetailsFillerTool::m_qbits2
private

Definition at line 118 of file TileCellDetailsFillerTool.h.

◆ m_qual1Cells

uint16_t* D3PD::TileCellDetailsFillerTool::m_qual1Cells
private

Definition at line 115 of file TileCellDetailsFillerTool.h.

◆ m_qual2Cells

uint16_t* D3PD::TileCellDetailsFillerTool::m_qual2Cells
private

Definition at line 116 of file TileCellDetailsFillerTool.h.

◆ m_run2plus

bool D3PD::TileCellDetailsFillerTool::m_run2plus
private

Definition at line 68 of file TileCellDetailsFillerTool.h.

◆ m_sampleCells

uint16_t* D3PD::TileCellDetailsFillerTool::m_sampleCells
private

Definition at line 106 of file TileCellDetailsFillerTool.h.

◆ m_saveCellDetails

bool D3PD::TileCellDetailsFillerTool::m_saveCellDetails
private

Definition at line 65 of file TileCellDetailsFillerTool.h.

◆ m_savePosition

bool D3PD::TileCellDetailsFillerTool::m_savePosition
private

Definition at line 66 of file TileCellDetailsFillerTool.h.

◆ m_status1Cells

uint16_t* D3PD::TileCellDetailsFillerTool::m_status1Cells
private

Definition at line 113 of file TileCellDetailsFillerTool.h.

◆ m_status2Cells

uint16_t* D3PD::TileCellDetailsFillerTool::m_status2Cells
private

Definition at line 114 of file TileCellDetailsFillerTool.h.

◆ m_suffix

std::string D3PD::BlockFillerToolImpl::m_suffix
privateinherited

Property: the variable prefix for this block.

Definition at line 115 of file BlockFillerToolImpl.h.

◆ m_tdiffCells

float* D3PD::TileCellDetailsFillerTool::m_tdiffCells
private

Definition at line 101 of file TileCellDetailsFillerTool.h.

◆ m_tileBadChanTool

ToolHandle<ITileBadChanTool> D3PD::TileCellDetailsFillerTool::m_tileBadChanTool
private

Definition at line 63 of file TileCellDetailsFillerTool.h.

◆ m_tilehwid

const TileHWID* D3PD::TileCellDetailsFillerTool::m_tilehwid
private

Definition at line 60 of file TileCellDetailsFillerTool.h.

◆ m_tileid

const TileID* D3PD::TileCellDetailsFillerTool::m_tileid
private

Definition at line 59 of file TileCellDetailsFillerTool.h.

◆ m_timeCells

float* D3PD::TileCellDetailsFillerTool::m_timeCells
private
  • Cell Energy in MeV
  • Eta position
  • Phi position- Number of Tile cells
  • Cell time in ns
  • X position
  • Y position
  • Z position
  • Difference of PMTs measurements:
  • PMTs Energy difference : (E1-E2).
  • PMTs Time difference : as (T1-T2)/2
  • Module number 1-64 : 1-64 module number by phi
  • Partition Number 1-4 : 1=LBA; 2=LBC; 3=EBA; 4= EBC
  • tower(eta) 0-15 : tower number by pseudorapidity with 0.1 increment in eta
  • sample 0-15 : 0 = A, 1 = B = BC = C, 2 = D, 3 = special gap scin cells E1-E4; >3 indiv. tile used in Cs calib
  • gain 0-1 : low-high gain; -1 PMT not available
  • chan 0-47 : channel number
  • PMT 1-48 : PMT number
  • Status 32-bit word : Bad channel word (0=good, bits correspond to specific hw or calib problems )
  • Quality Factor : The unsigned quality from TileRawChannel
  • Quality Bits : Bit mask containing channel quality info. See TileCell.h

Definition at line 97 of file TileCellDetailsFillerTool.h.

◆ m_towerCells

uint16_t* D3PD::TileCellDetailsFillerTool::m_towerCells
private

Definition at line 105 of file TileCellDetailsFillerTool.h.

◆ m_tree

IAddVariable* D3PD::AddVariable::m_tree
privateinherited

Reference to the block name.

The parent IAddVariable instance.

Definition at line 143 of file AddVariable.h.

◆ m_xCells

float* D3PD::TileCellDetailsFillerTool::m_xCells
private

Definition at line 98 of file TileCellDetailsFillerTool.h.

◆ m_yCells

float* D3PD::TileCellDetailsFillerTool::m_yCells
private

Definition at line 99 of file TileCellDetailsFillerTool.h.

◆ m_zCells

float* D3PD::TileCellDetailsFillerTool::m_zCells
private

Definition at line 100 of file TileCellDetailsFillerTool.h.

◆ s_emptyString

const std::string D3PD::AddVariable::s_emptyString
staticprivateinherited

Used to provide a default value for blockName.

Definition at line 41 of file AddVariable.h.


The documentation for this class was generated from the following files:
D3PD::TileCellDetailsFillerTool::E1_CHANNEL
@ E1_CHANNEL
Definition: TileCellDetailsFillerTool.h:121
TileCell
Definition: TileCell.h:57
D3PD::TileCellDetailsFillerTool::m_status1Cells
uint16_t * m_status1Cells
Definition: TileCellDetailsFillerTool.h:113
CaloDetDescrElement::onl2
IdentifierHash onl2() const
cell online identifier 2
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:408
D3PD::TileCellDetailsFillerTool::m_chan1Cells
short * m_chan1Cells
Definition: TileCellDetailsFillerTool.h:109
D3PD::TileCellDetailsFillerTool::m_pmt1Cells
short * m_pmt1Cells
Definition: TileCellDetailsFillerTool.h:111
D3PD::ObjectMetadata::addDimensionedVariable
virtual StatusCode addDimensionedVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &dim, const std::string &docstring="", const void *defval=0)
The object doesn't support dimensioned variables at the moment, like most of the D3PDMaker code doesn...
Definition: ObjectMetadata.cxx:157
yodamerge_tmp.dim
dim
Definition: yodamerge_tmp.py:239
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
TileCablingService::getInstance
static const TileCablingService * getInstance()
get pointer to service instance
Definition: TileCablingService.cxx:24
CaloCell::y
float y() const
get y (through CaloDetDescrElement)
Definition: CaloCell.h:420
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
D3PD::TileCellDetailsFillerTool::m_tileBadChanTool
ToolHandle< ITileBadChanTool > m_tileBadChanTool
Definition: TileCellDetailsFillerTool.h:63
D3PD::TileCellDetailsFillerTool::m_chan2Cells
short * m_chan2Cells
Definition: TileCellDetailsFillerTool.h:110
D3PD::TypeConverter::dstName
std::string dstName() const
Return the name of the destination type, or an empty string.
Definition: TypeConverter.cxx:151
D3PD::AddVariable::configureD3PD
StatusCode configureD3PD(IAddVariable *tree)
Configure the parent tree.
Definition: AddVariable.cxx:61
D3PD::AddVariable::m_suffix
const std::string & m_suffix
Reference to the variable suffix.
Definition: AddVariable.h:137
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
TileCell::badch1
bool badch1(void) const
check if first PMT is in bad channel list and masked
Definition: TileCell.h:215
tree
TChain * tree
Definition: tile_monitor.h:30
CaloTime_fillDB.gain2
gain2
Definition: CaloTime_fillDB.py:357
D3PD::AddVariable::m_prefix
const std::string & m_prefix
Reference to the variable prefix.
Definition: AddVariable.h:134
Tile_Base_ID::sample
int sample(const Identifier &id) const
Definition: Tile_Base_ID.cxx:171
D3PD::TileCellDetailsFillerTool::m_savePosition
bool m_savePosition
Definition: TileCellDetailsFillerTool.h:66
D3PD::TileCellDetailsFillerTool::m_sampleCells
uint16_t * m_sampleCells
Definition: TileCellDetailsFillerTool.h:106
D3PD::AddVariable::addVariable
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Add a variable to the tuple.
Definition: AddVariable.cxx:85
D3PD::TileCellDetailsFillerTool::m_tileid
const TileID * m_tileid
Definition: TileCellDetailsFillerTool.h:59
Tile_Base_ID::tower
int tower(const Identifier &id) const
Definition: Tile_Base_ID.cxx:165
CaloCell::time
float time() const
get time (data member)
Definition: CaloCell.h:352
HWIdentifier
Definition: HWIdentifier.h:13
D3PD::TileCellDetailsFillerTool::m_qual2Cells
uint16_t * m_qual2Cells
Definition: TileCellDetailsFillerTool.h:116
TileCell::MASK_BADCH
@ MASK_BADCH
Definition: TileCell.h:63
D3PD::AddVariable::m_tree
IAddVariable * m_tree
Reference to the block name.
Definition: AddVariable.h:143
Example_ReadSampleNoise.drawer
drawer
Definition: Example_ReadSampleNoise.py:39
D3PD::TypeConverter::init
StatusCode init(const std::type_info &src_ti, const std::type_info &dst_ti)
Initialize the converter.
Definition: TypeConverter.cxx:51
TileHWID::channel
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
Definition: TileHWID.h:189
D3PD::TileCellDetailsFillerTool::m_saveCellDetails
bool m_saveCellDetails
Definition: TileCellDetailsFillerTool.h:65
D3PD::TileCellDetailsFillerTool::m_pmt2Cells
short * m_pmt2Cells
Definition: TileCellDetailsFillerTool.h:112
TileHWID::ros
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
Definition: TileHWID.h:167
D3PD::TileCellDetailsFillerTool::m_notRealE1run2
bool m_notRealE1run2[2][64]
Definition: TileCellDetailsFillerTool.h:120
CaloDetDescrElement::onl1
IdentifierHash onl1() const
cell online identifier 1
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:404
D3PD::TypeConverter::srcName
std::string srcName() const
Return the name of the source type, or an empty string.
Definition: TypeConverter.cxx:141
D3PD::TileCellDetailsFillerTool::m_qbits1
uint8_t * m_qbits1
Definition: TileCellDetailsFillerTool.h:117
D3PD::TileCellDetailsFillerTool::m_yCells
float * m_yCells
Definition: TileCellDetailsFillerTool.h:99
python.PyAthena.module
module
Definition: PyAthena.py:134
TileCell::timeDiff
float timeDiff(void) const
get time diff for two PMTs (data member)
Definition: TileCell.h:190
D3PD::AddVariable::m_metadata
ObjectMetadata m_metadata
Metadata about the variables created by this object.
Definition: AddVariable.h:129
TileCell::qual2
uint8_t qual2(void) const
get quality of second PMT (data member)
Definition: TileCell.h:206
D3PD::TileCellDetailsFillerTool::DumpCellInfo
void DumpCellInfo()
Definition: TileCellDetailsFillerTool.cxx:191
TileCablingService::isRun2PlusCabling
bool isRun2PlusCabling() const
Definition: TileCablingService.h:278
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
D3PD::TypeConverter::convertUntyped
const void * convertUntyped(const void *p) const
Convert pointer.
Definition: TypeConverter.cxx:116
D3PD::TileCellDetailsFillerTool::m_timeCells
float * m_timeCells
Definition: TileCellDetailsFillerTool.h:97
Tile_Base_ID::module
int module(const Identifier &id) const
Definition: Tile_Base_ID.cxx:159
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
CaloCell::caloDDE
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition: CaloCell.h:305
TileCell::badch2
bool badch2(void) const
check if second PMT is in bad channel list and masked
Definition: TileCell.h:218
D3PD::TileCellDetailsFillerTool::m_towerCells
uint16_t * m_towerCells
Definition: TileCellDetailsFillerTool.h:105
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
python.LArCondContChannels.chan1
chan1
Definition: LArCondContChannels.py:666
TileCell::qbit1
uint8_t qbit1(void) const
get quality bits of first PMT (data member)
Definition: TileCell.h:209
D3PD::ObjectMetadata::clear
void clear()
Function clearing the object.
Definition: ObjectMetadata.cxx:352
maskDeadModules.ros
ros
Definition: maskDeadModules.py:35
python.Utils.unixtools.which
def which(filename, env=os.environ)
UNIX-style which ---------------------------------------------------------—.
Definition: unixtools.py:39
TileCell::gain1
int gain1(void) const
get gain of first PMT
Definition: TileCell.cxx:182
TileCell::eneDiff
float eneDiff(void) const
all get methods
Definition: TileCell.h:188
D3PD::TileCellDetailsFillerTool::m_tdiffCells
float * m_tdiffCells
Definition: TileCellDetailsFillerTool.h:101
D3PD::BlockFillerToolImpl::m_converter
TypeConverter m_converter
Helper to do type conversions.
Definition: BlockFillerToolImpl.h:121
D3PD::TileCellDetailsFillerTool::m_status2Cells
uint16_t * m_status2Cells
Definition: TileCellDetailsFillerTool.h:114
D3PD::TileCellDetailsFillerTool::m_cabling
const TileCablingService * m_cabling
Definition: TileCellDetailsFillerTool.h:61
CaloTime_fillDB.gain1
gain1
Definition: CaloTime_fillDB.py:356
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
D3PD::TileCellDetailsFillerTool::m_qual1Cells
uint16_t * m_qual1Cells
Definition: TileCellDetailsFillerTool.h:115
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
D3PD::TileCellDetailsFillerTool::m_tilehwid
const TileHWID * m_tilehwid
Definition: TileCellDetailsFillerTool.h:60
D3PD::ObjectMetadata::addVariable
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
This function can be used to save the metadata about a D3PD variable.
Definition: ObjectMetadata.cxx:109
CaloCell::ID
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition: CaloCell.h:279
D3PD::TileCellDetailsFillerTool::m_zCells
float * m_zCells
Definition: TileCellDetailsFillerTool.h:100
D3PD::TileCellDetailsFillerTool::book
virtual StatusCode book()
Declare tuple variables.
Definition: TileCellDetailsFillerTool.cxx:72
D3PD::TileCellDetailsFillerTool::m_gain1Cells
short * m_gain1Cells
Definition: TileCellDetailsFillerTool.h:107
REPORT_MESSAGE
#define REPORT_MESSAGE(LVL)
Report a message.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:365
TileHWID::adc_id
HWIdentifier adc_id(int ros, int drawer, int channel, int adc) const
adc HWIdentifer
Definition: TileHWID.cxx:228
TileCell::qbit2
uint8_t qbit2(void) const
get quality bits of second PMT (data member)
Definition: TileCell.h:212
D3PD::TileCellDetailsFillerTool::m_partitionCells
uint16_t * m_partitionCells
Definition: TileCellDetailsFillerTool.h:104
TileCell::gain2
int gain2(void) const
get gain of second PMT
Definition: TileCell.cxx:189
TileHWID::NOT_VALID_HASH
@ NOT_VALID_HASH
Definition: TileHWID.h:314
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
Tile_Base_ID::to_string
std::string to_string(const Identifier &id, int level=0) const
Definition: Tile_Base_ID.cxx:52
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TileCablingService::channel2hole
static int channel2hole(int ros, int channel)
Definition: TileCablingService.cxx:1946
DEBUG
#define DEBUG
Definition: page_access.h:11
CaloCell::z
float z() const
get z (through CaloDetDescrElement)
Definition: CaloCell.h:427
StateLessPT_NewConfig.partition
partition
Definition: StateLessPT_NewConfig.py:49
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
CaloCell::x
float x() const
get x (through CaloDetDescrElement)
Definition: CaloCell.h:413
D3PD::IAddVariable::addVariable
StatusCode addVariable(const std::string &name, T *&ptr, const std::string &docstring="")
Add a variable to the tuple.
TileCell::qual1
uint8_t qual1(void) const
get quality of first PMT (data member)
Definition: TileCell.h:203
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
D3PD::IAddVariable::addDimensionedVariable
StatusCode addDimensionedVariable(const std::string &name, T *&ptr, const std::string &dim, const std::string &docstring="")
Add a variable to the tuple.
D3PD::TileCellDetailsFillerTool::m_qbits2
uint8_t * m_qbits2
Definition: TileCellDetailsFillerTool.h:118
D3PD::TileCellDetailsFillerTool::m_moduleCells
uint16_t * m_moduleCells
Definition: TileCellDetailsFillerTool.h:103
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
D3PD::TileCellDetailsFillerTool::m_run2plus
bool m_run2plus
Definition: TileCellDetailsFillerTool.h:68
TileHWID::to_string
std::string to_string(const HWIdentifier &id, int level=0) const
extract all fields from HW identifier HWIdentifier get_all_fields ( const HWIdentifier & id,...
Definition: TileHWID.cxx:49
IdentifierHash
Definition: IdentifierHash.h:38
D3PD::TileCellDetailsFillerTool::m_ediffCells
float * m_ediffCells
Definition: TileCellDetailsFillerTool.h:102
TileCablingService::E1_merged_with_run2plus
int E1_merged_with_run2plus(int ros, int module) const
Definition: TileCablingService.cxx:2457
D3PD::TileCellDetailsFillerTool::m_gain2Cells
short * m_gain2Cells
Definition: TileCellDetailsFillerTool.h:108
D3PD::TileCellDetailsFillerTool::m_xCells
float * m_xCells
Definition: TileCellDetailsFillerTool.h:98