filter runs from 1..159

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorCalibration@27 113b152e-814d-439b-b186-022a431db7b5
This commit is contained in:
l_cartier 2014-01-29 12:52:21 +00:00
parent 849c5eb190
commit 50acdf5628
2 changed files with 9 additions and 1 deletions

View File

@ -53,7 +53,7 @@ Loops over data file to find single photons, fills the tree (and writes it to fi
*/
THStack *moenchReadData(char *fformat, char *tit, int runmin, int runmax, int nbins=1500, int hmin=-500, int hmax=1000, int sign=1, double hc=0, int xmin=0, int xmax=NC, int ymin=0, int ymax=NR, int cmsub=0, int hitfinder=1) {
THStack *moenchReadData(char *fformat, char *tit, int runmin, int runmax, int nbins=1500, int hmin=-500, int hmax=1000, int sign=1, double hc=0, int xmin=1, int xmax=NC-1, int ymin=1, int ymax=NR-1, int cmsub=0, int hitfinder=1) {
moench02ModuleData *decoder=new moench02ModuleData(hc);
moenchCommonMode *cmSub=NULL;

View File

@ -12,10 +12,13 @@ typedef struct task_s{
} Task;
void *moenchMakeTreeTask(void *p){
TThread::Lock();
char fname[1000];
Task *t = (Task *)p;
sprintf(fname,"%s%s_%i.root",t->tdir,t->tname,t->treeIndex);
TFile *f = new TFile(fname,"RECREATE");
cout << "Call moenchReadData(" << t->fformat << "," << t->tname << "," << t->runmin<< "," << t->runmax <<")" << endl;
TThread::UnLock();
moenchReadData(t->fformat,t->tname,t->runmin,t->runmax);
f->Close();
return 0;
@ -38,6 +41,11 @@ void moenchReadDataMT(char *fformat, char *tit, char *tdir, int runmin, int runo
threads[i] = new TThread(threadName, moenchMakeTreeTask, t);
threads[i]->Run();
}
for(int i = 0; i < nThreads; i++){
threads[i]->Join();
}
}