54 error() <<
"Unable to retrieve run records service" <<
endmsg;
61 if ( ( sc =
setPropertyRepr(
"IncidentName", prp->getProperty(
"IncidentName" ).toString() ) ).isFailure() ) {
62 error() <<
"Failed to copy FileRecordDataSvc.IncidentName (" << prp->getProperty(
"IncidentName" ).toString()
70 error() <<
"Failed to access IncidentSvc." <<
endmsg;
94 std::string n = incident.
source();
98 always() <<
"Incident: FileInfo record: " << n <<
"/EvtCount=" << evt_cnt->value() <<
endmsg;
100 always() <<
"Incident: NO FileInfo record EvtCounter for " << n <<
"/EvtCount" <<
endmsg;
104 always() <<
"Incident: FileInfo record: " << n <<
"/SumCount=" << sum_cnt->value() <<
endmsg;
106 always() <<
"Incident: NO FileInfo record SumCounter for " << n <<
"/SumCount" <<
endmsg;
118 int evt_num = evt->event();
119 if ( evt_num <= 10 || evt_num % 100 == 0 ) {
121 log <<
"========= EVENT:" << evt->event() <<
" RUN:" << evt->run() <<
" TIME:" << evt->time();
122 for (
size_t nc = 0; nc < evt->collisions().size(); ++nc ) {
123 if ( evt->collisions()[nc] ) {
124 log <<
" " << evt->collisions()[nc]->collision();
125 log <<
" (" << evt->collisions()[nc].hintID() <<
")";
134 if ( myTracks != 0 ) {
136 static std::string fname =
"";
139 std::string new_fname = pAddr->
par()[0];
140 if ( fname != new_fname ) {
144 always() <<
"FileInfo record: " << new_fname <<
"/EvtCount=" << evt_cnt->value() <<
endmsg;
146 always() <<
"NO FileInfo record EvtCounter for " << fname <<
endmsg;
150 always() <<
"FileInfo record: " << new_fname <<
"/SumCount=" << sum_cnt->value() <<
endmsg;
152 always() <<
"NO FileInfo record SumCounter for " << fname <<
endmsg;
158 if ( evt->event() < 10 || evt->event() % 500 == 0 ) {
161 if ( ( *i )->event() ) {
162 log << ( *i )->event()->event();
174 if ( ( *i )->originVertex() ) {
176 log << ( *i )->originVertex()->index();
178 log << ( *i )->originVertex()->x();
180 log << ( *i )->originVertex()->y();
182 log << ( *i )->originVertex()->z();
184 log <<
"No Origin Vertex!";
186 log <<
endmsg <<
" Decays:";
188 log << ( *i )->decayVertices().size();
190 for (
size_t id = 0;
id < ( *i )->decayVertices().size(); ++id ) {
191 const MyVertex* v = ( *i )->decayVertices()[id];
199 log << v->z() <<
" Collisions:";
200 for (
size_t ic = 0; ic < v->collisions().size(); ++ic ) {
202 if ( v->collisions()[ic] ) {
203 log << v->collisions()[ic]->collision();
204 log <<
" (" << v->collisions()[ic].hintID() <<
")";
207 log <<
" (" << v->collisions()[ic].hintID() <<
")";
211 log <<
"No decay vertex!";
216 }
catch ( ... ) {
error() <<
"Exception occurred!" <<
endmsg; }
219 warning() <<
"No tracks found, Event " << evt->event() <<
endmsg;
222 error() <<
"Unable to retrieve Event Header object" <<
endmsg;
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT(type)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
MsgStream & always() const
shortcut for the method msgStream(MSG::ALWAYS)
SmartIF< IDataProviderSvc > & eventSvc() const
The standard event data service.
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
StatusCode finalize() override
the default (empty) implementation of IStateful::finalize() method
SmartIF< IService > service(std::string_view name, const bool createIf=true, const bool quiet=false) const
Return a pointer to the service identified by name (or "type/name")
Simple class that represents a vertex for testing purposes.
Opaque address interface definition.
virtual const std::string * par() const =0
Retrieve String parameters.
The IProperty is the basic interface for all components which have properties that can be set or get.
Base class for all Incidents (computing events).
const std::string & type() const
Access to the incident type.
const std::string & source() const
Access to the source of the incident.
seq_type::iterator iterator
StatusCode setPropertyRepr(const std::string &n, const std::string &r) override
ReadAlg class for the RootIOExample.
StatusCode execute() override
Event callback.
SmartIF< IIncidentSvc > m_incidentSvc
Reference to incident service.
SmartIF< IDataProviderSvc > m_recordSvc
Reference to run records data service.
Gaudi::Property< std::string > m_incidentName
StatusCode finalize() override
Finalize.
void handle(const Incident &incident) override
IIncidentListener override: Inform that a new incident has occured.
StatusCode initialize() override
Initialize.
A small class used to access easily (and efficiently) data items residing in data stores.
This class is used for returning status codes from appropriate routines.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE