00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #include <fstream>
00013 #include "AlephExManager.h"
00014 #include "AlephCollection.h"
00015 #include <vector>
00016 #include "AlToolBox.h"
00017 #include "AlBjet.h"
00018 #include "AlephRegisteredAction.h"
00019
00020 extern ofstream fout;
00021
00023
00025
00026 class testclass:public AlephAbstractInteractiveFunction
00027 {
00028 public:
00029 testclass(AlephInteractiveHandler *ptr):AlephAbstractInteractiveFunction(ptr) {}
00030 virtual string Name() {return "test";}
00031 virtual int Code() {return 555;}
00032 virtual void Run(vector<float>& options,AlphaBanks& EventInfo)
00033 {
00034
00035 vector<float> output;
00036 output.push_back(2);
00037 output.push_back(1);
00038 output.push_back(3);
00039 output.push_back(0);
00040 output.push_back(0);
00041 output.push_back(0);
00042 SendMessage(Code(),output,"Dummy test routine");
00043 output.clear();
00044 output.push_back(1);
00045 output.push_back(2);
00046 output.push_back(10);
00047 output.push_back(0);
00048 output.push_back(10);
00049 output.push_back(0);
00050 output.push_back(1);
00051 SendMessage(Code(),output,"Dummy test routine");
00052 output.clear();
00053 output.push_back(0);
00054 output.push_back(4);
00055 output.push_back(0.5);
00056 output.push_back(0);
00057 output.push_back(0);
00058 output.push_back(5);
00059 SendMessage(Code(),output,"Dummy test routine");
00060 }
00061 virtual vector<pair<string,float> > OptionsList()
00062 {
00063 vector<pair<string,float> > output ;
00064 pair<string,float> mypair;
00065 mypair.first = "option 1";
00066 mypair.second = 10;
00067 output.push_back(mypair);
00068 mypair.first = "dummy 2";
00069 mypair.second = 3.1415;
00070 output.push_back(mypair);
00071 return output;
00072 }
00073 };
00074
00075 void AlephExManager::UserInit()
00076 {
00077 AlephRegisteredAction<testclass> mytestclass;
00078 }
00079
00082
00084
00086
00087 {
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097 int event = EventInfo.Event().number();
00098 int run = EventInfo.Run().number();
00099 cout << run << " " << event << endl;
00100 AlephCollection<AlElec *> theElecs=EventInfo.ElecPV();
00101 cout << theElecs.size() << " Elecs" << endl;
00102 for(AlephCollection<AlElec *>::iterator imu = theElecs.begin(); imu< theElecs.end(); imu++)
00103 {
00104 if(((*imu)->getTrack())&&((*imu)->getEflw()))
00105 cout << (*imu)->getTrack()->QE() << " " << (*imu)->getEflw()->QE() << endl;
00106 }
00107 if(
00108 (run==53425)&&(event==10379)||
00109 (run==53332)&&(event==6362)||
00110 (run==53363)&&(event==6147)||
00111 (run==53516)&&(event==2587)||
00112 (run==53580)&&(event==10463)||
00113 (run==53868)&&(event==1300)||
00114 (run==54139)&&(event==3979)||
00115 (run==55150)&&(event==969)||
00116 (run==54327)&&(event==13331)||
00117 (run==54338)&&(event==12836)||
00118 (run==54430)&&(event==323)||
00119 (run==54592)&&(event==2777)||
00120 (run==54601)&&(event==4097)||
00121 (run==54902)&&(event==1630)||
00122 (run==55037)&&(event==6674)||
00123 (run==54960)&&(event==1696)||
00124 (run==55147)&&(event==2496)||
00125 (run==55360)&&(event==7000)||
00126 (run==55365)&&(event==10685)||
00127 (run==55447)&&(event==5085)||
00128 (run==55488)&&(event==4)||
00129 (run==55589)&&(event==1971)||
00130 (run==55597)&&(event==957)||
00131 (run==55713)&&(event==5654)||
00132 (run==56331)&&(event==3701)
00133 ) {
00134 return true;
00135 }
00136
00137 return false;
00138 }
00139
00142
00144
00146