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

#include <TBXMLCaloCellWriterTool.h>

Inheritance diagram for TBXMLCaloCellWriterTool:
Collaboration diagram for TBXMLCaloCellWriterTool:

Public Member Functions

 TBXMLCaloCellWriterTool (const std::string &type, const std::string &name, const IInterface *parent)
 tool constructor More...
 
 ~TBXMLCaloCellWriterTool ()
 
virtual StatusCode initialize () override
 
virtual StatusCode writeOut (std::ostream &outStream, const std::string &entryTag=" ")
 
virtual StatusCode finalize () override
 
virtual StatusCode finalize (std::ostream &outStream)
 
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 sysInitialize () override
 Perform system initialization for an algorithm. 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
 

Protected Member Functions

virtual StatusCode writeRunFiles (const std::string &fileDir, unsigned int runNumber) override
 
virtual StatusCode writeEvent (std::ostream &outFile, const std::string &) override
 
virtual StatusCode convertProperties ()
 
virtual void openDictionary (std::ostream &outStream, const std::string &dictName, const std::vector< std::string > &listOfElements)
 
virtual void openDictionary (std::ostream &outStream, const std::string &dictName)
 
virtual void closeDictionary (std::ostream &outStream)
 
virtual void addDictElement (std::ostream &outStream, const std::string &theElement, const std::vector< std::string > &listOfElements)
 
virtual void addAttributes (std::ostream &outStream, const std::string &theElement, const std::vector< std::string > &listOfAttributes)
 
virtual void openElement (std::ostream &outStream, const std::string &theElement, const std::vector< std::string > &listOfAttr, const std::vector< std::string > &listOfValues)
 
virtual void closeElement (std::ostream &outStream, const std::string &theElement)
 
virtual void closeElement (std::ostream &outStream)
 
virtual void closeAllElements (std::ostream &outStream)
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

std::vector< std::string > m_elementList
 
std::string m_dictionary
 

Static Protected Attributes

static const std::string m_doubleQuote = "\042"
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

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...
 

Private Attributes

std::vector< std::string > m_includedCalos
 
std::vector< std::string > m_includedSamplings
 
double m_etaMin
 
double m_etaMax
 
double m_phiMin
 
double m_phiMax
 
bool m_firstEvent
 
std::vector< CaloCell_ID::SUBCALOm_caloIndices
 
std::vector< CaloSampling::CaloSamplem_caloSamplings
 
std::string m_cellContainer
 
const CaloCell_IDm_idHelper
 
const TBXMLWriterm_mother
 
std::unordered_set< EventIDBase::number_type > m_runNumbers
 
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey
 
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
 

Static Private Attributes

static const unsigned int m_nCols = 2
 

Detailed Description

Definition at line 26 of file TBXMLCaloCellWriterTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TBXMLCaloCellWriterTool()

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

tool constructor

Definition at line 45 of file TBXMLCaloCellWriterTool.cxx.

49  , m_etaMin(-5.0)
50  , m_etaMax(5.0)
51  , m_phiMin(0.*deg)
52  , m_phiMax(360.*deg)
53  , m_firstEvent(true)
54  , m_idHelper(0)
55 {
56  declareProperty("InputCellContainer", m_cellContainer);
57  declareProperty("IncludedCalos", m_includedCalos);
58  declareProperty("IncludedSamplings", m_includedSamplings);
59  declareProperty("EtaMin", m_etaMin);
60  declareProperty("EtaMax", m_etaMax);
61  declareProperty("PhiMin", m_phiMin);
62  declareProperty("PhiMax", m_phiMax);
63  // save pointer to algorithm
64  m_mother = dynamic_cast<const TBXMLWriter*>(parent);
65 }

◆ ~TBXMLCaloCellWriterTool()

TBXMLCaloCellWriterTool::~TBXMLCaloCellWriterTool ( )

Definition at line 67 of file TBXMLCaloCellWriterTool.cxx.

68 { }

Member Function Documentation

◆ addAttributes()

void TBXMLWriterToolBase::addAttributes ( std::ostream &  outStream,
const std::string &  theElement,
const std::vector< std::string > &  listOfAttributes 
)
protectedvirtualinherited

Definition at line 93 of file TBXMLWriterToolBase.cxx.

97 {
98  outStream << " <!ATTLIST " << theElement << std::endl;
99  for ( unsigned int i=0; i<listOfAttr.size(); i++ )
100  {
101  outStream << " " << listOfAttr[i] << std::endl;
102  }
103  outStream << ">" << std::endl;
104 }

◆ addDictElement()

void TBXMLWriterToolBase::addDictElement ( std::ostream &  outStream,
const std::string &  theElement,
const std::vector< std::string > &  listOfElements 
)
protectedvirtualinherited

Definition at line 59 of file TBXMLWriterToolBase.cxx.

63 {
64  outStream << "<!ELEMENT " << theElement;
65  // add document as element
66  if ( listOfElements.size() == 0 )
67  {
68  outStream << ">" << std::endl;
69  }
70  else
71  {
72  // store elements
73  if ( listOfElements[0] == "ANY" ||
74  listOfElements[0] == "EMPTY" ||
75  listOfElements[0] == "ALL" )
76  {
77  outStream << " " << listOfElements[0] << " >" << std::endl;
78  }
79  else
80  {
81  outStream << " (" << listOfElements[0];
82  for ( unsigned int i=1; i<listOfElements.size(); i++ )
83  {
84  outStream << "," << listOfElements[i];
85  }
86  outStream << ") >" << std::endl;
87  }
88  }
89 }

◆ closeAllElements()

void TBXMLWriterToolBase::closeAllElements ( std::ostream &  outStream)
protectedvirtualinherited

Definition at line 161 of file TBXMLWriterToolBase.cxx.

162 {
163  for ( int i=m_elementList.size()-1; i>=0; i-- )
164  {
165  outStream << "</" << m_elementList[i] << ">" << std::endl;
166  }
167  m_elementList.clear();
168 }

◆ closeDictionary()

void TBXMLWriterToolBase::closeDictionary ( std::ostream &  outStream)
protectedvirtualinherited

Definition at line 52 of file TBXMLWriterToolBase.cxx.

53 {
54  outStream << "]>" << std::endl;
55 }

◆ closeElement() [1/2]

void TBXMLWriterToolBase::closeElement ( std::ostream &  outStream)
protectedvirtualinherited

Definition at line 132 of file TBXMLWriterToolBase.cxx.

133 {
134  unsigned int thisSize = m_elementList.size() - 1;
135  outStream << "</" << m_elementList[thisSize] << ">" << std::endl;
136  m_elementList.resize(thisSize);
137 }

◆ closeElement() [2/2]

void TBXMLWriterToolBase::closeElement ( std::ostream &  outStream,
const std::string &  theElement 
)
protectedvirtualinherited

Definition at line 141 of file TBXMLWriterToolBase.cxx.

143 {
145  find( m_elementList.begin(), m_elementList.end(), theElement);
146  if ( inVec != m_elementList.end() )
147  {
148  outStream << "</" << (*inVec) << ">" << std::endl;
149  m_elementList.erase(inVec);
150  }
151  else
152  {
153  outStream << "<!-- XML Structural Problem! \n\n"
154  << " cannot find an element " << theElement << "!\n\n"
155  << "-->" << std::endl;
156  }
157 }

◆ convertProperties()

StatusCode TBXMLCaloCellWriterTool::convertProperties ( )
protectedvirtual

Definition at line 437 of file TBXMLCaloCellWriterTool.cxx.

