GeoApaChannelGroupService.h
Go to the documentation of this file.
1 // GeoApaChannelGroupService.h
2 
3 // David Adams
4 // October 2016
5 //
6 // APA channel groups extracted from larsoft geometry.
7 // Group igrp holds the channels from APA igrp.
8 //
9 // The array ApaRops specifies which ROPs are kept for each group.
10 // If it is empty, all ROPS are retained.
11 // Otherwise the bit pattern at ApaRops[igrp%nent] (nent = ApaRops.size())
12 // specifies which ROPS to to keep. E.g. 15 = 0xa = b_1111 to keep all four or
13 // 11 = 0xb = 1011 to keep ROPs 0, 1 and 3.
14 // Note the DUNE plane ordering from highest to lowest is x2-x1-v-u so that
15 // 7 keeps planes from the first TPC and 11 keeps the planes for the 2nd TPC.
16 //
17 // Parameters:
18 // LogLevel - 0=silent, 1=init only, 2=every call
19 // ApaRops - Bit pattern indicating which ROPs to keep (see above).
20 
21 #ifndef GeoApaChannelGroupService_H
22 #define GeoApaChannelGroupService_H
23 
27 
29 
30 public:
31 
32  // Ctor.
34 
35  // Ctor.
37 
38  // Dtor.
39  ~GeoApaChannelGroupService() =default;
40 
41  // Return the # groups.
42  Index size() const;
43 
44  // Return a group name.
45  Name name(Index igrp) const;
46 
47  // Return a group.
48  const ChannelVector& channels(Index igrp) const;
49 
50  // Print parameters.
51  std::ostream& print(std::ostream& out =std::cout, std::string prefix ="") const;
52 
53 private:
54 
55  typedef std::vector<Name> NameVector;
56  typedef std::vector<ChannelVector> ChannelVectorVector;
57 
59 
60  // Parameters.
62  std::vector<int> m_ApaRops;
63 
65  NameVector m_names;
66  ChannelVectorVector m_chanvecs;
67 
68 };
69 
71 
72 #endif
~GeoApaChannelGroupService()=default
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< ChannelVector > ChannelVectorVector
std::ostream & print(std::ostream &out=std::cout, std::string prefix="") const
art framework interface to geometry description
const ChannelVector & channels(Index igrp) const
GeoApaChannelGroupService(fhicl::ParameterSet const &pset)
art::ServiceHandle< geo::Geometry > m_pgeo
std::vector< Channel > ChannelVector