Dune35tChannelGroupService.h
Go to the documentation of this file.
1 // Dune35tChannelGroupService.h
2 
3 // David Adams
4 // January 2017
5 //
6 // Channel groups for DUNE 35t. Grouping may be by APA, Regulator or ASIC.
7 // Channels may be online or offline. Group numbers are online.
8 //
9 // Parameters:
10 // UseOffline - true for offline channel numbers, false for online
11 // Grouping - Grouping option: APA, ASIC or Regulator
12 // SplitByPlane - split groups by plane (u, v, z1, z2)
13 // LogLevel - 0=quiet, 1=init only, 2=every call
14 
15 #ifndef Dune35tChannelGroupService_H
16 #define Dune35tChannelGroupService_H
17 
19 #include "lbne-raw-data/Services/ChannelMap/ChannelMapService.h"
21 
23 
24 public:
25 
26  // Ctor.
28 
29  // Ctor.
31 
32  // Dtor.
33  ~Dune35tChannelGroupService() =default;
34 
35  // Return the # groups.
36  Index size() const;
37 
38  // Return a group name.
39  Name name(Index igrp) const;
40 
41  // Return a group.
42  const ChannelVector& channels(Index igrp) const;
43 
44  // Print parameters.
45  std::ostream& print(std::ostream& out =std::cout, std::string prefix ="") const;
46 
47 private:
48 
49  // Configuration parameters.
51  std::string m_Grouping; // APA, ASIC, Regulator.
54 
55  typedef std::vector<Name> NameVector;
56  typedef std::vector<ChannelVector> ChannelVectorVector;
57 
59 
60  NameVector m_names;
61  ChannelVectorVector m_chanvecs;
62 
63 };
64 
66 
67 #endif
Dune35tChannelGroupService(fhicl::ParameterSet const &pset)
std::string string
Definition: nybbler.cc:12
art::ServiceHandle< lbne::ChannelMapService > m_pcms
std::ostream & print(std::ostream &out=std::cout, std::string prefix="") const
std::vector< ChannelVector > ChannelVectorVector
~Dune35tChannelGroupService()=default
const ChannelVector & channels(Index igrp) const
#define DECLARE_ART_SERVICE_INTERFACE_IMPL(svc, iface, scope)
std::vector< Channel > ChannelVector