438 {
439  // messaging
440  MsgStream log(msgSvc(),name());
441 
442  // get calo id helper
443  ATH_CHECK( detStore()->retrieve (m_idHelper, "CaloCell_ID") );
444 
446  // Get Calo Indices //
448 
451  while ( firstCalo != lastCalo )
452  {
453  if ( *firstCalo == "LAREM" )
454  {
456  ++firstCalo;
457  }
458  else if ( *firstCalo == "LARHEC" )
459  {
461  ++firstCalo;
462  }
463  else if ( *firstCalo == "LARFCAL" )
464  {
466  ++firstCalo;
467  }
468  else if ( *firstCalo == "TILE" )
469  {
470  m_caloIndices.push_back(CaloCell_ID::TILE);
471  ++firstCalo;
472  }
473  else
474  {
475  firstCalo = m_includedCalos.erase(firstCalo);
476  }
477  }
478 
480  // Get CaloSamplings //
482 
483  // nasty (no switch on string types...)
484  for (const std::string& sample : m_includedSamplings)
485  {
486  // H8 calos
487  if ( sample == "PreSamplerB" )
489  if ( sample == "EMB0" )
491  if ( sample == "EMB1" )
493  if ( sample == "EMB2" )
495  if ( sample == "TileBar0" )
497  if ( sample == "TileBar1" )
499  if ( sample == "TileBar2" )
501  if ( sample == "TileExt0" )
503  if ( sample == "TileExt1" )
505  if ( sample == "TileExt2" )
507 
508  // H6 calos
509  if ( sample == "EME1" )
511  if ( sample == "EME2" )
513  if ( sample == "HEC0" )
515  if ( sample == "HEC1" )
517  if ( sample == "HEC2" )
519  if ( sample == "HEC3" )
521  if ( sample == "FCAL0" )
523  if ( sample == "FCAL1" )
525  if ( sample == "FCAL2" )
527  }
528 
529  return m_caloSamplings.size() == 0 && m_caloIndices.size() == 0
530  ? StatusCode::FAILURE
531  : StatusCode::SUCCESS;
532 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

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

◆ finalize() [1/2]

virtual StatusCode TBXMLWriterToolBase::finalize ( )
inlineoverridevirtualinherited

Definition at line 51 of file TBXMLWriterToolBase.h.

52  {
53  return StatusCode::SUCCESS;
54  }

◆ finalize() [2/2]

virtual StatusCode TBXMLWriterToolBase::finalize ( std::ostream &  outStream)
inlinevirtualinherited

Definition at line 56 of file TBXMLWriterToolBase.h.

57  {
58  this->closeAllElements(outStream);
59  return this->finalize();
60  }

◆ initialize()

StatusCode TBXMLCaloCellWriterTool::initialize ( )
overridevirtual

Reimplemented from TBXMLWriterToolBase.

Definition at line 70 of file TBXMLCaloCellWriterTool.cxx.

71 {
74  return StatusCode::SUCCESS;
75 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

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]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ openDictionary() [1/2]

void TBXMLWriterToolBase::openDictionary ( std::ostream &  outStream,
const std::string &  dictName 
)
protectedvirtualinherited

Definition at line 43 of file TBXMLWriterToolBase.cxx.

45 {
46  std::vector<std::string> emptyList;
47  this->openDictionary(outStream,dictName, emptyList);
48 }

◆ openDictionary() [2/2]

void TBXMLWriterToolBase::openDictionary ( std::ostream &  outStream,
const std::string &  dictName,
const std::vector< std::string > &  listOfElements 
)
protectedvirtualinherited

Definition at line 20 of file TBXMLWriterToolBase.cxx.

24 {
25  // clean up
26  m_elementList.clear();
27  m_dictionary = dictName;
28 
29  // write header
30  outStream << "<?XML version=" << m_doubleQuote
31  << "1" << m_doubleQuote << "?>" << std::endl;
32 
33  // write begin of dictionary
34  outStream << "<!DOCTYPE " << dictName
35  << " [" << std::endl;
36 
37  // add doctype as element
38  this->addDictElement(outStream,dictName,listOfElements);
39 }

◆ openElement()

void TBXMLWriterToolBase::openElement ( std::ostream &  outStream,
const std::string &  theElement,
const std::vector< std::string > &  listOfAttr,
const std::vector< std::string > &  listOfValues 
)
protectedvirtualinherited

Definition at line 108 of file TBXMLWriterToolBase.cxx.

114 {
115  m_elementList.push_back(theElement);
116  outStream << "<" << theElement;
117  if ( listOfAttr.size() > 0 && listOfValues.size() == listOfAttr.size() )
118  {
119  for ( unsigned int i=0; i<listOfAttr.size(); i++ )
120  {
121  outStream << " " << listOfAttr[i] << "="
122  << m_doubleQuote
123  << listOfValues[i]
124  << m_doubleQuote;
125  }
126  }
127  outStream << ">" << std::endl;
128 }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

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()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

◆ writeEvent()

StatusCode TBXMLCaloCellWriterTool::writeEvent ( std::ostream &  outFile,
const std::string &   
)
overrideprotectedvirtual

Implements TBXMLWriterToolBase.

Definition at line 82 of file TBXMLCaloCellWriterTool.cxx.

84 {
85  // messaging
86  MsgStream log(msgSvc(),name());
87 
89  // On the Fly Initialization //
91 
92  if ( m_firstEvent )
93  {
94  // check pointer
95  if ( m_mother == 0 )
96  {
97  log << MSG::ERROR
98  << "tool does not hang off the TBXMLWriter algorithm."
99  << endmsg;
100  return StatusCode::FAILURE;
101  }
102 
103  // convert poperties
104  StatusCode checkOut = this->convertProperties();
105  if ( checkOut.isFailure() )
106  {
107  log << MSG::ERROR
108  << "cannot convert properties correctly!"
109  << endmsg;
110  return StatusCode::FAILURE;
111  }
112  m_firstEvent = false;
113 
114  // print out configuration
115  log << MSG::INFO
116  << "list of included calo samplings:"
117  << endmsg;
118  for ( unsigned int i=0; i<m_caloSamplings.size(); i++ )
119  {
120  log << MSG::INFO
121  << "Sampling \042"
123  << "\042 with SubCalo index "
124  << (int)m_caloSamplings[i]
125  << endmsg;
126  }
127  }
128 
130  // Check On Begin Run //
132 
133  const EventContext& ctx = Gaudi::Hive::currentContext();
134  EventIDBase::number_type run_number = ctx.eventID().run_number();
135  if (m_runNumbers.insert (run_number).second) {
136  StatusCode checkOut = this->writeRunFiles(m_mother->getFileDir(),
137  run_number);
138  if ( checkOut.isFailure() )
139  {
140  log << MSG::ERROR
141  << "cannot produce run XML files."
142  << endmsg;
143  return StatusCode::FAILURE;
144  }
145  }
146 
147 
149  // Retrieve Data from StoreGate //
151 
152  const CaloCellContainer* theContainer = 0;
153  ATH_CHECK( evtStore()->retrieve(theContainer,m_cellContainer) );
154 
156  // Loop Individual Calorimeters //
158 
159  for ( unsigned int i=0; i<m_caloIndices.size(); i++ )
160  {
161  // write container tag
162  outStream << "<!-- TBXMLCaloCellWriterTool: begin write cell container "
163  << m_includedCalos[i] << " -->" << std::endl;
164 
165  std::vector<std::string> theCellAttrNames;
166  theCellAttrNames.push_back("name");
167  theCellAttrNames.push_back("ncols");
168  theCellAttrNames.push_back("nrows");
169  theCellAttrNames.push_back("idtype");
170  theCellAttrNames.push_back("etype");
171  std::vector<std::string> theCellAttrValues;
172  theCellAttrValues.push_back(m_includedCalos[i]);
173  std::ostringstream theCols;
174  theCols << m_nCols << std::ends;
175 
176  // get data size
177  unsigned int dataSize = theContainer->nCellsCalo(m_caloIndices[i]);
178  unsigned int nRows =
179  (unsigned int)ceil( (double)dataSize / (double)m_nCols );
180  std::ostringstream theRows;
181  theRows << nRows << std::ends;
182  theCellAttrValues.push_back(theCols.str());
183  theCellAttrValues.push_back(theRows.str());
184  theCellAttrValues.push_back("uint");
185  theCellAttrValues.push_back("double");
186  this->openElement(outStream,"CaloCellContainer",
187  theCellAttrNames,theCellAttrValues);
188 
189  // loop on cells
191  theContainer->beginConstCalo(m_caloIndices[i]);
193  theContainer->endConstCalo(m_caloIndices[i]);
194 
195  // baseline index
196  IdentifierHash baseIndex, lastIndex;
198  baseIndex, lastIndex);
199 
200  unsigned int theCtr = 0;
201  bool isTerminated = false;
202  for ( ; firstCell != lastCell; ++firstCell )
203  {
204  // check if cell in requested layer and range
205  double eta = (*firstCell)->eta();
206  double phi = (*firstCell)->phi();
207  const CaloDetDescrElement * theCaloDDE= (*firstCell)->caloDDE();
208  CaloSampling::CaloSample theLayer;
209  if (theCaloDDE) {
210  theLayer = (CaloSampling::CaloSample) theCaloDDE->getSampling();
211  }else{
212  theLayer = CaloSampling::Unknown;
213  }
214  if ( ( std::find(m_caloSamplings.begin(),
215  m_caloSamplings.end(),
216  theLayer) != m_caloSamplings.end() ) &&
217  ( ( eta > m_etaMin && eta < m_etaMax ) &&
218  ( phi > m_phiMin && phi < m_phiMax ) )
219  )
220  {
221  // get calorimeter hash index
222  IdentifierHash theIndex =
223  (*firstCell)->caloDDE()->calo_hash();
224  // get eta, phi, region
225  int etaIndex = m_idHelper->eta((*firstCell)->ID());
226  int phiIndex = m_idHelper->phi((*firstCell)->ID());
227  int regIndex = m_idHelper->region((*firstCell)->ID());
228  // int subIndex = m_idHelper->sub_calo((*firstCell)->ID());
229  int lyrIndex = m_idHelper->sampling((*firstCell)->ID());
230  int subIndex = -1;
231  // get subIndex
232  if ( m_idHelper->is_em_barrel((*firstCell)->ID()) )
233  {
234  subIndex = 0;
235  }
236  else if ( m_idHelper->is_em_endcap((*firstCell)->ID()) )
237  {
238  subIndex = 1;
239  }
240  else if ( m_idHelper->is_tile_barrel((*firstCell)->ID()) )
241  {
242  subIndex = 2;
243  }
244  else if ( m_idHelper->is_tile_extbarrel((*firstCell)->ID()) )
245  {
246  subIndex = 3;
247  }
248  else if ( m_idHelper->is_hec((*firstCell)->ID()) )
249  {
250  subIndex = 4;
251  }
252  else if ( m_idHelper->is_fcal((*firstCell)->ID()) )
253  {
254  subIndex = 5;
255  }
256  // get signal
257  double theEnergy = (*firstCell)->e();
258  if ( theCtr == 0 || ( theCtr % m_nCols ) == 0 )
259  {
260  outStream << " ";
261  }
262  theIndex -= (int)baseIndex;
263  boost::io::ios_base_all_saver streamsave (outStream);
264  outStream
265  << std::setw(10) << std::setfill(' ') << theIndex << " "
266  << std::setw(3) << std::setfill(' ') << subIndex << " "
267  << std::setw(3) << std::setfill(' ') << lyrIndex << " "
268  << std::setw(3) << std::setfill(' ') << regIndex << " "
269  << std::setw(3) << std::setfill(' ') << etaIndex << " "
270  << std::setw(3) << std::setfill(' ') << phiIndex << " "
271  << std::setw(10) << std::setprecision(5) << theEnergy;
272  theCtr++;
273  if ( (isTerminated = ( theCtr % m_nCols )) == 0 )
274  {
275  outStream << std::endl;
276  }
277  }
278  }
279  if ( ! isTerminated ) outStream << std::endl;
280  this->closeElement(outStream);
281  // write container tag
282  outStream << "<!-- TBXMLCaloCellWriterTool: end write cell container "
283  << m_includedCalos[i] << " -->" << std::endl;
284  }
285 
286  return StatusCode::SUCCESS;
287 }

◆ writeOut()

virtual StatusCode TBXMLWriterToolBase::writeOut ( std::ostream &  outStream,
const std::string &  entryTag = " " 
)
inlinevirtualinherited

Definition at line 45 of file TBXMLWriterToolBase.h.

47  {
48  return this->writeEvent(outStream,entryTag);
49  }

◆ writeRunFiles()

StatusCode TBXMLCaloCellWriterTool::writeRunFiles ( const std::string &  fileDir,
unsigned int  runNumber 
)
overrideprotectedvirtual

Implements TBXMLWriterToolBase.

Definition at line 294 of file TBXMLCaloCellWriterTool.cxx.

296 {
297 
299  // Write Dictionary //
301 
302  // construct directory and file name
303  std::ostringstream thisFileName;
304  thisFileName << fileDir << "/geom."
305  << std::setw(6) << std::setfill('0')
306  << runNumber << ".xml" << std::ends;
307 
308  std::ofstream thisFileStream((thisFileName.str()).c_str());
309 
310  // Document type
311  std::vector<std::string> theRunElements;
312  theRunElements.push_back("FCalGeomTable*");
313  this->openDictionary(thisFileStream,"FCalGeomTable",theRunElements);
314  std::vector<std::string> theRunAttr;
315  theRunAttr.push_back("name CDATA #REQUIRED");
316  this->addAttributes(thisFileStream,"FCalGeomTable",theRunAttr);
317 
318  // FCal geometry table
319  std::vector<std::string> anyData;
320  anyData.push_back("ANY");
321  this->addDictElement(thisFileStream,"FCalGeomTable",anyData);
322  std::vector<std::string> theGeomAttr;
323  theGeomAttr.push_back("name CDATA #REQUIRED");
324  this->addAttributes(thisFileStream,"FCalGeomTable",theGeomAttr);
325 
326  // close dictionary
327  this->closeDictionary(thisFileStream);
328 
330  // Write Run Geometry //
332 
334  const CaloDetDescrManager* caloDetMgr = *caloMgrHandle;
335  ATH_CHECK( detStore()->retrieve (caloDetMgr, "CaloMgr") );
336 
337  IdentifierHash firstIndex, lastIndex, safeIndex;
339  firstIndex, lastIndex);
340  safeIndex = firstIndex;
341 
342  // open element
343  std::vector<std::string> theRunValues(theRunAttr.size());
344  for ( unsigned int i=0; i<theRunAttr.size(); i++ )
345  {
346  if ( (theRunAttr[i]).find("name") != std::string::npos )
347  {
348  theRunValues[i] = "FCalMod0";
349  theRunAttr[i] =
350  theRunAttr[i].substr(0,theRunAttr[i].find_first_of(" "));
351  }
352  }
353  this->openElement(thisFileStream,"FCalGeomTable",theRunAttr,theRunValues);
354  theRunValues[0] = "FCalCells";
355  this->openElement(thisFileStream,"FCalGeomTable",theRunAttr,theRunValues);
356  thisFileStream << "<!-- 32-bit Id"
357  << " Module# "
358  << " EtaIndex "
359  << " PhiIndex "
360  << " X [cm] "
361  << " Y [cm] "
362  << " Z [cm] "
363  << " TileSize "
364  << "-->" << std::endl;
365 
366  // find big/small tile indicator -> to be replaced
367  std::map<int,double> smallestDx;
368  std::map<int,double> largestDx;
369  for ( unsigned int iCtr = (unsigned int)safeIndex;
370  iCtr <= (unsigned int)lastIndex; iCtr++ )
371  {
372  IdentifierHash theIndex(iCtr);
373  Identifier theId = m_idHelper->cell_id(theIndex);
374  int theCalo = m_idHelper->sub_calo(theId);
375  const CaloDetDescrElement* theElement =
376  caloDetMgr->get_element(theIndex);
377  double dx = theElement->dx();
378  // check tile size
379  if ( smallestDx.find(theCalo) == smallestDx.end() )
380  {
381  smallestDx[theCalo] = dx;
382  largestDx[theCalo] = dx;
383  }
384  else
385  {
386  if ( dx < smallestDx[theCalo] ) smallestDx[theCalo] = dx;
387  if ( dx > largestDx[theCalo] ) largestDx[theCalo] = dx;
388  }
389  }
390 
391  // get geometry
392  for (unsigned int iCtr=(unsigned int)firstIndex;
393  iCtr<=(unsigned int)lastIndex; iCtr++ )
394  {
395  IdentifierHash theIndex(iCtr);
396  // get identifiers
397  Identifier theId = m_idHelper->cell_id(theIndex);
398  int theModule = m_idHelper->sampling(theId);
399  int theEta = m_idHelper->eta(theId);
400  int thePhi = m_idHelper->phi(theId);
401  int theCalo = m_idHelper->sub_calo(theId);
402  // get geometry
403  const CaloDetDescrElement* theElement =
404  caloDetMgr->get_element(theIndex);
405  double theX = theElement->x();
406  double theY = theElement->y();
407  double theZ = theElement->z();
408  // check tile size
409  double dx = theElement->dx();
410  int tileSize = dx > 1.1*smallestDx[theCalo] ? 1 : 0;
411 
412  // write out
413  thisFileStream << " "
414  << std::setw(10)
415  << std::setfill(' ') << iCtr-(unsigned int)firstIndex
416  << " "
417  << std::setw(2) << std::setfill(' ') << theModule
418  << " "
419  << std::setw(2) << std::setfill(' ') << theEta
420  << " "
421  << std::setw(2) << std::setfill(' ') << thePhi
422  << " "
423  << std::setw(10) << std::setprecision(5) << theX << " "
424  << std::setw(10) << std::setprecision(5) << theY << " "
425  << std::setw(10) << std::setprecision(5) << theZ << " "
426  << " "
427  << std::setw(2) << std::setfill(' ') << tileSize
428  << std::endl;
429  }
430  ATH_CHECK(this->finalize(thisFileStream));
431  thisFileStream.close();
432 
433  return StatusCode::SUCCESS;
434 }

