ChannelGroupService.h
Go to the documentation of this file.
1 // ChannelGroupService.h
2 
3 // David Adams
4 // October 2016
5 //
6 // Interface for a service that groups channels.
7 
8 #ifndef ChannelGroupService_H
9 #define ChannelGroupService_H
10 
11 #include <vector>
12 #include <iostream>
13 
15 
16 public:
17 
18  typedef unsigned int Index;
19  typedef unsigned int Channel;
20  typedef std::vector<Channel> ChannelVector;
21  typedef std::string Name;
22 
23  virtual ~ChannelGroupService() = default;
24 
25  // Return the # groups.
26  virtual Index size() const =0;
27 
28  // Return a group name.
29  virtual Name name(Index igrp) const =0;
30 
31  // Return a group.
32  virtual const ChannelVector& channels(Index igrp) const =0;
33 
34  // Print parameters.
35  virtual std::ostream& print(std::ostream& out =std::cout, std::string prefix ="") const =0;
36 
37 };
38 
39 #ifndef __CLING__
42 #endif
43 
44 #endif
virtual Index size() const =0
std::string string
Definition: nybbler.cc:12
virtual ~ChannelGroupService()=default
virtual std::ostream & print(std::ostream &out=std::cout, std::string prefix="") const =0
virtual const ChannelVector & channels(Index igrp) const =0
virtual Name name(Index igrp) const =0
#define DECLARE_ART_SERVICE_INTERFACE(svc, scope)
std::vector< Channel > ChannelVector