FileChannelMappingService.h
Go to the documentation of this file.
1 // FileChannelMappingService
2 
3 // David Adams
4 // February 2016
5 //
6 // Implementation of online-offline channel mapping reading from a file.
7 //
8 // Parameters:
9 // FileName - Name of the channel map file. Search done in FW_SEARCH_PATH.
10 // FilePathEnv ["FW_SEARCH_PATH"] - Name of the env variable nolding the file search path.
11 // LogLevel [1] - Message logging level: 0=none, 1=init, 2+=every call to interface
12 //
13 // The parameters FilePathEnv and LogLevel are optional and have the indicated default values.
14 
15 #ifndef FileChannelMappingService_H
16 #define FileChannelMappingService_H
17 
19 #include <vector>
20 #include <iostream>
21 
22 class TH1;
23 namespace CLHEP {
24 class HepRandomEngine;
25 }
26 
28 
29  typedef std::vector<Channel> ChannelMap;
30 
31 public:
32 
33  // Ctor.
35 
36  // Ctor.
38 
39  // Map online to offline.
40  Channel offline(Channel onlineChannel) const;
41 
42  // Map offline to online.
43  Channel online(Channel offlineChannel) const;
44 
45  // Print the parameters.
46  std::ostream& print(std::ostream& out =std::cout, std::string prefix ="") const;
47 
48 private:
49 
50  // Parameters.
54 
55  // Maps.
56  ChannelMap m_onMap;
57  ChannelMap m_offMap;
58 
59 };
60 
62 
63 #endif
std::string string
Definition: nybbler.cc:12
DECLARE_ART_SERVICE_INTERFACE_IMPL(MySharedService, art::test::MyServiceInterface, SHARED) DEFINE_ART_SERVICE_INTERFACE_IMPL(MySharedService
std::vector< Channel > ChannelMap