Marlin  1.17.1
 All Classes Namespaces Functions Variables Enumerations Friends Pages
Public Member Functions | Protected Attributes | List of all members
marlin::LCIOOutputProcessor Class Reference

Default output processor. More...

#include <LCIOOutputProcessor.h>

Inheritance diagram for marlin::LCIOOutputProcessor:
marlin::Processor

Public Member Functions

virtual ProcessornewProcessor ()
 Return a new instance of the processor. More...
 
 LCIOOutputProcessor (const marlin::LCIOOutputProcessor &)=delete
 
LCIOOutputProcessoroperator= (const marlin::LCIOOutputProcessor &)=delete
 
 LCIOOutputProcessor (const std::string &typeName)
 C'tor for possible subclasses.
 
virtual ~LCIOOutputProcessor ()
 D'tor for subclasses.
 
virtual void init ()
 Open the LCIO outputfile.
 
virtual void processRunHeader (LCRunHeader *run)
 Write every run header.
 
virtual void processEvent (LCEvent *evt)
 Write every event.
 
virtual void end ()
 Close outputfile.
 
void dropCollections (LCEvent *evt)
 Drops the collections specified in the steering file parameters DropCollectionNames and DropCollectionTypes.
 
- Public Member Functions inherited from marlin::Processor
 Processor (const std::string &typeName)
 Possible verbosity levels. More...
 
virtual ~Processor ()
 Destructor.
 
virtual void check (LCEvent *)
 Called for every event - right after processEvent() has been called for this processor. More...
 
virtual const std::string & type () const
 Return type name for the processor (as set in constructor).
 
virtual const std::string & name () const
 Return name of this processor.
 
virtual const std::string & logLevelName () const
 Return name of the local verbosity level of this processor - "" if not set.
 
virtual std::shared_ptr
< StringParameters
parameters ()
 Return parameters defined for this Processor.
 
virtual void printDescription ()
 Print information about this processor in ASCII steering file format.
 
virtual void printDescriptionXML (std::ostream &stream=std::cout)
 Print information about this processor in XML steering file format.
 
template<class T >
void printParameters ()
 Print the parameters and their values depending on the given verbosity level.
 
void printParameters ()
 Print the parameters and their values with verbosity level MESSAGE.
 
const std::string & description ()
 Description of processor.
 
bool isFirstEvent ()
 True if first event in processEvent(evt) - use this e.g. More...
 
std::string getLCIOInType (const std::string &colName)
 Return the LCIO input type for the collection colName - empty string if colName is not a registered collection name.
 
std::string getLCIOOutType (const std::string &colName)
 Return the LCIO output type for the collection colName - empty string if colName is not a registered collection name.
 
bool isInputCollectionName (const std::string &parameterName)
 True if the given parameter defines an LCIO input collection, i.e. More...
 
bool isOutputCollectionName (const std::string &parameterName)
 True if the given parameter defines an LCIO output collection.
 
virtual void setParameters (std::shared_ptr< StringParameters > parameters)
 Helper function returns the ProcessorParameter for the given name. More...
 
virtual void setName (const std::string &processorName)
 Set processor name.
 

Protected Attributes

std::string _lcioOutputFile =""
 
std::string _lcioWriteMode =""
 
StringVec _dropCollectionNames {}
 
StringVec _dropCollectionTypes {}
 
StringVec _keepCollectionNames {}
 
StringVec _fullSubsetCollections {}
 
int _splitFileSizekB =1992294
 
SubSetVec _subSets {}
 
LCWriter * _lcWrt =NULL
 
int _nRun =-1
 
int _nEvt =-1
 
int _compressionLevel {6}
 
- Protected Attributes inherited from marlin::Processor
std::string _description =""
 Describes what the processor does. More...
 
std::string _typeName =""
 
std::string _processorName =""
 
std::shared_ptr< StringParameters_parameters {}
 
ProcParamMap _map {}
 
bool _isFirstEvent = false
 
LCIOTypeMap _inTypeMap {}
 
LCIOTypeMap _outTypeMap {}
 
