#include <AddDifSynchro.hh>
Inheritance diagram for AddDifSynchro:
Public Member Functions | |
AddDifSynchro (const std::string _difSyncrhoFileName, const std::string _outputfileName) | |
~AddDifSynchro () | |
void | processEvent (LCEvent *evt) |
void | modifyEvent (LCEvent *evt) |
void | processRunHeader (LCRunHeader *run) |
void | modifyRunHeader (LCRunHeader *run) |
Protected Attributes | |
LCWriter * | lcWrt |
int | nEvent |
string | difSyncrhoFileName |
list< int > | syncEvtId |
Definition at line 41 of file AddDifSynchro.hh.
AddDifSynchro::AddDifSynchro | ( | const std::string | _difSyncrhoFileName, | |
const std::string | _outputfileName | |||
) |
AddDifSynchro::~AddDifSynchro | ( | ) |
Definition at line 85 of file AddDifSynchro.cpp.
00085 { 00086 00087 // close outputfile 00088 cout << endl << "Done !" << endl; 00089 lcWrt->close() ; 00090 delete lcWrt ; 00091 }
void AddDifSynchro::processEvent | ( | LCEvent * | evt | ) |
Definition at line 93 of file AddDifSynchro.cpp.
00093 { /* used for 'read only' access*/ 00094 00095 // Write current read event and just modifing (add Dif_synchro parameter) 00096 nEvent ++ ; 00097 lcWrt->writeEvent( evt ) ; 00098 }
void AddDifSynchro::modifyEvent | ( | LCEvent * | evt | ) |
Definition at line 100 of file AddDifSynchro.cpp.
00100 { 00101 00102 // here we can modify existing objects that have been read from a stream: 00103 // get first list element 00104 int difEvtId = syncEvtId.front(); 00105 // erase first list element 00106 syncEvtId.pop_front(); 00107 evt->parameters().setValue("Dif_syncro",difEvtId ) ; 00108 cout << "Write Event[" << evt->getEventNumber() << "] \r" << flush; 00109 00110 }
void AddDifSynchro::processRunHeader | ( | LCRunHeader * | run | ) |
Definition at line 113 of file AddDifSynchro.cpp.
00113 { 00114 00115 // just copy run headers to the outputfile 00116 lcWrt->writeRunHeader( run ) ; 00117 cout << "Write Run Header"<< endl; 00118 }
void AddDifSynchro::modifyRunHeader | ( | LCRunHeader * | run | ) |
LCWriter* AddDifSynchro::lcWrt [protected] |
Definition at line 44 of file AddDifSynchro.hh.
Referenced by processEvent(), processRunHeader(), and ~AddDifSynchro().
int AddDifSynchro::nEvent [protected] |
string AddDifSynchro::difSyncrhoFileName [protected] |
Definition at line 46 of file AddDifSynchro.hh.
list<int> AddDifSynchro::syncEvtId [protected] |