Updates on ALPHA Alpha Meeting 14 9 99

  • Slides: 13
Download presentation
Updates on ALPHA++ Alpha++ Meeting, 14. 9. 99 Agenda: G. Dissertori : The Driver

Updates on ALPHA++ Alpha++ Meeting, 14. 9. 99 Agenda: G. Dissertori : The Driver Part n M. Hörndl : The Analysis Part n

The Driver for the ALPHA++ Analysis Program Günther Dissertori

The Driver for the ALPHA++ Analysis Program Günther Dissertori

Situation n Versions being worked with – Objectivity 5. 1 (on OSF 1) –

Situation n Versions being worked with – Objectivity 5. 1 (on OSF 1) – Object. Space 2. 1 (idem) n What we had up to now – only a single program file (with a single application class, to be edited by the user for his requirements) – driven by command line input and ALPHA cards 14/9/99 G. Dissertori 3

Motivation and Requirements for a Driver n A setup which allows for easy switching

Motivation and Requirements for a Driver n A setup which allows for easy switching – – – n between READ or WRITE transaction BATCH and INTERACTIVE work different DATABASE TYPES functionality should resemble the one from ALPHA – e. g. the user can edit his init, run and term routines n n the interactive mode might allow easy interfacing with DALI everything should be cards and/or terminal driven 14/9/99 G. Dissertori 4

14/9/99 G. Dissertori 5

14/9/99 G. Dissertori 5

Working with Singletons n Aleph. Session and the Managers are Singletons – can be

Working with Singletons n Aleph. Session and the Managers are Singletons – can be created only once – are accessible from everywhere a la Aleph. Session the. Session = Aleph. Session: : The. Aleph. Session(); – preferably managers are accessed via the session: Aleph. Manager the. Db. Manager = Aleph. Session: : The. Aleph. Session()>a. Aleph. Manager(“Db. Manager”); 14/9/99 G. Dissertori 6

The Cards : A simple ASCII file 14/9/99 G. Dissertori 7

The Cards : A simple ASCII file 14/9/99 G. Dissertori 7

The main program int main(int argc, char *argv[]) { // set the input defaults

The main program int main(int argc, char *argv[]) { // set the input defaults int debuglevel = 0; // read the input if (argc < 2) { usage(argv[0]); } else { for (int i=1; i<argc; i++) { if (argv[i][0]=='-' && argv[i][1]=='l') { switch(argv[i][2]) { case '0': debuglevel = 0; break; ……. } } 14/9/99 // create the session singleton Aleph. Session* a. Session = Aleph. Session: : The. Aleph. Session(); // store the debuglevel a. Session->set. Debug. Level(debuglevel); // init Aleph. RC rc; rc = a. Session->initialize(); fout << endl << " return code from session. init = " << rc << endl; // run the session rc = a. Session->run(); fout << endl << " return code from session. run = " << rc << endl; // term rc = a. Session->terminate(); fout << endl << " return code from session. term = " << rc << endl; return Aleph. OK; } G. Dissertori 8

Example : initialize Aleph. RC Aleph. Session: : initialize() { Aleph. RC rc; //

Example : initialize Aleph. RC Aleph. Session: : initialize() { Aleph. RC rc; // start the timer start. Timer(); // print out some stuff ……. . . // create and init the various managers // the IO manager _the. Aleph. Io. Manager = Aleph. Io. Manager: : The. Aleph. Io. Manager(); rc = _the. Aleph. Io. Manager->initialize(); // the DB manager _the. Aleph. Db. Manager = Aleph. Db. Manager: : The. Aleph. Db. Manager(); rc = _the. Aleph. Db. Manager->initialize(); // the Ex manager _the. Aleph. Ex. Manager = Aleph. Ex. Manager: : The. Aleph. Ex. Manager(); rc = _the. Aleph. Ex. Manager->initialize(); return rc; } 14/9/99 G. Dissertori 9

User routines are methods of the Execution manager. . . //////////////////////////////////// // User Init

User routines are methods of the Execution manager. . . //////////////////////////////////// // User Init //////////////////////////////////// void Aleph. Ex. Manager: : User. Init() { fout << endl << " =====> in User. Init " << endl; An example for a user file user_void. cpp 14/9/99 } //////////////////////////////////// // User Event //////////////////////////////////// void Aleph. Ex. Manager: : User. Event(Alpha. Banks& bb) { fout << endl << " =====> in User. Event " << endl; } //////////////////////////////////// // User Term //////////////////////////////////// void Aleph. Ex. Manager: : User. Term() { fout << endl << " =====> in User. Term " << endl; } G. Dissertori 10

And this is the output. . . ************************* * * * ALEPHSESSION * *

And this is the output. . . ************************* * * * ALEPHSESSION * * Version 1. 0 * * The session has been initialized at: * * Thu Sep 9 18: 16: 17 1999 * ************************** Nev, Irun, Ievt = 200 410 205 Ngood = 149 =====> in User. Event 200 *** 200 Events have been read ==== Aleph. Cards. Reader : ===== Cardsfile = alpha++. input Aleph. Objy. Db. Manager : stopping the current transaction NEVT 200 ****** Aleph. Objy. Ex. Manager: : loop. All. Read : transaction stopped ****** FILI mc 94_1 CLAS 16 HIST test. hbook return code from session. run = 1 DBTY objy Aleph. Io. Manager : terminating. . . . Aleph. Objy. Db. Manager. stop. Transaction : the transaction is already HALTED Aleph. Objy. Ex. Manager : terminating. . Aleph. Objy. Ex. Manager : calling user term TATY read AFIO testmc. EPIO preparing alpha cards. . . ==== End Aleph. Cards. Reader : =====> in User. Term Aleph. Io. Manager : initializing. . An Aleph. Objy. Db. Manager has been created Aleph. Objy. Db. Manager : initializing. . Aleph. Objy. Db. Manager : The FD Boot file name = shift 50: : /wg/objy/alpha++/dev/db/ALEPHDB Aleph. Objy. Db. Manager : A READ transaction has been started An Aleph. Objy. Ex. Manager has been created Aleph. Objy. Ex. Manager : initializing. . Number of selected events = 149 ************************* * * * ALEPHSESSION * * Version 1. 0 * * The session has terminated at: * * Thu Sep 9 18: 29 1999 * * Elapsed time in seconds = 132. 0000000 * ************************* C bos_initialize CALLED ******* Aleph. Objy. Ex. Manager : calling user init =====> in User. Init return code from session. init = 1 Aleph. Session starts running. . . The session type is BATCH Aleph. Objy. Db. Manager. open. Exist. Db : The database mc 94_1 has been opened for READ ONLY ----------------Run Number = 410 14/9/99 Nev, Irun, Ievt = 1 410 1 Nev, Irun, Ievt = 2 410 2 return code from session. term = 1 G. Dissertori 11

What remains to do - Problems n n Implement the write transaction Implement the

What remains to do - Problems n n Implement the write transaction Implement the interactive session – example: there user can ask for a handle to a database by entering the dbname on the terminal – interface then with Dali n Problems on our database: – several important banks are missing n RLEP, RALE, AJOB, PART , . . ? – Problems when running on MC n n 14/9/99 QELEP=0 , crash when filling MC-truth applied a patch for the moment…. . G. Dissertori 12

So the next plans are n Upgrade of the schema – could be major

So the next plans are n Upgrade of the schema – could be major intervention… n If that happens, implement also naming tree n more detailed performance studies Where can you find all the stuff? /> setenv CVSROOT /afs/cern. ch/aleph/project/alpha++ /> cvs co Applications 14/9/99 G. Dissertori 13