Member Data Documentation

◆ m_caloIndices

std::vector<CaloCell_ID::SUBCALO> TBXMLCaloCellWriterTool::m_caloIndices
private

Definition at line 68 of file TBXMLCaloCellWriterTool.h.

◆ m_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> TBXMLCaloCellWriterTool::m_caloMgrKey
private
Initial value:
{ this
, "CaloDetDescrManager"
, "CaloDetDescrManager"
, "SG Key for CaloDetDescrManager in the Condition Store" }

Definition at line 78 of file TBXMLCaloCellWriterTool.h.

◆ m_caloSamplings

std::vector<CaloSampling::CaloSample> TBXMLCaloCellWriterTool::m_caloSamplings
private

Definition at line 69 of file TBXMLCaloCellWriterTool.h.

◆ m_cellContainer

std::string TBXMLCaloCellWriterTool::m_cellContainer
private

Definition at line 70 of file TBXMLCaloCellWriterTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dictionary

std::string TBXMLWriterToolBase::m_dictionary
protectedinherited

Definition at line 107 of file TBXMLWriterToolBase.h.

◆ m_doubleQuote

const std::string TBXMLWriterToolBase::m_doubleQuote = "\042"
staticprotectedinherited

Definition at line 109 of file TBXMLWriterToolBase.h.

