ATLAS Offline Software
TrigT2ZdcSignalsCnvTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 // EDM include(s):
9 
11 // Local include(s):
13 
14 namespace xAODMaker {
15 
17  const std::string& name,
18  const IInterface* parent )
19  : AthAlgTool( type, name, parent ) {
20 
21  // Declare the interface(s) provided by the tool:
22  declareInterface< ITrigT2ZdcSignalsCnvTool >( this );
23  }
24 
36 
37  // A small sanity check. The output container should really be empty...
38  if( !xaod->empty() ) {
39  ATH_MSG_WARNING( "The output xAOD container is not empty (size=="
40  << xaod->size() << ")" );
41  }
42 
43  TrigT2ZdcSignalsContainer::const_iterator t2zdcsig_iter = aod->begin();
44  TrigT2ZdcSignalsContainer::const_iterator t2zdcsig_iter_end = aod->end();
45 
46  ATH_MSG_VERBOSE("AOD TrigT2ZdcSignalsContainer size:: "<< aod->size());
47 
48  for(;t2zdcsig_iter != t2zdcsig_iter_end; ++t2zdcsig_iter){
49  // Create a (single) output xAOD object.
50  xAOD::TrigT2ZdcSignals* xT2ZdcSignals = new xAOD::TrigT2ZdcSignals();
51  xaod->push_back(xT2ZdcSignals);
52 
53  //
54  xT2ZdcSignals->setTriggerEnergies( (*t2zdcsig_iter)-> triggerEnergies() );
55  xT2ZdcSignals->setTriggerTimes( (*t2zdcsig_iter) -> triggerTimes() );
56 
57  ATH_MSG_VERBOSE("AOD vs xAOD::triggerEnergies size:: "<< (*t2zdcsig_iter)->triggerEnergies().size()<<" "<<xT2ZdcSignals->triggerEnergies().size());
58  ATH_MSG_VERBOSE("AOD vs xAOD:triggerTimes size:: "<< (*t2zdcsig_iter)->triggerTimes().size()<<" "<<xT2ZdcSignals->triggerTimes().size());
59  }
60  // Return gracefully:
61  return StatusCode::SUCCESS;
62  }
63 
64 } // namespace xAODMaker
TrigT2ZdcSignalsContainer.h
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
xAOD::TrigT2ZdcSignals_v1
Definition: TrigT2ZdcSignals_v1.h:12
xAOD::TrigT2ZdcSignals_v1::setTriggerEnergies
void setTriggerEnergies(const std::vector< float > &trigEg)
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
xAODMaker
Definition: StoreGateSvc.h:72
TrigT2ZdcSignalsCnvTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TrigT2ZdcSignals_v1::setTriggerTimes
void setTriggerTimes(const std::vector< float > &trigTm)
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TrigT2ZdcSignalsContainer.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
xAODMaker::TrigT2ZdcSignalsCnvTool::TrigT2ZdcSignalsCnvTool
TrigT2ZdcSignalsCnvTool(const std::string &type, const std::string &name, const IInterface *parent)
Regular AlgTool constructor.
Definition: TrigT2ZdcSignalsCnvTool.cxx:16
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
xAOD::TrigT2ZdcSignals_v1::triggerTimes
const std::vector< float > & triggerTimes() const
Return the relative times of the triggers.
xAODMaker::TrigT2ZdcSignalsCnvTool::convert
virtual StatusCode convert(const TrigT2ZdcSignalsContainer *aod, xAOD::TrigT2ZdcSignalsContainer *xaod) override
Function that fills an existing xAOD::TrigT2ZdcSignalsContainer.
Definition: TrigT2ZdcSignalsCnvTool.cxx:34
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TrigT2ZdcSignalsContainer
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigT2ZdcSignalsContainer.h:13
xAOD::TrigT2ZdcSignals
TrigT2ZdcSignals_v1 TrigT2ZdcSignals
Definition: Event/xAOD/xAODTrigMinBias/xAODTrigMinBias/TrigT2ZdcSignals.h:11
AthAlgTool
Definition: AthAlgTool.h:26
xAOD::TrigT2ZdcSignals_v1::triggerEnergies
const std::vector< float > & triggerEnergies() const
Return the trigger energies of each counter.
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
TrigT2ZdcSignals.h