/[PAMELA software]/DarthVader/RunInfo/src/RunInfo.cpp
ViewVC logotype

Diff of /DarthVader/RunInfo/src/RunInfo.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by pam-fi, Fri Jul 21 11:00:13 2006 UTC revision 1.7 by mocchiut, Fri Aug 4 10:31:30 2006 UTC
# Line 63  ItoRunInfo::ItoRunInfo() { Line 63  ItoRunInfo::ItoRunInfo() {
63    version->S4_ver = "";      version->S4_ver = "";  
64    version->ORB_ver = "";      version->ORB_ver = "";  
65    norun = 0;    norun = 0;
66    runlist = new TArrayL(0,NULL);    //  runlist = new TArrayL(0,NULL);
67    file = new TFile();    runlist = new TArrayL(500);
68      //  file = new TFile();
69      file = NULL;//new TFile();
70    newtree = new TTree();    newtree = new TTree();
71  }  }
72    
# Line 92  ItoRunInfo::ItoRunInfo(TFile *processFl) Line 94  ItoRunInfo::ItoRunInfo(TFile *processFl)
94    version->S4_ver = "";      version->S4_ver = "";  
95    norun = 0;    norun = 0;
96    totnorun = 0;    totnorun = 0;
97      runlist = new TArrayL(500);
98    //  runlist = new TArrayL(0,NULL);    //  runlist = new TArrayL(0,NULL);
99    //    //
100  }  }
# Line 118  ItoRunInfo::ItoRunInfo(TSQLServer *db, T Line 121  ItoRunInfo::ItoRunInfo(TSQLServer *db, T
121    version->S4_ver = "";      version->S4_ver = "";  
122    norun = 0;    norun = 0;
123    totnorun = 0;    totnorun = 0;
124    runlist = new TArrayL(0,NULL);    //  runlist = new TArrayL(0,NULL);
125      runlist = new TArrayL(500);
126    //    //
127  }  }
128    
# Line 166  Int_t ItoRunInfo::Update(ULong64_t run, Line 170  Int_t ItoRunInfo::Update(ULong64_t run,
170    version->S4_ver = "";      version->S4_ver = "";  
171    //    //
172    norun = 0;    norun = 0;
173    runlist = new TArrayL(0,NULL);    //  runlist = new TArrayL(0,NULL);
174    //runlist->Reset();    //runlist->Reset();
175    //    //
176    Bool_t found = false;    Bool_t found = false;
# Line 265  Int_t ItoRunInfo::Update(ULong64_t run, Line 269  Int_t ItoRunInfo::Update(ULong64_t run,
269        return(-805);        return(-805);
270      };      };
271      //      //
272      runlist = new TArrayL(1);      //    runlist = new TArrayL(1);
273      //      //
274      error = Query_GL_RUN(idRun, dbc);      error = Query_GL_RUN(idRun, dbc);
275      //      //
# Line 337  Int_t ItoRunInfo::Update(ULong64_t run, Line 341  Int_t ItoRunInfo::Update(ULong64_t run,
341      //      //
342      totnorun = oldtree->GetEntries();      totnorun = oldtree->GetEntries();
343      //      //
344      runlist = new TArrayL((Int_t)totnorun);      if ( totnorun > 500 ){
345          if ( debug ) printf("\n RUNINFO - ERROR: can not handle more than 500 runs!\n");
346          return(-806);
347        };
348        //    runlist = new TArrayL((Int_t)totnorun);
349      //      //
350      found = false;      found = false;
351      //      //
# Line 561  Int_t ItoRunInfo::Read(ULong64_t idRun){ Line 569  Int_t ItoRunInfo::Read(ULong64_t idRun){
569      //      //
570      totnorun = newtree->GetEntries();      totnorun = newtree->GetEntries();
571      //      //
572      runlist = new TArrayL((Int_t)totnorun);      if ( totnorun > 500 ){
573          if ( debug ) printf("\n RUNINFO - ERROR: can not handle more than 500 runs!\n");
574          return(-806);
575        };
576        //    runlist = new TArrayL((Int_t)totnorun);
577      //      //
578      first_file_entry = 0;      first_file_entry = 0;
579      //      //
# Line 619  void ItoRunInfo::Close(){ Line 631  void ItoRunInfo::Close(){
631    last_file_entry = 0;    last_file_entry = 0;
632    file_entries = 0ULL;    file_entries = 0ULL;
633    norun = 0;    norun = 0;
634    runlist = new TArrayL(0,NULL);    //  runlist = new TArrayL(0,NULL);
635      delete runlist;
636      //if ( file ) delete file;
637    file = new TFile();      file = new TFile();  
638    if ( isreadonly ) newtree->Delete();    if ( isreadonly ) newtree->Delete();
639  }  }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.23