◆ m_elementList

std::vector<std::string> TBXMLWriterToolBase::m_elementList
protectedinherited

Definition at line 106 of file TBXMLWriterToolBase.h.

◆ m_etaMax

double TBXMLCaloCellWriterTool::m_etaMax
private

Definition at line 64 of file TBXMLCaloCellWriterTool.h.

◆ m_etaMin

double TBXMLCaloCellWriterTool::m_etaMin
private

Definition at line 64 of file TBXMLCaloCellWriterTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_firstEvent

bool TBXMLCaloCellWriterTool::m_firstEvent
private

Definition at line 66 of file TBXMLCaloCellWriterTool.h.

◆ m_idHelper

const CaloCell_ID* TBXMLCaloCellWriterTool::m_idHelper
private

Definition at line 72 of file TBXMLCaloCellWriterTool.h.

◆ m_includedCalos

std::vector<std::string> TBXMLCaloCellWriterTool::m_includedCalos
private

Definition at line 61 of file TBXMLCaloCellWriterTool.h.

◆ m_includedSamplings

std::vector<std::string> TBXMLCaloCellWriterTool::m_includedSamplings
private

Definition at line 62 of file TBXMLCaloCellWriterTool.h.

◆ m_mother

const TBXMLWriter* TBXMLCaloCellWriterTool::m_mother
private

Definition at line 74 of file TBXMLCaloCellWriterTool.h.

◆ m_nCols

const unsigned int TBXMLCaloCellWriterTool::m_nCols = 2
staticprivate

Definition at line 59 of file TBXMLCaloCellWriterTool.h.

◆ m_phiMax

double TBXMLCaloCellWriterTool::m_phiMax
private

Definition at line 64 of file TBXMLCaloCellWriterTool.h.

◆ m_phiMin

double TBXMLCaloCellWriterTool::m_phiMin
private

Definition at line 64 of file TBXMLCaloCellWriterTool.h.

◆ m_runNumbers

std::unordered_set<EventIDBase::number_type> TBXMLCaloCellWriterTool::m_runNumbers
private

