Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel

Wiki Markup
\*\**\**Chrono*\*\**\*     INFO \**\**\**\*********************************************************************************************\*
\*\**\**Chrono*\***\*     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
\*\**\**Chrono*\*\**\*     INFO \**\**\**\*********************************************************************************************\*
Digitization:ex...   INFO Time User   : Tot=  406  \[s\] Ave/Min/Max= 4.06(+\-   13)/    0/3.8e+03 \[ms\] #=100000
G4Generator:exe...   INFO Time User   : Tot=  429  \[s\] Ave/Min/Max= 4.29(+\- 17.8)/    0/5.06e+03 \[ms\] #=100000
EA_Generation        INFO Time User   : Tot=  446  \[s\] Ave/Min/Max= 4.46(+\- 17.8)/    0/5.06e+03 \[ms\] #=100000
Generation:execute   INFO Time User   : Tot=  446  \[s\] Ave/Min/Max= 4.46(+\- 17.8)/    0/5.06e+03 \[ms\] #=100000
FirstPass:execute    INFO Time User   : Tot= 12.2\[min\] Ave/Min/Max= 68.8(+\-  106)/    0/1.36e+03 \[ms\] #=10602
EA_Tkr               INFO Time User   : Tot= 12.2\[min\] Ave/Min/Max= 68.8(+\-  106)/    0/1.36e+03 \[ms\] #=10602
Tkr:execute          INFO Time User   : Tot= 12.2\[min\] Ave/Min/Max= 68.9(+\-  106)/    0/1.36e+03 \[ms\] #=10602
EA_Reconstruction    INFO Time User   : Tot= 13.9\[min\] Ave/Min/Max= 78.8(+\-  117)/    0/1.37e+03 \[ms\] #=10602
Reconstruction:...   INFO Time User   : Tot= 13.9\[min\] Ave/Min/Max= 78.8(+\-  117)/    0/1.37e+03 \[ms\] #=10602
Triggered:execute    INFO Time User   : Tot= 14.9\[min\] Ave/Min/Max= 84.3(+\-  117)/    0/1.37e+03 \[ms\] #=10602
EA_Event             INFO Time User   : Tot= 29.7\[min\] Ave/Min/Max= 17.8(+\-   59)/    0/9.78e+03 \[ms\] #=100000
Event:execute        INFO Time User   : Tot= 29.7\[min\] Ave/Min/Max= 17.8(+\-   59)/    0/9.78e+03 \[ms\] #=100000
Top:execute          INFO Time User   : Tot= 29.7\[min\] Ave/Min/Max= 17.8(+\-   59)/    0/9.78e+03 \[ms\] #=100000
ChronoStatSvc        INFO Time User   : Tot= 30.8\[min\]                                             #=  1
\*\**\**Chrono*\*\**\*     INFO \**\**\**\*********************************************************************************************\*
ChronoStatSvc.f...   INFO  Service finalized succesfully

...

GlastRandomSvc - can't recall why, but we implemented our own random number service that initializes the seeds of the random number generators for all packages that obtain random numbers.  We desired to have event by event reproducibility (which we didn't achieve)...rather we can reproduce a run.

Toy Example

Code Block

#include "GaudiKernel/Algorithm.h"
#include "GaudiKernel/Property.h"
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/AlgFactory.h"
#include "GaudiKernel/DataObject.h"
#include "GaudiKernel/IDataProviderSvc.h"
#include "GaudiKernel/SmartDataPtr.h"
#include "Event/TopLevel/Event.h"
#include "Event/TopLevel/EventModel.h"
/** @class HelloWorld @brief Simple Hello World example Gaudi algorithm.  Prints Hello World with different priority levels. 
$Header$
*/
class HelloWorld : public Algorithm {
public: 
/// Constructor of this form must be provided   
HelloWorld(const std::string& name, ISvcLocator* pSvcLocator)  : Algorithm(name, pSvcLocator) { };  
/// Three mandatory member functions of any Gaudi algorithm 
StatusCode initialize() { return StatusCode::SUCCESS; }; 
StatusCode execute(); 
StatusCode finalize() { return StatusCode::SUCCESS; };

private:
};
// Static Factory declaration
static const AlgFactory<HelloWorld>  Factory;
const IAlgFactory& HelloWorldFactory = Factory;

StatusCode HelloWorld::execute() { 
  MsgStream         log( msgSvc(), name() ); 
  static int eventCounter = 0; 

  // Sending informational log message
  log << MSG::INFO << "Hello World!" << endreq;

  // Access the Event TDS and retrieve the top-level "Event" object
  SmartDataPtr<Event::EventHeader> evtTds(eventSvc(), EventModel::EventHeader);
  if (evtTds) {    
    evtTds->setRun(10);    
    evtTds->setEvent(eventCounter++);  
    log << MSG::INFO << "<RunId, EvtId> = <" << evtTds->run() << ", " << evtTds->event() << ">" << endreq;
  } 
  return StatusCode::SUCCESS;
}

References

Some words from Fermi's Online Workbook.

...