psana/src/PrintSeparator.cpp

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: PrintSeparator.cpp 1756 2011-04-01 22:21:45Z salnikov $
00004 //
00005 // Description:
00006 //      Class PrintSeparator...
00007 //
00008 // Author List:
00009 //      Andrei Salnikov
00010 //
00011 //------------------------------------------------------------------------
00012 
00013 //-----------------------
00014 // This Class's Header --
00015 //-----------------------
00016 #include "psana/PrintSeparator.h"
00017 
00018 //-----------------
00019 // C/C++ Headers --
00020 //-----------------
00021 
00022 //-------------------------------
00023 // Collaborating Class Headers --
00024 //-------------------------------
00025 #include "MsgLogger/MsgLogger.h"
00026 
00027 //-----------------------------------------------------------------------
00028 // Local Macros, Typedefs, Structures, Unions and Forward Declarations --
00029 //-----------------------------------------------------------------------
00030 
00031 using namespace psana;
00032 PSANA_MODULE_FACTORY(PrintSeparator)
00033 
00034 //              ----------------------------------------
00035 //              -- Public Function Member Definitions --
00036 //              ----------------------------------------
00037 
00038 namespace psana {
00039 
00040 //----------------
00041 // Constructors --
00042 //----------------
00043 PrintSeparator::PrintSeparator (const std::string& name)
00044   : Module(name)
00045 {
00046   std::string sep = configStr("separator", "=");
00047   unsigned repeat = config("repeat", 80U);
00048   m_separator.reserve(sep.size()*repeat);
00049   for (unsigned i = 0; i < repeat; ++ i) {
00050     m_separator += sep;
00051   }
00052 }
00053 
00054 //--------------
00055 // Destructor --
00056 //--------------
00057 PrintSeparator::~PrintSeparator ()
00058 {
00059 }
00060 
00061 /// Method which is called with event data, this is the only required 
00062 /// method, all other methods are optional
00063 void 
00064 PrintSeparator::event(Event& evt, Env& env)
00065 {
00066   MsgLogRoot(info, m_separator);    
00067 }
00068   
00069 } // namespace psana

Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7