@@ -29,92 +29,7 @@ namespace tpc
2929
3030namespace ca
3131{
32- // The CA tracker is now a wrapper to not only the actual tracking on GPU but
33- // also the decoding of the zero-suppressed raw format and the clusterer.
34- enum struct Operation {
35- DecompressTPC, // run cluster decompressor
36- DecompressTPCFromROOT, // the cluster decompressor input is a root object not flat
37- CAClusterer, // run the CA clusterer
38- ZSDecoder, // run the ZS raw data decoder
39- ZSOnTheFly, // use zs on the fly
40- OutputTracks, // publish tracks
41- OutputCAClusters, // publish the clusters produced by CA clusterer
42- OutputCompClusters, // publish CompClusters container
43- OutputCompClustersFlat, // publish CompClusters container
44- OutputQA, // Ship QA histograms to QC
45- OutputSharedClusterMap, // Ship optional shared cluster map
46- ProcessMC, // process MC labels
47- SendClustersPerSector, // Send clusters and clusters mc labels per sector
48- Noop, // skip argument on the constructor
49- };
50-
51- // / Helper struct to pass the individual ca::Operation flags to
52- // / the processor spec. The struct is initialized by a variable list of
53- // / constructor arguments.
5432struct Config {
55- Config (const Config&) = default ;
56- template <typename ... Args>
57- Config (Args&&... args)
58- {
59- init (std::forward<Args>(args)...);
60- }
61-
62- template <typename ... Args>
63- void init (Operation const & op, Args&&... args)
64- {
65- switch (op) {
66- case Operation::DecompressTPC:
67- decompressTPC = true ;
68- break ;
69- case Operation::DecompressTPCFromROOT:
70- decompressTPCFromROOT = true ;
71- break ;
72- case Operation::CAClusterer:
73- caClusterer = true ;
74- break ;
75- case Operation::ZSDecoder:
76- zsDecoder = true ;
77- break ;
78- case Operation::ZSOnTheFly:
79- zsOnTheFly = true ;
80- break ;
81- case Operation::OutputTracks:
82- outputTracks = true ;
83- break ;
84- case Operation::OutputCompClusters:
85- outputCompClusters = true ;
86- break ;
87- case Operation::OutputCompClustersFlat:
88- outputCompClustersFlat = true ;
89- break ;
90- case Operation::OutputCAClusters:
91- outputCAClusters = true ;
92- break ;
93- case Operation::OutputQA:
94- outputQA = true ;
95- break ;
96- case Operation::OutputSharedClusterMap:
97- outputSharedClusterMap = true ;
98- break ;
99- case Operation::ProcessMC:
100- processMC = true ;
101- break ;
102- case Operation::SendClustersPerSector:
103- sendClustersPerSector = true ;
104- break ;
105- case Operation::Noop:
106- break ;
107- default :
108- throw std::runtime_error (" invalid CATracker operation" );
109- }
110- if constexpr (sizeof ...(args) > 0 ) {
111- init (std::forward<Args>(args)...);
112- }
113- }
114-
115- // Cannot specialize constructor to create proper copy constructor directly --> must overload init
116- void init (const Config& x) { *this = x; }
117-
11833 bool decompressTPC = false ;
11934 bool decompressTPCFromROOT = false ;
12035 bool caClusterer = false ;
@@ -129,7 +44,6 @@ struct Config {
12944 bool processMC = false ;
13045 bool sendClustersPerSector = false ;
13146};
132-
13347} // namespace ca
13448
13549// / create a processor spec for the CATracker
0 commit comments