00001 #ifndef LCIOOutputProcessor_h
00002 #define LCIOOutputProcessor_h 1
00003
00004 #include "Processor.h"
00005 #include "lcio.h"
00006 #include "IO/LCWriter.h"
00007
00008
00009 using namespace lcio ;
00010
00011 namespace IMPL{
00012 class LCCollectionVec ;
00013 }
00014
00015 namespace marlin{
00016
00048 class LCIOOutputProcessor : public Processor {
00049
00050 typedef std::vector< LCCollectionVec* > SubSetVec ;
00051
00052
00053 public:
00054
00055 virtual Processor* newProcessor() { return new LCIOOutputProcessor ; }
00056
00057
00058 LCIOOutputProcessor() ;
00059
00061 LCIOOutputProcessor(const std::string& typeName) ;
00062
00064 virtual ~LCIOOutputProcessor() ;
00065
00068 virtual void init() ;
00069
00072 virtual void processRunHeader( LCRunHeader* run) ;
00073
00076 virtual void processEvent( LCEvent * evt ) ;
00077
00080 virtual void end() ;
00081
00085 void dropCollections( LCEvent * evt ) ;
00086
00087
00088 protected:
00089
00090 std::string _lcioOutputFile ;
00091 std::string _lcioWriteMode ;
00092
00093 StringVec _dropCollectionNames ;
00094 StringVec _dropCollectionTypes ;
00095 StringVec _keepCollectionNames ;
00096 StringVec _fullSubsetCollections ;
00097
00098 int _splitFileSizekB ;
00099
00100 SubSetVec _subSets ;
00101
00102 LCWriter* _lcWrt ;
00103 int _nRun ;
00104 int _nEvt ;
00105
00106 private:
00107
00109 void myConstruct() ;
00110
00111 } ;
00112
00113 }
00114 #endif
00115
00116
00117