ImgAlgos::ImgTimeStampList Class Reference
[ImgAlgos package]

ImgTimeStampList gets the time stamps from events and save them in file. More...

#include <ImgTimeStampList.h>

List of all members.

Public Member Functions

 ImgTimeStampList (const std::string &name)
virtual ~ImgTimeStampList ()
 Destructor.
virtual void beginJob (Event &evt, Env &env)
 Method which is called once at the beginning of the job.
virtual void beginRun (Event &evt, Env &env)
 Method which is called at the beginning of the run.
virtual void beginCalibCycle (Event &evt, Env &env)
 Method which is called at the beginning of the calibration cycle.
virtual void event (Event &evt, Env &env)
virtual void endCalibCycle (Event &evt, Env &env)
 Method which is called at the end of the calibration cycle.
virtual void endRun (Event &evt, Env &env)
 Method which is called at the end of the run.
virtual void endJob (Event &evt, Env &env)
 Method which is called once at the end of the job.

Protected Member Functions

void saveImageInFile (Event &evt)
void printInputParameters ()
 Print input parameters.
void printEventRecord (Event &evt, std::string comment=std::string())
 Print event record.
void printSummary (Event &evt, std::string comment=std::string())
 Print summary.
void printSummaryForParser (Event &evt, std::string comment=std::string())
 Print summary for parser.
void openOutputFiles (Event &evt)
 Open temporary output file with time records.
void closeOutputFiles ()
 Close temporary output file with time records.
void saveMetadataInFile ()
 Save metadata in file.
void saveTimeRecord (Event &evt)
 Saves the time record in temporary output file.
void evaluateMeanTimeBetweenEvents ()
 Evaluate average time and rms between the frames.
void saveTimeRecordWithIndexInFile ()


Detailed Description

ImgTimeStampList gets the time stamps from events and save them in file.

ImgTimeStampList psana module class is a simplified version of ImgVsTimeSplitInFiles. * saves timestamps for selected or all events in the text file * calculates sequential time index for each event.

This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.

See also:
CSPadImageProducer
Version:
$Id: ImgTimeStampList.h 8035 2014-04-19 00:56:24Z dubrovin@SLAC.STANFORD.EDU $
Author:
Mikhail S. Dubrovin

Definition at line 64 of file ImgTimeStampList.h.


Constructor & Destructor Documentation

ImgAlgos::ImgTimeStampList::ImgTimeStampList ( const std::string &  name  ) 

Definition at line 53 of file ImgTimeStampList.cpp.

References config.

ImgAlgos::ImgTimeStampList::~ImgTimeStampList (  )  [virtual]

Destructor.

Definition at line 86 of file ImgTimeStampList.cpp.


Member Function Documentation

void ImgAlgos::ImgTimeStampList::beginCalibCycle ( Event &  evt,
Env &  env 
) [virtual]

Method which is called at the beginning of the calibration cycle.

Definition at line 112 of file ImgTimeStampList.cpp.

void ImgAlgos::ImgTimeStampList::beginJob ( Event &  evt,
Env &  env 
) [virtual]

Method which is called once at the beginning of the job.

Definition at line 94 of file ImgTimeStampList.cpp.

References printInputParameters().

void ImgAlgos::ImgTimeStampList::beginRun ( Event &  evt,
Env &  env 
) [virtual]

Method which is called at the beginning of the run.

Definition at line 103 of file ImgTimeStampList.cpp.

References ImgAlgos::stringRunNumber().

void ImgAlgos::ImgTimeStampList::closeOutputFiles (  )  [protected]

Close temporary output file with time records.

Definition at line 180 of file ImgTimeStampList.cpp.

Referenced by endJob().

void ImgAlgos::ImgTimeStampList::endCalibCycle ( Event &  evt,
Env &  env 
) [virtual]

Method which is called at the end of the calibration cycle.

Definition at line 137 of file ImgTimeStampList.cpp.

void ImgAlgos::ImgTimeStampList::endJob ( Event &  evt,
Env &  env 
) [virtual]

