MarlinTPC  1.2.0
ChannelMappingProcessor.h
1 #ifndef ChannelMappingProcessor_h
2 #define ChannelMappingProcessor_h 1
3 
4 // LCIO
5 #include "lcio.h"
6 
7 // Marlin
8 #include "marlin/Processor.h"
9 #include "marlin/Exceptions.h"
10 
11 // MarlinTPC
12 #include "ADCChannelMapping.h"
13 #include "ChannelMappingListener.h"
14 
15 // C++
16 #include <string>
17 
18 
19 namespace marlintpc
20 {
21 
46  class ChannelMappingProcessor : public marlin::Processor
47  {
48 
49  public:
50 
51  virtual Processor* newProcessor()
52  {
53  return new ChannelMappingProcessor ;
54  }
55 
57 
58  virtual void init() ;
59 
60  virtual void processRunHeader(lcio::LCRunHeader* run) ;
61 
62  virtual void processEvent(lcio::LCEvent * evt) ;
63 
64  virtual void check(lcio::LCEvent * evt) ;
65 
66  virtual void end() ;
67 
68 
69  protected:
70 
72  std::string _inputColName ;
74  std::string _outputColName ;
76  std::string _channelMappingColName ;
77 
80 
84  bool _removeChannelsWithoutMapping;
85  private:
86 
87  ChannelMappingListener* _ChannelMappingListener;
88 
90  lcio::long64 _missingConditionsDataOverrideLCIOTime;
91 
92  //fg: add a map of channels that have been removed from the collection as
93  // their hardware address is not mapped to any known software address (padID)
94  typedef std::map< std::pair< int, int > , unsigned > MAP ;
95  MAP _cMap ;
96  } ;
97 }
98 #endif
Channel Mapping processor of the MarlinTPC package.
Definition: ChannelMappingProcessor.h:46
bool _outputIsPersistent
set the persistency flag of the output collection
Definition: ChannelMappingProcessor.h:79
std::string _inputColName
the name of the input collection
Definition: ChannelMappingProcessor.h:72
Helper Class which provides access to the ADCChannelMappings for every event.
Definition: ChannelMappingListener.h:37
std::string _channelMappingColName
the name of the ChannelMapping collection
Definition: ChannelMappingProcessor.h:76
int _missingConditionsDataOverrideTimespan
The timepan in seconds for which the last valid collection will be used if no conditions data are ava...
Definition: ChannelMappingProcessor.h:83
std::string _outputColName
the name of the output collection
Definition: ChannelMappingProcessor.h:74