AddDifSynchro Class Reference

#include <AddDifSynchro.hh>

Inheritance diagram for AddDifSynchro:

Inheritance graph
[legend]
Collaboration diagram for AddDifSynchro:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

Definition at line 41 of file AddDifSynchro.hh.


Constructor & Destructor Documentation

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   }


Member Function Documentation

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  ) 

Definition at line 120 of file AddDifSynchro.cpp.

00120 {/*  we don't modify anything */;}


Member Data Documentation

LCWriter* AddDifSynchro::lcWrt [protected]

Definition at line 44 of file AddDifSynchro.hh.

Referenced by processEvent(), processRunHeader(), and ~AddDifSynchro().

int AddDifSynchro::nEvent [protected]

Definition at line 45 of file AddDifSynchro.hh.

Referenced by processEvent().

string AddDifSynchro::difSyncrhoFileName [protected]

Definition at line 46 of file AddDifSynchro.hh.

list<int> AddDifSynchro::syncEvtId [protected]

Definition at line 47 of file AddDifSynchro.hh.

Referenced by modifyEvent().


The documentation for this class was generated from the following files:
Generated on Mon Jan 7 13:17:56 2013 for MicromegasFramework by  doxygen 1.4.7