MarlinMT  0.1.0
LCIOEventUnpackingProcessor.cc
Go to the documentation of this file.
1 
2 // -- marlinmt headers
3 #include <marlinmt/Processor.h>
5 #include <marlinmt/Logging.h>
7 
8 // -- lcio headers
9 #include <lcio.h>
10 
11 // -- std headers
12 #include <cmath>
13 #include <ctime>
14 #include <random>
15 
16 namespace marlinmt {
17 
23 
24  public:
26  void init() ;
27  void processEvent( EventStore * evt ) ;
28  };
29 
30  //--------------------------------------------------------------------------
31  //--------------------------------------------------------------------------
32 
34  Processor("LCIOEventUnpacking") {
35  // modify processor description
36  setDescription( "LCIOEventUnpackingProcessor unpacks LCIO event" ) ;
37  }
38 
39  //--------------------------------------------------------------------------
40 
42  log<DEBUG>() << "LCIOEventUnpackingProcessor::init() called" << std::endl ;
43  }
44 
45  //--------------------------------------------------------------------------
46 
48  auto lcevent = event->event<EVENT::LCEvent>() ;
49  auto colnames = lcevent->getCollectionNames() ;
50  if( not colnames->empty() ) {
51  auto colname = colnames->at(0) ;
52  lcevent->getCollection( colname ) ;
53  }
54  }
55 
56  // processor declaration
58 }
Simple processor that triggers the LCEvent data unpacking.
#define MARLINMT_DECLARE_PROCESSOR(Class)
Definition: PluginManager.h:34
void setDescription(const std::string &desc)
Set the component description.
Definition: Component.cc:41
Processor class.
Definition: Processor.h:43
void processEvent(EventStore *evt)
Process an input event.
EventStore class.
Definition: EventStore.h:17