Method which is called once at the end of the job.

Definition at line 153 of file ImgTimeStampList.cpp.

References closeOutputFiles(), evaluateMeanTimeBetweenEvents(), printSummary(), printSummaryForParser(), and saveTimeRecordWithIndexInFile().

void ImgAlgos::ImgTimeStampList::endRun ( Event &  evt,
Env &  env 
) [virtual]

Method which is called at the end of the run.

Definition at line 145 of file ImgTimeStampList.cpp.

void ImgAlgos::ImgTimeStampList::evaluateMeanTimeBetweenEvents (  )  [protected]

Evaluate average time and rms between the frames.

Definition at line 189 of file ImgTimeStampList.cpp.

References sqrt().

Referenced by endJob().

void ImgAlgos::ImgTimeStampList::event ( Event &  evt,
Env &  env 
) [virtual]

Method which is called with event data, this is the only required method, all other methods are optional

Definition at line 121 of file ImgTimeStampList.cpp.

References openOutputFiles(), printEventRecord(), and saveTimeRecord().

void ImgAlgos::ImgTimeStampList::openOutputFiles ( Event &  evt  )  [protected]

Open temporary output file with time records.

Definition at line 170 of file ImgTimeStampList.cpp.

Referenced by event().

void ImgAlgos::ImgTimeStampList::printEventRecord ( Event &  evt,
std::string  comment = std::string() 
) [protected]

Print event record.

Definition at line 237 of file ImgTimeStampList.cpp.

References src::psana_doc_info::info, MsgLog, setup::name, ImgAlgos::stringFromUint(), and ImgAlgos::stringTimeStamp().

Referenced by event().

void ImgAlgos::ImgTimeStampList::printInputParameters (  )  [protected]

Print input parameters.

Definition at line 72 of file ImgTimeStampList.cpp.

References src::psana_doc_info::info, src::kerberos_::log, setup::name, and WithMsgLog.

Referenced by beginJob().

void ImgAlgos::ImgTimeStampList::printSummary ( Event &  evt,
std::string  comment = std::string() 
) [protected]

Print summary.

Definition at line 250 of file ImgTimeStampList.cpp.

References src::psana_doc_info::info, MsgLog, setup::name, and ImgAlgos::stringFromUint().

Referenced by endJob().

void ImgAlgos::ImgTimeStampList::printSummaryForParser ( Event &  evt,
std::string  comment = std::string() 
) [protected]

Print summary for parser.

Definition at line 262 of file ImgTimeStampList.cpp.

Referenced by endJob().

void ImgAlgos::ImgTimeStampList::saveImageInFile ( Event &  evt  )  [protected]

void ImgAlgos::ImgTimeStampList::saveMetadataInFile (  )  [protected]

Save metadata in file.

Definition at line 276 of file ImgTimeStampList.cpp.

References CalibFileFinder::fname, src::psana_doc_info::info, MsgLog, and setup::name.

void ImgAlgos::ImgTimeStampList::saveTimeRecord ( Event &  evt  )  [protected]

Saves the time record in temporary output file.

Definition at line 199 of file ImgTimeStampList.cpp.

References ImgAlgos::doubleTime(), ImgAlgos::eventCounterSinceConfigure(), ImgAlgos::fiducials(), and ImgAlgos::stringTimeStamp().

Referenced by event().

void ImgAlgos::ImgTimeStampList::saveTimeRecordWithIndexInFile (  )  [protected]

Functionality: 1. read the time record from the file m_fname_time 2. from t_sec and m_t_ave evaluate the time index tind 3. save the time record with time index in the output file m_fname.

Definition at line 297 of file ImgTimeStampList.cpp.

References ex_all_dets::dt_sec, Convert2x2::fin, Convert2x2::fout, src::psana_doc_info::info, PackageVersions::msg, MsgLog, MsgLogRoot, and setup::name.

Referenced by endJob().


The documentation for this class was generated from the following files:
Generated on 19 Dec 2016 for PSDMSoftware by  doxygen 1.4.7