Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
evd::RecoDrawingOptions Class Reference

Global drawing options that apply to all displays. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-30/EventDisplayServices/RecoDrawingOptions.h"

Inheritance diagram for evd::RecoDrawingOptions:
evdb::Reconfigurable

Public Member Functions

 RecoDrawingOptions (fhicl::ParameterSet const &pset, art::ActivityRegistry &reg)
 
 ~RecoDrawingOptions ()
 
void reconfigure (fhicl::ParameterSet const &pset) override
 
void do_reconfigure (fhicl::ParameterSet const &pset)
 

Public Attributes

int fClusterStyle
 
int fProngOpt
 
int fTrackOpt
 
int fVertexOpt
 
int fOfflineChanOpt
 
int fShowerOpt
 
int fHoughOpt
 
std::vector< std::stringfCellHitModules
 Module labels for CellHits. More...
 
std::vector< std::stringfCellHitInstances
 productInstance labels for CellHits More...
 
std::vector< std::stringfClusterModules
 Module labels for Clusters. More...
 
std::vector< std::stringfClusterInstances
 productInstance labels for Clusters More...
 
std::vector< std::stringfOfflineChanModules
 Module labels for OfflineChans. More...
 
std::vector< std::stringfOfflineChanInstances
 productInstance labels for OfflineChans More...
 
std::vector< std::stringfHoughResultModules
 Module labels for HoughResults. More...
 
std::vector< std::stringfHoughResultInstances
 productInstance labels for HoughResults More...
 
std::vector< std::stringfVertexModules
 Module labels for Vertices. More...
 
std::vector< std::stringfVertexInstances
 productInstance labels for Vertexes More...
 
std::vector< std::stringfProngModules
 Module labels for Prongs. More...
 
std::vector< std::stringfProngInstances
 productInstance labels for Prongs More...
 
std::vector< std::stringfTrackModules
 Module labels for Tracks. More...
 
std::vector< std::stringfTrackInstances
 productInstance labels for Tracks More...
 
std::vector< std::stringfShowerModules
 Module labels for Showers. More...
 
std::vector< std::stringfShowerInstances
 productInstance labels for Showers More...
 
std::vector< std::vector< int > > fClusterIndex
 
std::vector< std::vector< int > > fTrackIndex
 
std::vector< std::vector< int > > fVertexIndex
 
std::vector< std::vector< int > > fProngIndex
 

Static Public Attributes

static const int kCLUSTERS_AS_BOXES = 1<<0
 
static const int kCLUSTERS_AS_MARKERS = 1<<1
 
static const int kCLUSTERS_AS_HULLS = 1<<2
 
static const int kAS_CLUSTER = 1<<0
 
static const int kAS_PRONG = 1<<1
 
static const int kAS_TRACK = 1<<2
 
static const int kORTHO_HITS = 1<<3
 
static const int kOFF = 0
 
static const int kON = 1
 
static const int kHOUGH_COLORS = 2
 

Protected Member Functions

void ParseModuleInstanceString (std::string &mod, std::string &inst) const
 Parse apart a "module_instance" string. More...
 
void ModuleList (fhicl::ParameterSet const &pset, std::vector< std::string > &modules, std::vector< std::string > &instances, const char *object)
 

Detailed Description

Global drawing options that apply to all displays.

Definition at line 22 of file RecoDrawingOptions.h.

Constructor & Destructor Documentation

evd::RecoDrawingOptions::RecoDrawingOptions ( fhicl::ParameterSet const &  pset,
art::ActivityRegistry reg 
)
explicit

Definition at line 11 of file RecoDrawingOptions_service.cc.

References reconfigure().

13  : evdb::Reconfigurable{pset}
14  {
15  this->reconfigure(pset);
16  }
void reconfigure(fhicl::ParameterSet const &pset) override
evd::RecoDrawingOptions::~RecoDrawingOptions ( )

Definition at line 19 of file RecoDrawingOptions_service.cc.

20  {
21  }

Member Function Documentation

void evdb::Reconfigurable::do_reconfigure ( fhicl::ParameterSet const &  pset)
inlineinherited

Definition at line 17 of file Reconfigurable.h.

17 { reconfigure(pset); }
virtual void reconfigure(fhicl::ParameterSet const &)=0
void evd::RecoDrawingOptions::ModuleList ( fhicl::ParameterSet const &  pset,
std::vector< std::string > &  modules,
std::vector< std::string > &  instances,
const char *  object 
)
protected

Definition at line 30 of file RecoDrawingOptions_service.cc.

References genie::units::A, a, b, fhicl::ParameterSet::get(), MECModelEnuComparisons::i, evd::is_empty(), ParseModuleInstanceString(), and string.

Referenced by reconfigure().

34  {
35  unsigned int i;
36 
37  std::string A(object);
38  std::string B(object);
39 
40  A += ".val";
41  B += "Add.val";
42 
43  std::vector<std::string> a=pset.get<std::vector<std::string> >(A.c_str());
44  std::vector<std::string> b=pset.get<std::vector<std::string> >(B.c_str());
45 
46  modules.clear();
47  modules.insert(modules.end(), a.begin(), a.end());
48  modules.insert(modules.end(), b.begin(), b.end());
49 
50  auto newEnd = std::remove_if(modules.begin(), modules.end(), is_empty);
51  modules.erase(newEnd, modules.end());
52 
53  instances.resize(modules.size());
54  for(i=0; i<modules.size(); ++i) {
55  ParseModuleInstanceString(modules[i], instances[i]);
56  }
57  }
void ParseModuleInstanceString(std::string &mod, std::string &inst) const
Parse apart a "module_instance" string.
static bool is_empty(const std::string &s)
const double a
static const double A
Definition: Units.h:82
const hit & b
Definition: hits.cxx:21
enum BeamMode string
void evd::RecoDrawingOptions::ParseModuleInstanceString ( std::string mod,
std::string inst 
) const
protected

Parse apart a "module_instance" string.

Input the joined string as mod. If there is no underscore, mod is unaltered and inst is set to the empty string (""). If there is an underscore, mod is set to the part before the underscore, and inst to the part after.

Definition at line 86 of file RecoDrawingOptions_service.cc.

References DEFINE_ART_SERVICE.

Referenced by ModuleList().

88  {
89  const size_t splitPos = mod.find_first_of('_');
90  if(splitPos == std::string::npos){
91  inst = "";
92  return;
93  }
94  inst = mod.substr(splitPos+1);
95  mod.resize(splitPos);
96  }
void evd::RecoDrawingOptions::reconfigure ( fhicl::ParameterSet const &  pset)
overridevirtual

Implements evdb::Reconfigurable.

Definition at line 60 of file RecoDrawingOptions_service.cc.

References fCellHitInstances, fCellHitModules, fClusterIndex, fClusterInstances, fClusterModules, fClusterStyle, fHoughOpt, fHoughResultInstances, fHoughResultModules, fOfflineChanInstances, fOfflineChanModules, fOfflineChanOpt, fProngIndex, fProngInstances, fProngModules, fProngOpt, fShowerInstances, fShowerModules, fShowerOpt, fTrackIndex, fTrackInstances, fTrackModules, fTrackOpt, fVertexIndex, fVertexInstances, fVertexModules, fVertexOpt, fhicl::ParameterSet::get(), and ModuleList().

Referenced by RecoDrawingOptions().

61  {
62  fClusterStyle = pset.get<int>("ClusterStyle.val");
63  fProngOpt = pset.get<int>("ProngOpt.val");
64  fTrackOpt = pset.get<int>("TrackOpt.val");
65  fVertexOpt = pset.get<int>("VertexOpt.val");
66  fOfflineChanOpt = pset.get<int>("OfflineChanOpt.val");
67  fShowerOpt = pset.get<int>("ShowerOpt.val");
68  fHoughOpt = pset.get<int>("HoughOpt.val");
69 
70  fClusterIndex = pset.get< std::vector< std::vector<int> > >("ClusterIndex.val");
71  fTrackIndex = pset.get< std::vector< std::vector<int> > >("TrackIndex.val");
72  fVertexIndex = pset.get< std::vector< std::vector<int> > >("VertexIndex.val");
73  fProngIndex = pset.get< std::vector< std::vector<int> > >("ProngIndex.val");
74 
75  this->ModuleList(pset, fCellHitModules, fCellHitInstances, "CellHits");
77  this->ModuleList(pset, fClusterModules, fClusterInstances, "Clusters");
78  this->ModuleList(pset, fProngModules, fProngInstances, "Prongs");
79  this->ModuleList(pset, fVertexModules, fVertexInstances, "Vertices");
80  this->ModuleList(pset, fTrackModules, fTrackInstances, "Tracks");
81  this->ModuleList(pset, fShowerModules, fShowerInstances, "Showers");
82  this->ModuleList(pset, fOfflineChanModules, fOfflineChanInstances, "OfflineChans");
83  }
void ModuleList(fhicl::ParameterSet const &pset, std::vector< std::string > &modules, std::vector< std::string > &instances, const char *object)
std::vector< std::string > fClusterModules
Module labels for Clusters.
std::vector< std::string > fVertexInstances
productInstance labels for Vertexes
std::vector< std::string > fCellHitModules
Module labels for CellHits.
std::vector< std::string > fShowerInstances
productInstance labels for Showers
std::vector< std::string > fShowerModules
Module labels for Showers.
std::vector< std::string > fVertexModules
Module labels for Vertices.
std::vector< std::string > fClusterInstances
productInstance labels for Clusters
std::vector< std::string > fHoughResultModules
Module labels for HoughResults.
std::vector< std::string > fTrackModules
Module labels for Tracks.
std::vector< std::string > fCellHitInstances
productInstance labels for CellHits
std::vector< std::string > fOfflineChanInstances
productInstance labels for OfflineChans
std::vector< std::string > fProngInstances
productInstance labels for Prongs
std::vector< std::vector< int > > fClusterIndex
std::vector< std::string > fProngModules
Module labels for Prongs.
std::vector< std::string > fOfflineChanModules
Module labels for OfflineChans.
std::vector< std::vector< int > > fVertexIndex
std::vector< std::string > fTrackInstances
productInstance labels for Tracks
std::vector< std::vector< int > > fTrackIndex
std::vector< std::string > fHoughResultInstances
productInstance labels for HoughResults
std::vector< std::vector< int > > fProngIndex

Member Data Documentation

std::vector<std::string> evd::RecoDrawingOptions::fCellHitInstances

productInstance labels for CellHits

Definition at line 56 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::CellHit2D(), evd::RecoBaseDrawer::CellHit3D(), evd::RecoBaseDrawer::FillTQHisto(), and reconfigure().

std::vector<std::string> evd::RecoDrawingOptions::fCellHitModules
std::vector<std::vector<int> > evd::RecoDrawingOptions::fClusterIndex

Definition at line 79 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::Cluster2D(), and reconfigure().

std::vector<std::string> evd::RecoDrawingOptions::fClusterInstances

productInstance labels for Clusters

Definition at line 59 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::Cluster2D(), and reconfigure().

std::vector<std::string> evd::RecoDrawingOptions::fClusterModules

Module labels for Clusters.

Definition at line 58 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::Cluster2D(), evd::RecoBaseDrawer::Prong3D(), reconfigure(), and evd::RecoBaseDrawer::Track2D().

int evd::RecoDrawingOptions::fClusterStyle
int evd::RecoDrawingOptions::fHoughOpt
std::vector<std::string> evd::RecoDrawingOptions::fHoughResultInstances

productInstance labels for HoughResults

Definition at line 65 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::HoughResult2D(), and reconfigure().

std::vector<std::string> evd::RecoDrawingOptions::fHoughResultModules

Module labels for HoughResults.

Definition at line 64 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::HoughResult2D(), and reconfigure().

std::vector<std::string> evd::RecoDrawingOptions::fOfflineChanInstances

productInstance labels for OfflineChans

Definition at line 62 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::OfflineChans2D(), and reconfigure().

std::vector<std::string> evd::RecoDrawingOptions::fOfflineChanModules

Module labels for OfflineChans.

Definition at line 61 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::OfflineChans2D(), and reconfigure().

int evd::RecoDrawingOptions::fOfflineChanOpt

Definition at line 47 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::OfflineChans2D(), and reconfigure().

std::vector<std::vector<int> > evd::RecoDrawingOptions::fProngIndex
std::vector<std::string> evd::RecoDrawingOptions::fProngInstances

productInstance labels for Prongs

Definition at line 71 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::Prong2D(), evd::RecoBaseDrawer::Prong3D(), and reconfigure().

std::vector<std::string> evd::RecoDrawingOptions::fProngModules

Module labels for Prongs.

Definition at line 70 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::Prong2D(), evd::RecoBaseDrawer::Prong3D(), and reconfigure().

int evd::RecoDrawingOptions::fProngOpt
std::vector<std::string> evd::RecoDrawingOptions::fShowerInstances

productInstance labels for Showers

Definition at line 77 of file RecoDrawingOptions.h.

Referenced by reconfigure().

std::vector<std::string> evd::RecoDrawingOptions::fShowerModules

Module labels for Showers.

Definition at line 76 of file RecoDrawingOptions.h.

Referenced by reconfigure().

int evd::RecoDrawingOptions::fShowerOpt
std::vector<std::vector<int> > evd::RecoDrawingOptions::fTrackIndex
std::vector<std::string> evd::RecoDrawingOptions::fTrackInstances

productInstance labels for Tracks

Definition at line 74 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::Prong3D(), reconfigure(), and evd::RecoBaseDrawer::Track2D().

std::vector<std::string> evd::RecoDrawingOptions::fTrackModules

Module labels for Tracks.

Definition at line 73 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::Prong3D(), reconfigure(), and evd::RecoBaseDrawer::Track2D().

int evd::RecoDrawingOptions::fTrackOpt
std::vector<std::vector<int> > evd::RecoDrawingOptions::fVertexIndex

Definition at line 81 of file RecoDrawingOptions.h.

Referenced by reconfigure(), and evd::RecoBaseDrawer::Vertex2D().

std::vector<std::string> evd::RecoDrawingOptions::fVertexInstances

productInstance labels for Vertexes

Definition at line 68 of file RecoDrawingOptions.h.

Referenced by reconfigure(), and evd::RecoBaseDrawer::Vertex2D().

std::vector<std::string> evd::RecoDrawingOptions::fVertexModules

Module labels for Vertices.

Definition at line 67 of file RecoDrawingOptions.h.

Referenced by reconfigure(), and evd::RecoBaseDrawer::Vertex2D().

int evd::RecoDrawingOptions::fVertexOpt

Definition at line 46 of file RecoDrawingOptions.h.

Referenced by reconfigure(), and evd::RecoBaseDrawer::Vertex2D().

const int evd::RecoDrawingOptions::kAS_CLUSTER = 1<<0
static
const int evd::RecoDrawingOptions::kAS_PRONG = 1<<1
static
const int evd::RecoDrawingOptions::kAS_TRACK = 1<<2
static

Definition at line 42 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::Track2D().

const int evd::RecoDrawingOptions::kCLUSTERS_AS_BOXES = 1<<0
static

Definition at line 34 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::DrawCluster2D().

const int evd::RecoDrawingOptions::kCLUSTERS_AS_HULLS = 1<<2
static

Definition at line 36 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::DrawCluster2D().

const int evd::RecoDrawingOptions::kCLUSTERS_AS_MARKERS = 1<<1
static

Definition at line 35 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::DrawCluster2D().

const int evd::RecoDrawingOptions::kHOUGH_COLORS = 2
static

Definition at line 53 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::DrawHoughResults2D().

const int evd::RecoDrawingOptions::kOFF = 0
static
const int evd::RecoDrawingOptions::kON = 1
static

Definition at line 51 of file RecoDrawingOptions.h.

const int evd::RecoDrawingOptions::kORTHO_HITS = 1<<3
static

Definition at line 44 of file RecoDrawingOptions.h.

Referenced by evd::RecoBaseDrawer::DrawTrack2D().


The documentation for this class was generated from the following files: