#include <ScanList.h>
Public Member Functions | |
| ScanList () | |
| ~ScanList () | |
| Int_t | GetDecision (Int_t run, Int_t snarl) |
| Bool_t | GetStatus () |
Private Attributes | |
| Int_t | frun |
| Int_t | fsnarl |
| Int_t | fscandecision |
| TFile * | ffile |
| TTree * | ftree |
| Bool_t | fstatus |
|
|
Definition at line 22 of file ScanList.cxx. References ffile, frun, fscandecision, fsnarl, fstatus, and ftree. 00022 {
00023
00024 fstatus=true;
00025
00026 const char* file=getenv("SCAN_LIST");
00027
00028 FILE *fin;
00029
00030 if (file==NULL) {
00031 fstatus=false;
00032 cout << "No SCAN_LIST symlink defined - won't fill scan decisions\n";
00033 }
00034
00035 if (fstatus) {
00036
00037 if ((fin = fopen(file, "r")) == NULL) {
00038 fstatus=false;
00039 cout << "Scan list file not found - won't fill scan decisions\n";
00040 }
00041 }
00042
00043 if (fstatus) {
00044 ffile=new TFile(file,"READ");
00045 if (!ffile) {
00046 fstatus=false;
00047 cout << "Can't read scan list file - won't fill scan decisions\n";
00048 }
00049 }
00050
00051 if (fstatus) {
00052 ftree=(TTree*)ffile->Get("scan");
00053 if (!ftree) {
00054 fstatus=false;
00055 cout << "Can't find scan list tree - won't fill scan decisions\n";
00056 }
00057 else {
00058 ftree->SetBranchAddress("run",&frun);
00059 ftree->SetBranchAddress("snarl",&fsnarl);
00060 ftree->SetBranchAddress("scandecision",&fscandecision);
00061 fstatus=true;
00062 }
00063 }
00064
00065 }
|
|
|
Definition at line 67 of file ScanList.cxx. References ffile.
|
|
||||||||||||
|
Definition at line 71 of file ScanList.cxx. References frun, ftree, and run(). Referenced by MadTestAnalysis::CreatePAN(), MadPIDAnalysis::CreatePAN(), and MadDpAnalysis::CreatePAN(). 00071 {
00072
00073
00074 if (!fstatus) {return -1;}
00075
00076 Int_t numentries=ftree->GetEntries();
00077
00078 Bool_t isfound=false;
00079
00080 Int_t counter=0;
00081
00082 Int_t decision=-1;
00083
00084 while (!isfound && counter<numentries) {
00085
00086 ftree->GetEntry(counter);
00087
00088 if (run==frun && snarl==fsnarl) {
00089 decision=fscandecision;
00090 isfound=true;
00091 }
00092
00093 counter++;
00094
00095 }
00096
00097 return decision;
00098
00099 }
|
|
|
Definition at line 14 of file ScanList.h. 00014 {return fstatus;}
|
|
|
Definition at line 21 of file ScanList.h. Referenced by ScanList(), and ~ScanList(). |
|
|
Definition at line 18 of file ScanList.h. Referenced by GetDecision(), and ScanList(). |
|
|
Definition at line 20 of file ScanList.h. Referenced by ScanList(). |
|
|
Definition at line 19 of file ScanList.h. Referenced by ScanList(). |
|
|
Definition at line 24 of file ScanList.h. Referenced by ScanList(). |
|
|
Definition at line 22 of file ScanList.h. Referenced by GetDecision(), and ScanList(). |
1.3.9.1