std::string _logLevelName {}
 

Additional Inherited Members

- Protected Member Functions inherited from marlin::Processor
void setReturnValue (bool val)
 Set the return value for this processor - typically at end of processEvent(). More...
 
void setReturnValue (const std::string &name, bool val)
 Set a named return value for this processor - typically at end of processEvent() The value can be used in a condition in the steering file referred to by ProcessorName.name of the processor.
 
template<class T >
void registerProcessorParameter (const std::string &parameterName, const std::string &parameterDescription, T &parameter, const T &defaultVal, int setSize=0)
 Register a steering variable for this processor - call in constructor of processor. More...
 
void registerInputCollection (const std::string &collectionType, const std::string &parameterName, const std::string &parameterDescription, std::string &parameter, const std::string &defaultVal, int setSize=0)
 Specialization of registerProcessorParameter() for a parameter that defines an input collection - can be used fo checking the consistency of the steering file.
 
void registerOutputCollection (const std::string &collectionType, const std::string &parameterName, const std::string &parameterDescription, std::string &parameter, const std::string &defaultVal, int setSize=0)
 Specialization of registerProcessorParameter() for a parameter that defines an output collection - can be used fo checking the consistency of the steering file.
 
void registerInputCollections (const std::string &collectionType, const std::string &parameterName, const std::string &parameterDescription, StringVec &parameter, const StringVec &defaultVal, int setSize=0)
 Specialization of registerProcessorParameter() for a parameter that defines one or several input collections - can be used fo checking the consistency of the steering file.
 
template<class T >
void registerOptionalParameter (const std::string &parameterName, const std::string &parameterDescription, T &parameter, const T &defaultVal, int setSize=0)
 Same as registerProcessorParameter except that the parameter is optional. More...
 
bool parameterSet (const std::string &name)
 Tests whether the parameter has been set in the steering file.
 
void checkForExistingParameter (const std::string &parameterName)
 Tests whether the parameter has been registered before. More...
 
template<class T >
void message (const std::string &m) const
 Print message according to verbosity level of the templated parameter (one of DEBUG, MESSAGE, WARNING, ERROR ) and the global parameter "Verbosity". More...
 
template<class T >
void message (const std::basic_ostream< char, std::char_traits< char > > &m) const
 Same as message(const std::string& message) except that it allows the output of more complex messages in the argument using the log() method, e.g. More...
 
std::stringstream & log () const
 Returns an empty stringstream that is used by the message method. More...
 

Detailed Description

Default output processor.

If active every event is writen to the specified LCIO file. Make sure that the processor is the last one in your list of active processors. You can optionally drop some collections from the event before it gets written to the file, e.g. you can drop all collections of types SimCalorimeterHit and SimTrackerHit. It is the users responsibility to check whether the droped objects are still referenced by other objects (e.g. LCRelations) and drop those collections as well - if needed. If CalorimeterHit and TrackerHit objects are droped then Tracks and clusters will be store w/o pointers to hits.

Output

file containing the LCIO events

Parameters
LCIOOutputFilename of outputfile incl. path
LCIOWriteModeWRITE_NEW, WRITE_APPEND [optional]
DropCollectionNamesname of collections to be droped [optional]
DropCollectionTypestype of collections to be droped [optional]
DropCollectionNamesdrops the named collections from the event
DropCollectionTypesdrops all collections of the given type from the event
LCIOOutputFilename of output file
LCIOWriteModewrite mode for output file: WRITE_APPEND or WRITE_NEW
KeepCollectionNamesnames of collections that are to be kept unconditionally
fullSubsetCollectionsoptionally write all objects in subset collections to the file
Author
F. Gaede, DESY
Version
Id:
LCIOOutputProcessor.h,v 1.8 2008-04-15 10:14:24 gaede Exp

Member Function Documentation

virtual Processor* marlin::LCIOOutputProcessor::newProcessor ( )
inlinevirtual

Return a new instance of the processor.

Has to be implemented by subclasses.

Implements marlin::Processor.


The documentation for this class was generated from the following files: