00001
00002 #ifndef _Q_COPROJECTER_HH_
00003 #define _Q_COPROJECTER_HH_
00004
00005 #include <vector>
00006 #include <list>
00007 #include <string>
00008 #include <QCoSelector.hh>
00009
00010 class QCoincidence;
00011
00019 class TEventList;
00020 class QCoincidence;
00021
00022
00023 class QCoProjector
00024 {
00025
00026
00027 public:
00028 QCoProjector ();
00029 virtual ~QCoProjector ();
00030
00031
00032 void SetCoincidences (const std::list<QCoincidence>& coincidences);
00033
00035 const std::list<QCoincidence>& GetCoincidences() const
00036 { return fCoincidences; }
00037
00038
00039
00040 TEventList * GetEventList ();
00041
00042
00043
00044
00045
00046
00047
00048
00049 int ProjectEventBased (std::string arg, TEventList * evList=0);
00050
00051
00052
00053
00054
00055 void ProjectCoBased (std::string arg);
00056
00057
00058
00059 double * GetV1() {return fV1;}
00060 double * GetV2() {return fV2;}
00061 int GetNEvents() {if (fRegenerateEventList) RegenerateEventList(); return fNEvents;}
00062 int GetNCoincidences() {if (fRegenerateEventList) RegenerateEventList(); return fNCoincidences;}
00063
00064 protected:
00065 std::list<QCoincidence> fCoincidences;
00066 QCoSelector fSelector;
00067 TEventList * fEventList;
00068 bool fRegenerateEventList;
00069 int fNEvents;
00070 int fNCoincidences;
00071 double * fV1;
00072 double * fV2;
00073
00074
00075
00076 protected:
00077 void RegenerateEventList();
00078 void CreateArrays();
00079 std::vector<std::string> ScanArg(std::string arg, int &narg);
00080 };
00081
00082 #endif
00083
00084