/********************* * Code for standalone running to get a handle on the rates in the CDC and FDC * * * Author M. Staib October 2014 **********************/ int VERBOSE = 0; #include #include "DTranslationTable.h" #include "VMEUtilities.h" #include "ROOTMaker.h" #include "TROOT.h" #include "TGApplication.h" #include "TestBenchGUI.h" // A few globals #include "Riostream.h" extern char DETECTOR[128]; extern int HOSTROC; int TTROCID; unsigned long int EventCounter = 0; extern unsigned int NAboveThreshold[20][72]; void GetTTROCID(); int main(int argc, char *argv[]){ /* if (!TROOT::Initialized()) { static TROOT root("RooTuple", "I am the Gatekeeper"); } */ TApplication theApp("App",&argc,argv); for (int k=0;kGetRoot()); // The Translation table DTranslationTable * tt = new DTranslationTable(); GetTTROCID(); theApp.SetReturnFromRun(true); theApp.Run(); return 1; } void GetTTROCID(){ // We need to translate from the regular ROCID to the one used in the TT // These are from the wiki cout << "DETECTOR = " << DETECTOR << " HOSTROC " << HOSTROC << endl; switch (DETECTOR[0]){ case 'c': cout << "CDC " << endl; switch (HOSTROC){ case 1: TTROCID = 25; break; case 2: TTROCID = 26; break; case 3: TTROCID = 27; break; case 4: TTROCID = 28; break; default: TTROCID = 0; break; } break; case 'f': // FDC switch (HOSTROC){ case 2: TTROCID = 52; break; case 3: TTROCID = 53; break; case 5: TTROCID = 55; break; case 6: TTROCID = 56; break; case 7: TTROCID = 57; break; case 8: TTROCID = 58; break; case 9: TTROCID = 59; break; case 10: TTROCID = 60; break; case 11: TTROCID = 61; break; case 12: TTROCID = 62; break; default: TTROCID = 0; break; } break; default: TTROCID=0; break; } }