53 ROOT::EnableThreadSafety();
60 error() <<
"Unable to retrieve run records service" <<
endmsg;
67 if ( ( sc =
setPropertyRepr(
"IncidentName", prp->getProperty(
"IncidentName" ).toString() ) ).isFailure() ) {
68 error() <<
"Failed to copy FileRecordDataSvc.IncidentName (" << prp->getProperty(
"IncidentName" ).toString()
76 error() <<
"Failed to access IncidentSvc." <<
endmsg;
99 std::scoped_lock lock(
m_mutex );
102 std::string n = incident.
source();
106 always() <<
"Incident: FileInfo record: " << n <<
"/EvtCount=" << evt_cnt->value() <<
endmsg;
108 always() <<
"Incident: NO FileInfo record EvtCounter for " << n <<
"/EvtCount" <<
endmsg;
112 always() <<
"Incident: FileInfo record: " << n <<
"/SumCount=" << sum_cnt->value() <<
endmsg;
114 always() <<
"Incident: NO FileInfo record SumCounter for " << n <<
"/SumCount" <<
endmsg;
123 std::scoped_lock lock(
m_mutex );
128 int evt_num = evt->event();
129 if ( evt_num <= 10 || evt_num % 100 == 0 ) {
131 log <<
"========= EVENT:" << evt->event() <<
" RUN:" << evt->run() <<
" TIME:" << evt->time();
132 for (
size_t nc = 0; nc < evt->collisions().size(); ++nc ) {
133 if ( evt->collisions()[nc] ) {
134 log <<
" " << evt->collisions()[nc]->collision();
135 log <<
" (" << evt->collisions()[nc].hintID() <<
")";
144 if ( myTracks != 0 ) {
146 static std::string fname =
"";
149 std::string new_fname = pAddr->
par()[0];
150 if ( fname != new_fname ) {
154 always() <<
"FileInfo record: " << new_fname <<
"/EvtCount=" << evt_cnt->value() <<
endmsg;
156 always() <<
"NO FileInfo record EvtCounter for " << fname <<
endmsg;
160 always() <<
"FileInfo record: " << new_fname <<
"/SumCount=" << sum_cnt->value() <<
endmsg;
162 always() <<
"NO FileInfo record SumCounter for " << fname <<
endmsg;
168 if ( evt->event() < 10 || evt->event() % 500 == 0 ) {
171 if ( ( *i )->event() ) {
172 log << ( *i )->event()->event();
184 if ( ( *i )->originVertex() ) {
186 log << ( *i )->originVertex()->index();
188 log << ( *i )->originVertex()->x();
190 log << ( *i )->originVertex()->y();
192 log << ( *i )->originVertex()->z();
194 log <<
"No Origin Vertex!";
196 log <<
endmsg <<
" Decays:";
198 log << ( *i )->decayVertices().size();
200 for (
size_t id = 0;
id < ( *i )->decayVertices().size(); ++id ) {
201 const MyVertex* v = ( *i )->decayVertices()[id];
209 log << v->z() <<
" Collisions:";
210 for (
size_t ic = 0; ic < v->collisions().size(); ++ic ) {
212 if ( v->collisions()[ic] ) {
213 log << v->collisions()[ic]->collision();
214 log <<
" (" << v->collisions()[ic].hintID() <<
")";
217 log <<
" (" << v->collisions()[ic].hintID() <<
")";
221 log <<
"No decay vertex!";
226 }
catch ( ... ) {
error() <<
"Exception occurred!" <<
endmsg; }
229 warning() <<
"No tracks found, Event " << evt->event() <<
endmsg;
232 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.
std::mutex m_mutex
protection for thread safe usage
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