SourceXtractorPlusPlus  0.8
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SourceIDsPlugin.h
Go to the documentation of this file.
1 
17 /*
18  * Copyright (C) 2012-2020 Euclid Science Ground Segment
19  *
20  * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
21  * Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option)
22  * any later version.
23  *
24  * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
25  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
26  * details.
27  *
28  * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to
29  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
30  */
31 
32 /*
33  * SourceIDsPlugin.h
34  *
35  * Created on: Apr 27, 2018
36  * Author: mkuemmel@usm.lmu.de
37  */
38 
39 #ifndef __SEIMPLEMENTATION_PLUGIN_SOURCEIDS_SOURCEIDSPLUGIN_H_
40 #define __SEIMPLEMENTATION_PLUGIN_SOURCEIDS_SOURCEIDSPLUGIN_H_
41 
44 
45 namespace SourceXtractor {
46 class SourceIDsPlugin : public Plugin {
47 public:
48 
52  virtual ~SourceIDsPlugin() = default;
53 
54  virtual void registerPlugin(PluginAPI& plugin_api) {
56 
57  //TODO: "unsigned int" seems not to work as column
59  "source_id",
60  [](const SourceID& prop){
61  return prop.getId();
62  },
63  "[]",
64  "Running object number"
65  );
67  "detection_id",
68  [](const SourceID& prop){
69  return prop.getDetectionId();
70  },
71  "[]",
72  "Running detection number"
73  );
74  plugin_api.getOutputRegistry().enableOutput<SourceID>("SourceIDs");
75  }
76 
77  virtual std::string getIdString() const {
78  return "source_IDs_plugin";
79  }
80 private:
81 };
82 } /* namespace SourceXtractor */
83 #endif /* __SEIMPLEMENTATION_PLUGIN_SOURCEIDS_SOURCEIDSPLUGIN_H_ */
virtual OutputRegistry & getOutputRegistry() const =0
STL class.
virtual ~SourceIDsPlugin()=default
Destructor.
This interface is given to the plugin to let it access object instances from the framework.
Definition: PluginAPI.h:39
virtual std::string getIdString() const
Plugins must implement this interface.
Definition: Plugin.h:38
virtual void registerPlugin(PluginAPI &plugin_api)
void enableOutput(std::string alias_name)
virtual TaskFactoryRegistry & getTaskFactoryRegistry() const =0
void registerColumnConverter(std::string column_name, ColumnConverter< PropertyType, OutType > converter, std::string column_unit="", std::string column_description="")