Commits

bi...@4525493e-7705-40b1-a816-d608a930855b  committed fcceb0a

cosmetic changes

  • Participants
  • Parent commits c998d84

Comments (0)

Files changed (4)

 2007-04-04  Sebastien Binet  <binet@lblbox>
 
+	* tagging PerfMonEvent-00-00-04
+	* cosmetic changes
+
 	* tagging PerfMonEvent-00-00-03
 	* fixing ::clear bug
 

File PerfMonEvent/PerfMonData.h

 
 // Gaudi includes
 
+// EventInfo includes
+#include "EventInfo/EventID.h"
+
 // PerfMonEvent includes
 #include "PerfMonEvent/PerfMonMemData.h"
 #include "PerfMonEvent/PerfMonCpuData.h"
   // Const methods: 
   ///////////////////////////////////////////////////////////////////
 
+  /// retrieve the unique identification informations for this event
+  const EventID& eventID() const;
+
   /// retrieve the memory-related informations for this event
   const MemData& mem() const;
 
   // Non-const methods: 
   /////////////////////////////////////////////////////////////////// 
 
+  /// set the event-id of this event
+  void setEventID( const EventID& evtId );
+
   /// set the memory-related informations for this event
   void setMemData( const MemData& mem );
 
   /////////////////////////////////////////////////////////////////// 
  private: 
 
+  /// unique identification for this event
+  EventID m_evtID;
+
   /// Memory-related informations for this event
   MemData m_mem;
 
 /////////////////////////////////////////////////////////////////// 
 // Inline methods: 
 /////////////////////////////////////////////////////////////////// 
+
+inline const EventID& Data::eventID() const
+{ return m_evtID; }
+
 inline const MemData& Data::mem() const
 { return m_mem; }
 
 inline const IoData& Data::io() const
 { return m_io; }
 
+inline void Data::setEventID( const EventID& evtID )
+{ m_evtID = evtID; }
+
 inline void Data::setMemData( const MemData& mem )
 { m_mem = mem; }
 
 
 inline void Data::clear()
 { 
+  m_evtID.set_run_number  ( 0 );
+  m_evtID.set_event_number( 0 );
+  m_evtID.set_time_stamp  ( 0 ); 
+  m_evtID.set_time_stamp_ns_offset( 0 );
+  m_evtID.set_lumi_block  ( 0 );
+  m_evtID.set_bunch_crossing_id   ( 0 );
+
   m_mem.clear();
   m_cpu.clear();
   m_io. clear();

File cmt/requirements

 use AtlasPolicy 	AtlasPolicy-*
 
 ## Put here your package dependencies...
-
+use EventInfo		EventInfo-*		Event
 ##
 
 branches PerfMonEvent src

File src/PerfMonData.cxx

 
 // STL includes
 #include <ostream>
+#include <sstream>
 
 // PerfMonEvent includes
 #include "PerfMonEvent/PerfMonData.h"
 namespace PerfMon {
 
 /////////////////////////////////////////////////////////////////// 
+// Static variables: 
+/////////////////////////////////////////////////////////////////// 
+std::string makeLine( const std::string& val, const std::size_t n )
+{
+  std::ostringstream l;
+  for ( std::size_t i = 0; i != n; ++i ) {
+    l << val;
+  }
+  return l.str();
+}
+
+static std::string evtLine = makeLine( "-", 80 );
+
+/////////////////////////////////////////////////////////////////// 
 // Public methods: 
 /////////////////////////////////////////////////////////////////// 
 
 Data::Data() :
-  m_mem( ),
-  m_cpu( ),
-  m_io ( )
+  m_evtID( ),
+  m_mem  ( ),
+  m_cpu  ( ),
+  m_io   ( )
 {}
 
 Data::Data( const Data& rhs ) :
-  m_mem( rhs.m_mem ),
-  m_cpu( rhs.m_cpu ),
-  m_io ( rhs.m_io  )
+  m_evtID( rhs.m_evtID ),
+  m_mem  ( rhs.m_mem ),
+  m_cpu  ( rhs.m_cpu ),
+  m_io   ( rhs.m_io  )
 {}
 
 Data& Data::operator=( const Data& rhs )
 {
   if ( this != &rhs ) {
-    m_mem = rhs.m_mem;
-    m_cpu = rhs.m_cpu;
-    m_io  = rhs.m_io;
+    m_evtID = rhs.m_evtID;
+    m_mem   = rhs.m_mem;
+    m_cpu   = rhs.m_cpu;
+    m_io    = rhs.m_io;
   }
   return *this;
 }
 
 std::ostream& operator<<( std::ostream& out, const PerfMon::Data& o )
 {
-  out << "evt ===========\n" 
+  out << PerfMon::evtLine << "\n"
+      << "evt: " << o.eventID() << "\n"
       << "mem: " << o.mem()
       << "cpu: " << o.cpu()
       << "io : " << o.io ()