00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef RECOSWITCH_H
00019 #define RECOSWITCH_H
00020
00021 #include "step.h"
00022
00023
00024 class RecoSwitch : public RecoStep {
00025
00026
00027 STD_string label() const {return "switch";}
00028 STD_string description() const {return "Branch off different flows through reconstruction pipeline";}
00029 bool process(RecoData& rd, RecoController& controller);
00030 RecoCoord input_coord() const {return RecoCoord::any();}
00031 void modify_coord(RecoCoord& coord) const {}
00032 RecoStep* allocate() const {return new RecoSwitch;}
00033 bool pipeline_init(const RecoController& controller, const RecoCoord& input_coord);
00034 bool query(RecoQueryContext& context);
00035 void init();
00036
00037
00038 JDXstring brancharg;
00039
00040
00041 struct BranchKey {
00042
00043
00044 recoDim dim;
00045 unsigned short val;
00046
00047 bool operator < (const BranchKey& bs) const {
00048 if(dim!=bs.dim) return (dim<bs.dim);
00049 return (val<bs.val);
00050 }
00051 };
00052
00053
00054 struct BranchValue {
00055 RecoStep* step;
00056 unsigned short numof[n_recoDims];
00057 };
00058
00059
00060 typedef STD_map<BranchKey,BranchValue> BranchMap;
00061 BranchMap branches;
00062
00063 STD_list<RecoStep*> unconditional;
00064 };
00065
00066
00067 #endif
00068