|  | ATLAS Offline Software
    | 
 
 
 
#include <CaloCellDumper.h>
|  | 
|  | CaloCellDumper (const std::string &name, ISvcLocator *pSvcLocator) | 
|  | 
| virtual StatusCode | initialize () override | 
|  | 
| virtual StatusCode | execute () override | 
|  | 
| virtual StatusCode | finalize () override | 
|  | 
| virtual StatusCode | sysInitialize () override | 
|  | Override sysInitialize.  More... 
 | 
|  | 
| virtual const DataObjIDColl & | extraOutputDeps () const override | 
|  | Return the list of extra output dependencies.  More... 
 | 
|  | 
| ServiceHandle< StoreGateSvc > & | evtStore () | 
|  | The standard StoreGateSvc(event store) Returns (kind of) a pointer to theStoreGateSvc.  More...
 | 
|  | 
| const ServiceHandle< StoreGateSvc > & | evtStore () const | 
|  | The standard StoreGateSvc(event store) Returns (kind of) a pointer to theStoreGateSvc.  More...
 | 
|  | 
| const ServiceHandle< StoreGateSvc > & | detStore () const | 
|  | The standard StoreGateSvc/DetectorStoreReturns (kind of) a pointer to theStoreGateSvc.  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, V, H > &t) | 
|  | 
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) | 
|  | Declare a new Gaudi property.  More... 
 | 
|  | 
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) | 
|  | Declare a new Gaudi property.  More... 
 | 
|  | 
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) | 
|  | 
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) | 
|  | Declare a new Gaudi property.  More... 
 | 
|  | 
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") | 
|  | Declare a new Gaudi property.  More... 
 | 
|  | 
| void | updateVHKA (Gaudi::Details::PropertyBase &) | 
|  | 
| MsgStream & | msg () const | 
|  | 
| MsgStream & | msg (const MSG::Level lvl) const | 
|  | 
| bool | msgLvl (const MSG::Level lvl) const | 
|  | 
|  | 
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) | 
|  | specialization for handling Gaudi::Property<SG::VarHandleKey>  More... 
 | 
|  | 
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) | 
|  | specialization for handling Gaudi::Property<SG::VarHandleKeyArray>  More... 
 | 
|  | 
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) | 
|  | specialization for handling Gaudi::Property<SG::VarHandleBase>  More... 
 | 
|  | 
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) | 
|  | specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>  More... 
 | 
|  | 
|  | 
| std::ofstream | m_outfile | 
|  | 
| std::ifstream | m_reffile | 
|  | 
| SG::ReadHandleKey< CaloCellContainer > | m_key {this,"InputContainer","AllCalo","Input CaloCellContainer key"} | 
|  | 
| Gaudi::Property< std::string > | m_fileName {this,"FileName","CaloCells.txt","Name of the output text file"} | 
|  | 
| Gaudi::Property< std::string > | m_refName {this,"RefName","","Name of reference file to which cells are to be compared."} | 
|  | 
| Gaudi::Property< float > | m_eCut {this,"EnergyCut",std::numeric_limits<float>::lowest(),"Energy cut for cell dumping"} | 
|  | 
| Gaudi::Property< bool > | m_compact {this,"Compact",true,"compact or detailed cell identifer"} | 
|  | 
| DataObjIDColl | m_extendedExtraObjects | 
|  | 
| StoreGateSvc_t | m_evtStore | 
|  | Pointer to StoreGate (event store by default)  More... 
 | 
|  | 
| StoreGateSvc_t | m_detStore | 
|  | Pointer to StoreGate (detector store by default)  More... 
 | 
|  | 
| std::vector< SG::VarHandleKeyArray * > | m_vhka | 
|  | 
| bool | m_varHandleArraysDeclared | 
|  | 
Definition at line 15 of file CaloCellDumper.h.
 
◆ StoreGateSvc_t
◆ CaloCellDumper()
      
        
          | CaloCellDumper::CaloCellDumper | ( | const std::string & | name, | 
        
          |  |  | ISvcLocator * | pSvcLocator | 
        
          |  | ) |  |  | 
      
 
 
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray> 
Definition at line 170 of file AthCommonDataStore.h.
  175                                                        hndl.documentation());
 
 
 
 
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey> 
Definition at line 156 of file AthCommonDataStore.h.
  161                                                        hndl.documentation());
 
 
 
 
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase> 
Definition at line 184 of file AthCommonDataStore.h.
  189                                                        hndl.documentation());
 
 
 
 
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property. 
- Parameters
- 
  
    | name | Name of the property. |  | hndl | Object holding the property value. |  | doc | Documentation string for the property. |  
 
This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class. 
Definition at line 245 of file AthCommonDataStore.h.
  250     this->declare(hndl.
vhKey());
 
  251     hndl.
vhKey().setOwner(
this);
 
  253     return PBASE::declareProperty(
name,hndl,
doc);
 
 
 
 
◆ declareProperty() [2/6]
Declare a new Gaudi property. 
- Parameters
- 
  
    | name | Name of the property. |  | hndl | Object holding the property value. |  | doc | Documentation string for the property. |  
 
This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class. 
Definition at line 221 of file AthCommonDataStore.h.
  229     return PBASE::declareProperty(
name,hndl,
doc);
 
 
 
 
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property. 
- Parameters
- 
  
    | name | Name of the property. |  | property | Object holding the property value. |  | doc | Documentation string for the property. |  
 
This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty. 
Definition at line 333 of file AthCommonDataStore.h.
  338     return PBASE::declareProperty(
name, property, 
doc);
 
 
 
 
◆ declareProperty() [5/6]
Declare a new Gaudi property. 
- Parameters
- 
  
    | name | Name of the property. |  | property | Object holding the property value. |  | doc | Documentation string for the property. |  
 
This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray. 
Definition at line 352 of file AthCommonDataStore.h.
 
 
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
  
  | 
        
          | StatusCode CaloCellDumper::execute | ( |  | ) |  |  | overridevirtual | 
 
Definition at line 62 of file CaloCellDumper.cxx.
   64   bool badCompare = 
false;
 
   65   const EventContext& ctx = getContext();
 
   69   const unsigned evt=ctx.eventID().event_number();
 
   70   m_outfile << 
"Event " << 
evt << 
" contains " << 
cells->size() << 
" CaloCells" << std::endl;
 
   71   m_outfile << 
"ID\tEnergy\tTime\tQual\tprov" << std::endl;
 
   75     size_t evt_in, cells_size_in;
 
   81                      << cells_size_in << 
" " << CaloCells <<
 
   82                      "; expected event number " << 
evt << 
" and cell count " <<
 
   87     std::string 
ID, 
Energy, Time, Qual, prov;
 
   91                      ID  << 
" " << 
Energy << 
" " << Time << 
" " <<
 
   97   double remainingEne=0;
 
   98   unsigned nRemaining=0;
 
  102       std::stringstream 
id;
 
  129       m_outfile << 
id.str() << 
"0x" << std::hex << 
cell->ID().get_identifier32().get_compact() << std::dec 
 
  131         << 
"\t" << 
cell->e() << 
"\t" << 
cell->time() << 
"\t" << 
cell->gain() 
 
  132         << 
"\t" << 
cell->quality() << 
"\t0x" << std::hex << 
cell->provenance() << std::dec << std::endl;
 
  135         float energy_in, time_in;
 
  136         int quality_in, provenance_in, gain_in;
 
  138           std::string 
id, samp;
 
  141         m_reffile >> std::hex >> id_in >> std::dec >> energy_in >> time_in >>
 
  142           gain_in >> quality_in >> std::hex >> provenance_in >> std::dec;
 
  146             id_in != 
cell->ID().get_identifier32().get_compact() ||
 
  147             gain_in != 
cell->gain() ||
 
  148             quality_in != 
cell->quality() ||
 
  149             provenance_in != 
cell->provenance())
 
  152                          std::hex << 
"0x" << id_in << 
" " << std::dec <<
 
  155                          gain_in << 
" " << quality_in << 
" " <<
 
  156                          std::hex << 
"0x" << provenance_in << std::dec);
 
  158                          cell->ID().get_identifier32().get_compact() << std::dec << 
" " <<
 
  159                          cell->e() << 
" " << 
cell->time() << 
" " 
  160                          << 
cell->gain() << 
" " <<
 
  161                          cell->quality() << 
" 0x" << std::hex << 
cell->provenance() << std::dec);
 
  168       remainingEne+=
cell->e();
 
  172     m_outfile << 
