|
ATLAS Offline Software
|
Go to the documentation of this file.
22 const std::string&
name,
23 const IInterface*
parent) :
26 declareInterface<DerivationFramework::IAugmentationTool>(
this);
33 ATH_MSG_WARNING(
"No decoration prefix name provided for the output of LArCollisionTimeDecorator!");
37 ATH_MSG_ERROR(
"No EventInfo collection provided for LArCollisionTimeDecorator!");
38 return StatusCode::FAILURE;
43 std::vector<std::string>
names;
51 std::vector<std::string>
names;
60 return StatusCode::SUCCESS;
65 return StatusCode::SUCCESS;
71 const EventContext& ctx = Gaudi::Hive::currentContext();
73 CHECK( eventInfo.
isValid() ? StatusCode::SUCCESS : StatusCode::FAILURE);
77 std::vector<SG::WriteDecorHandle<xAOD::EventInfo,int> > int_decor_handles(createDecorators<xAOD::EventInfo,int>(
m_intDecorKeys,ctx));
78 std::vector<SG::WriteDecorHandle<xAOD::EventInfo,float> > float_decor_handles(createDecorators<xAOD::EventInfo,float>(
m_floatDecorKeys,ctx));
79 assert( int_decor_handles.size() ==
kNIntDecor);
86 float_decor_handles[
ktimeA](*eventInfo) = tps->
timeA();
87 float_decor_handles[
ktimeC](*eventInfo) = tps->
timeC();
88 float LArECtimeDiff = tps->
timeA()-tps->
timeC();
89 ATH_MSG_DEBUG(
"Decorating LAr time info, LArECTimeDiff = " << LArECtimeDiff);
95 return StatusCode::SUCCESS;
double energyC() const
total energy C side
SG::ReadHandleKey< LArCollisionTime > m_larCollisionTimeKey
void createDecoratorKeys(T_Parent &parent, const SG::ReadHandleKey< T_Cont > &container_key, const std::string &prefix, const std::vector< std::string > &decor_names, std::vector< SG::WriteDecorHandleKey< T_Cont > > &decor_out)
double energyA() const
total energy A side
virtual StatusCode addBranches() const
Pass the thinning service
const std::string & key() const
Return the StoreGate ID for the referenced object.
std::vector< SG::WriteDecorHandleKey< xAOD::EventInfo > > m_floatDecorKeys
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
int ncellC() const
get number of cells for time C side
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
double timeC() const
time C side
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::vector< SG::WriteDecorHandleKey< xAOD::EventInfo > > m_intDecorKeys
int ncellA() const
get number of cells for time A side
#define ATH_MSG_WARNING(x)
Gaudi::Property< std::string > m_sgName
double timeA() const
time A side
LArCollisionTimeDecorator(const std::string &type, const std::string &name, const IInterface *parent)