--- DarthVader/RunInfo/src/RunInfo.cpp 2006/07/18 10:58:52 1.5 +++ DarthVader/RunInfo/src/RunInfo.cpp 2006/08/04 10:31:30 1.7 @@ -30,6 +30,21 @@ S4_ver = ""; } +/** + * Fills a struct cSoftInfo with values from a SoftInfo object (to put data into a F77 common). + */ +void SoftInfo::GetLevel2Struct(cSoftInfo *l2) const{ + l2->FillTrigWith(TRIG_ver); + l2->FillTofWith(TOF_ver); + l2->FillAcWith(AC_ver); + l2->FillTrkWith(TRK_ver); + l2->FillOrbWith(ORB_ver); + l2->FillCalWith(CAL_ver); + l2->FillNdWith(ND_ver); + l2->FillS4With(S4_ver); +} +/***********************/ + ItoRunInfo::ItoRunInfo() { reprocessing = false; updating = false; @@ -48,8 +63,10 @@ version->S4_ver = ""; version->ORB_ver = ""; norun = 0; - runlist = new TArrayL(0,NULL); - file = new TFile(); + // runlist = new TArrayL(0,NULL); + runlist = new TArrayL(500); + // file = new TFile(); + file = NULL;//new TFile(); newtree = new TTree(); } @@ -77,6 +94,7 @@ version->S4_ver = ""; norun = 0; totnorun = 0; + runlist = new TArrayL(500); // runlist = new TArrayL(0,NULL); // } @@ -103,7 +121,8 @@ version->S4_ver = ""; norun = 0; totnorun = 0; - runlist = new TArrayL(0,NULL); + // runlist = new TArrayL(0,NULL); + runlist = new TArrayL(500); // } @@ -151,7 +170,7 @@ version->S4_ver = ""; // norun = 0; - runlist = new TArrayL(0,NULL); + // runlist = new TArrayL(0,NULL); //runlist->Reset(); // Bool_t found = false; @@ -250,7 +269,7 @@ return(-805); }; // - runlist = new TArrayL(1); + // runlist = new TArrayL(1); // error = Query_GL_RUN(idRun, dbc); // @@ -322,7 +341,11 @@ // totnorun = oldtree->GetEntries(); // - runlist = new TArrayL((Int_t)totnorun); + if ( totnorun > 500 ){ + if ( debug ) printf("\n RUNINFO - ERROR: can not handle more than 500 runs!\n"); + return(-806); + }; + // runlist = new TArrayL((Int_t)totnorun); // found = false; // @@ -546,7 +569,11 @@ // totnorun = newtree->GetEntries(); // - runlist = new TArrayL((Int_t)totnorun); + if ( totnorun > 500 ){ + if ( debug ) printf("\n RUNINFO - ERROR: can not handle more than 500 runs!\n"); + return(-806); + }; + // runlist = new TArrayL((Int_t)totnorun); // first_file_entry = 0; // @@ -604,7 +631,9 @@ last_file_entry = 0; file_entries = 0ULL; norun = 0; - runlist = new TArrayL(0,NULL); + // runlist = new TArrayL(0,NULL); + delete runlist; + //if ( file ) delete file; file = new TFile(); if ( isreadonly ) newtree->Delete(); }