"Sum of " << nRemaining << 
" cell energies: " << remainingEne << std::endl;
 
  174       std::string Sum, Of, Cell, 
Energies;
 
  175       unsigned nRemaining_in;
 
  176       float remainingEne_in;
 
  180           nRemaining_in != nRemaining ||
 
  181           !
isEqual (remainingEne_in, remainingEne))
 
  184                        Sum << Of << nRemaining_in << Cell << 
Energies <<
 
  187                        "Sum of " << nRemaining << 
" cell energies: " << remainingEne);
 
  194     return StatusCode::FAILURE;
 
  196   return StatusCode::SUCCESS;
 
 
 
 
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed. 
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given 
 
 
◆ extraOutputDeps()
  
  | 
        
          | const DataObjIDColl & AthAlgorithm::extraOutputDeps | ( |  | ) | const |  | overridevirtualinherited | 
 
Return the list of extra output dependencies. 
This list is extended to include symlinks implied by inheritance relations. 
Definition at line 50 of file AthAlgorithm.cxx.
   57   return Algorithm::extraOutputDeps();
 
 
 
 
◆ finalize()
  
  | 
        
          | StatusCode CaloCellDumper::finalize | ( |  | ) |  |  | overridevirtual | 
 
 
◆ initialize()
  
  | 
        
          | StatusCode CaloCellDumper::initialize | ( |  | ) |  |  | overridevirtual | 
 
Definition at line 27 of file CaloCellDumper.cxx.
   33     return StatusCode::FAILURE;
 
   40       return StatusCode::FAILURE;
 
   48   return StatusCode::SUCCESS;
 
 
 
 
◆ inputHandles()
Return this algorithm's input handles. 
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA. 
 
 
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles. 
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA. 
 
 
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
  
  | 
        
          | StatusCode AthAlgorithm::sysInitialize | ( |  | ) |  |  | overridevirtualinherited | 
 
 
◆ sysStart()
Handle START transition. 
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container. 
 
 
◆ updateVHKA()
◆ m_compact
  
  | 
        
          | Gaudi::Property<bool> CaloCellDumper::m_compact {this,"Compact",true,"compact or detailed cell identifer"} |  | private | 
 
 
◆ m_detStore
◆ m_eCut
  
  | 
        
          | Gaudi::Property<float> CaloCellDumper::m_eCut {this,"EnergyCut",std::numeric_limits<float>::lowest(),"Energy cut for cell dumping"} |  | private | 
 
 
◆ m_evtStore
◆ m_extendedExtraObjects
  
  | 
        
          | DataObjIDColl AthAlgorithm::m_extendedExtraObjects |  | privateinherited | 
 
 
◆ m_fileName
  
  | 
        
          | Gaudi::Property<std::string> CaloCellDumper::m_fileName {this,"FileName","CaloCells.txt","Name of the output text file"} |  | private | 
 
 
◆ m_key
◆ m_outfile
  
  | 
        
          | std::ofstream CaloCellDumper::m_outfile |  | private | 
 
 
◆ m_reffile
  
  | 
        
          | std::ifstream CaloCellDumper::m_reffile |  | private | 
 
 
◆ m_refName
  
  | 
        
          | Gaudi::Property<std::string> CaloCellDumper::m_refName {this,"RefName","","Name of reference file to which cells are to be compared."} |  | private | 
 
 
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
 
Gaudi::Property< std::string > m_refName
bool is_lar_em_endcap_inner() const
cell belongs to the inner wheel of EM end cap
bool is_lar_em_endcap_outer() const
cell belongs to the outer wheel of EM end cap
std::vector< Identifier > ID
std::vector< double > Energy
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
SG::ReadHandleKey< CaloCellContainer > m_key
Gaudi::Property< float > m_eCut
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
Gaudi::Property< bool > m_compact
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool isEqual(double x1, double x2, double thresh=1e-6)
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
bool is_lar_fcal() const
cell belongs to FCAL
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
bool is_tile() const
cell belongs to Tile
DataObjIDColl m_extendedExtraObjects
bool is_lar_em_barrel() const
cell belongs to EM barrel
CaloCell_ID::CaloSample getSampling() const
cell sampling
#define ATH_MSG_WARNING(x)
Gaudi::Property< std::string > m_fileName
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
bool is_lar_hec() const
cell belongs to HEC