Definition at line 76 of file TBXMLCaloCellWriterTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
GetLCDefs::Unknown
@ Unknown
Definition: GetLCDefs.h:21
CaloCell_Base_ID::LARFCAL
@ LARFCAL
Definition: CaloCell_Base_ID.h:46
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
CaloCell_ID_FCS::TileExt2
@ TileExt2
Definition: FastCaloSim_CaloCell_ID.h:39
plotting.plot_kinematics.run_number
run_number
Definition: plot_kinematics.py:29
TBXMLWriterToolBase::openElement
virtual void openElement(std::ostream &outStream, const std::string &theElement, const std::vector< std::string > &listOfAttr, const std::vector< std::string > &listOfValues)
Definition: TBXMLWriterToolBase.cxx:108
CaloCell_Base_ID::region
int region(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
CaloDetDescrElement::y
float y() const
cell y
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:365
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TBXMLWriterToolBase::addDictElement
virtual void addDictElement(std::ostream &outStream, const std::string &theElement, const std::vector< std::string > &listOfElements)
Definition: TBXMLWriterToolBase.cxx:59
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CaloCell_Base_ID::is_em_endcap
bool is_em_endcap(const Identifier id) const
test if the id belongs to the EM Endcap
CaloCell_ID_FCS::TileExt0
@ TileExt0
Definition: FastCaloSim_CaloCell_ID.h:37
TBXMLWriterToolBase::openDictionary
virtual void openDictionary(std::ostream &outStream, const std::string &dictName, const std::vector< std::string > &listOfElements)
Definition: TBXMLWriterToolBase.cxx:20
TBXMLWriterToolBase::addAttributes
virtual void addAttributes(std::ostream &outStream, const std::string &theElement, const std::vector< std::string > &listOfAttributes)
Definition: TBXMLWriterToolBase.cxx:93
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
TBXMLCaloCellWriterTool::convertProperties
virtual StatusCode convertProperties()
Definition: TBXMLCaloCellWriterTool.cxx:437
CaloDetDescrManager_Base::get_element
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
Definition: CaloDetDescrManager.cxx:159
CaloCellContainer::beginConstCalo
CaloCellContainer::const_iterator beginConstCalo(CaloCell_ID::SUBCALO caloNum) const
get const iterators on cell of just one calo
Definition: CaloCellContainer.cxx:119
CaloCell_ID_FCS::FCAL1
@ FCAL1
Definition: FastCaloSim_CaloCell_ID.h:41
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
deg
#define deg
Definition: SbPolyhedron.cxx:17
TBXMLWriterToolBase::closeAllElements
virtual void closeAllElements(std::ostream &outStream)
Definition: TBXMLWriterToolBase.cxx:161
AtlasMcWeight::number_type
unsigned int number_type
Definition: AtlasMcWeight.h:20
TBXMLCaloCellWriterTool::writeRunFiles
virtual StatusCode writeRunFiles(const std::string &fileDir, unsigned int runNumber) override
Definition: TBXMLCaloCellWriterTool.cxx:294
TBXMLWriterToolBase::closeElement
virtual void closeElement(std::ostream &outStream, const std::string &theElement)
Definition: TBXMLWriterToolBase.cxx:141
CaloCell_Base_ID::LARHEC
@ LARHEC
Definition: CaloCell_Base_ID.h:46
CaloCell_ID_FCS::HEC2
@ HEC2
Definition: FastCaloSim_CaloCell_ID.h:29
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TBXMLCaloCellWriterTool::m_etaMin
double m_etaMin
Definition: TBXMLCaloCellWriterTool.h:64
TBXMLWriterToolBase::finalize
virtual StatusCode finalize() override
Definition: TBXMLWriterToolBase.h:51
TBXMLCaloCellWriterTool::m_caloSamplings
std::vector< CaloSampling::CaloSample > m_caloSamplings
Definition: TBXMLCaloCellWriterTool.h:69
CaloCell_Base_ID::is_tile_barrel
bool is_tile_barrel(const Identifier id) const
test if the id belongs to the Tiles barrel
TBXMLWriter
Definition: TBXMLWriter.h:24
CaloCell_Base_ID::is_hec
bool is_hec(const Identifier id) const
test if the id belongs to the HEC
TBXMLWriterToolBase::writeEvent
virtual StatusCode writeEvent(std::ostream &theFile, const std::string &entryTag)=0
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
TBXMLWriterToolBase::m_elementList
std::vector< std::string > m_elementList
Definition: TBXMLWriterToolBase.h:106
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
TBXMLCaloCellWriterTool::m_includedCalos
std::vector< std::string > m_includedCalos
Definition: TBXMLCaloCellWriterTool.h:61
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
TBXMLWriterToolBase::TBXMLWriterToolBase
TBXMLWriterToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TBXMLWriterToolBase.h:24
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
CaloCell_ID_FCS::HEC1
@ HEC1
Definition: FastCaloSim_CaloCell_ID.h:28
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:113
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
TBXMLCaloCellWriterTool::m_phiMin
double m_phiMin
Definition: TBXMLCaloCellWriterTool.h:64
lumiFormat.i
int i
Definition: lumiFormat.py:85
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
CaloCell_Base_ID::calo_cell_hash_range
void calo_cell_hash_range(const Identifier id, IdentifierHash &caloCellMin, IdentifierHash &caloCellMax) const
to loop on 'global' cell hashes of one sub-calorimeter alone
CaloCell_Base_ID::is_fcal
bool is_fcal(const Identifier id) const
test if the id belongs to the FCAL - true also for MiniFCAL
CaloCell_ID_FCS::TileBar0
@ TileBar0
Definition: FastCaloSim_CaloCell_ID.h:31
CaloCell_Base_ID::sampling
int sampling(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CaloCell_Base_ID::is_tile_extbarrel
bool is_tile_extbarrel(const Identifier id) const
test if the id belongs to the Tiles extended barrel
TBXMLWriterToolBase::m_dictionary
std::string m_dictionary
Definition: TBXMLWriterToolBase.h:107
CaloCellContainer::nCellsCalo
int nCellsCalo(const CaloCell_ID::SUBCALO caloNum) const
get number of cels of given calorimeter
Definition: CaloCellContainer.cxx:145
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloCell_Base_ID::eta
int eta(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
CaloCell_Base_ID::sub_calo
int sub_calo(const Identifier id) const
returns an int taken from SUBCALO enum and describing the subCalo to which the Id belongs.
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CaloCell_Base_ID::TILE
@ TILE
Definition: CaloCell_Base_ID.h:46
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
PowhegPythia8EvtGen_jetjet.theEnergy
int theEnergy
Definition: PowhegPythia8EvtGen_jetjet.py:12
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
TBXMLWriterToolBase::initialize
virtual StatusCode initialize() override
Definition: TBXMLWriterToolBase.h:35
TBXMLCaloCellWriterTool::m_firstEvent
bool m_firstEvent
Definition: TBXMLCaloCellWriterTool.h:66
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
CaloCell_Base_ID::is_em_barrel
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CaloCell_ID_FCS::TileExt1
@ TileExt1
Definition: FastCaloSim_CaloCell_ID.h:38
TBXMLCaloCellWriterTool::m_cellContainer
std::string m_cellContainer
Definition: TBXMLCaloCellWriterTool.h:70
PayloadHelpers::dataSize
size_t dataSize(TDA::PayloadIterator start)
Size in bytes of the buffer that is needed to decode next fragment data content.
Definition: TriggerEDMDeserialiserAlg.cxx:188
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
TBXMLCaloCellWriterTool::m_caloIndices
std::vector< CaloCell_ID::SUBCALO > m_caloIndices
Definition: TBXMLCaloCellWriterTool.h:68
CaloCell_Base_ID::phi
int phi(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
TBXMLCaloCellWriterTool::m_etaMax
double m_etaMax
Definition: TBXMLCaloCellWriterTool.h:64
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
TBXMLCaloCellWriterTool::m_runNumbers
std::unordered_set< EventIDBase::number_type > m_runNumbers
Definition: TBXMLCaloCellWriterTool.h:76
CaloCell_Base_ID::cell_id
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,...
CaloDetDescrElement::x
float x() const
cell x
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:363
CaloCell_ID_FCS::HEC0
@ HEC0
Definition: FastCaloSim_CaloCell_ID.h:27
eflowRec::phiIndex
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
Definition: EtaPhiLUT.cxx:23
TBXMLCaloCellWriterTool::m_nCols
static const unsigned int m_nCols
Definition: TBXMLCaloCellWriterTool.h:59
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
TBXMLCaloCellWriterTool::m_includedSamplings
std::vector< std::string > m_includedSamplings
Definition: TBXMLCaloCellWriterTool.h:62
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloDetDescrElement::dx
float dx() const
cell dx
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:375
CaloDetDescrElement::getSampling
CaloCell_ID::CaloSample getSampling() const
cell sampling
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:395
TBXMLCaloCellWriterTool::m_idHelper
const CaloCell_ID * m_idHelper
Definition: TBXMLCaloCellWriterTool.h:72
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
CaloDetDescrElement::z
float z() const
cell z
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:367
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
CaloCellContainer::endConstCalo
CaloCellContainer::const_iterator endConstCalo(CaloCell_ID::SUBCALO caloNum) const
Definition: CaloCellContainer.cxx:133
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
TBXMLCaloCellWriterTool::m_mother
const TBXMLWriter * m_mother
Definition: TBXMLCaloCellWriterTool.h:74
CaloCell_ID_FCS::FCAL2
@ FCAL2
Definition: FastCaloSim_CaloCell_ID.h:42
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
RPDUtils::nRows
unsigned constexpr int nRows
Definition: RPDUtils.h:24
TBXMLCaloCellWriterTool::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: TBXMLCaloCellWriterTool.h: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
CaloCell_ID_FCS::HEC3
@ HEC3
Definition: FastCaloSim_CaloCell_ID.h:30
CaloCell_Base_ID::LAREM
@ LAREM
Definition: CaloCell_Base_ID.h:46
TBXMLWriterToolBase::m_doubleQuote
static const std::string m_doubleQuote
Definition: TBXMLWriterToolBase.h:109
CaloCell_ID_FCS::FCAL0
@ FCAL0
Definition: FastCaloSim_CaloCell_ID.h:40
TBXMLCaloCellWriterTool::m_phiMax
double m_phiMax
Definition: TBXMLCaloCellWriterTool.h:64
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
fitman.k
k
Definition: fitman.py:528
TBXMLWriter::getFileDir
const std::string & getFileDir() const
Definition: TBXMLWriter.h:44
TBXMLWriterToolBase::closeDictionary
virtual void closeDictionary(std::ostream &outStream)
Definition: TBXMLWriterToolBase.cxx:52
Identifier
Definition: IdentifierFieldParser.cxx:14