39 #define USE_DB_METHOD 0
55 containerList(new TList()),
62 versionsChanged(kFALSE),
63 isRootFileOutput(kFALSE),
119 if (fact->
addContext(context)) { found=kTRUE; }
121 Error(
"addParamContext(const char*)",
"Unknown context");
137 Text_t*
name=(
char*)container->GetName();
151 Warning(
"addContainer(FairParSet*)",
"Container %s already exists!",name);
170 if (!c) { Error(
"getContainer(Text_t*)",
"Container %s not created!",name); }
205 if (!run) {
addRun(refId); }
219 }
else { Warning(
"addRun(Int_t,Int_t)",
"Run already exists"); }
227 sprintf(name,
"%i",
id);
259 if (gFile->IsWritable()) {
runs->Write(); }
276 if (strlen(refRunName)>0) {
283 if (!rc) { Error(
"writeContainers()",
"Error in write of containers to output"); }
293 Text_t*
name=(
char*)cont->GetName();
295 if (in1==-1 && in2==-1) {
323 #if (USE_DB_METHOD == 0)
329 Text_t*
c=(
char*)cont->GetName();
342 }
else if (cv==-1) {
return kFALSE; }
356 if (cv<0) {
return kFALSE; }
357 cout<<
"*** "<<c<<
" written to output"<<
'\n';
378 #if (USE_DB_METHOD > 0)
381 std::cout <<
"\n\t+++++++<DEBUG> Using modified code.+++++++\n";
385 Text_t*
c = (
char*)cont->GetName();
417 std::cout <<
"<DEBUG> Write TSQL here cv = "<< cv <<
"_ <++++++>\n";
429 cout <<
"*** " << c <<
" written to output" <<
'\n';
434 Error(
"writeContainer()",
"Unknown output file type.");
455 const Text_t* fileName)
462 if (!run) { run=
addRun(runId,refId); }
477 cout<<
"***********************************************************"<<endl;
478 cout<<
"********************* W A R N I N G *********************"<<endl;
479 cout<<
"********************* no output ! *********************"<<endl;
480 cout<<
"***********************************************************"<<endl;
498 Int_t len=strlen(refRunName);
510 cout<<
'\n'<<
"*************************************************************"<<
'\n';
512 cout<<
" initialisation for run id "<<
currentRun->GetName();
517 if (len>0) { cout <<
" --> " << refRunName; }
518 cout<<
'\n'<<
"*************************************************************"<<
'\n';
522 if (!rc) { Error(
"initContainers()",
"Error occured during initialization"); }
550 }
else { Error(
"setInputVersion",
"Container not found"); }
551 }
else { Error(
"setInputVersion",
"Run not found"); }
568 }
else { Error(
"setRootOutputVersion",
"Container not found"); }
569 }
else { Error(
"setRootOutputVersion",
"Run not found"); }
577 cout<<
"--------------------------------------------------------------------------------\n";
578 cout<<
"-------------- actual containers in runtime database -------------------------\n";
581 cout.setf(ios::left,ios::adjustfield);
583 cout<<setw(45)<<cont->GetName()<<
" "<<cont->GetTitle()<<
'\n';
587 cout<<
"-------------- runs, versions ------------------------------------------------\n";
589 cout<<
" "<<setw(45)<<
"container";
590 cout.setf(ios::right,ios::adjustfield);
591 cout<<setw(11)<<
"1st-inp"
592 <<setw(11)<<
" 2nd-inp"
593 <<setw(11)<<
" output\n";
597 cout<<
"-------------- input/output --------------------------------------------------\n";
599 cout<<
"first Input:\n";
601 }
else { cout<<
"first input: none"<<
'\n'; }
603 cout<<
"second Input:\n";
605 }
else { cout<<
"second input: none"<<
'\n'; }
609 }
else { cout<<
"output: none"<<
'\n'; }
652 if (inp1->
check()==kTRUE) {
657 }
else { Error(
"setFirstInput(FairParIo*)",
"no connection to input"); }
665 if (inp2->
check()==kTRUE) {
670 }
else { Error(
"setSecondInput(FairParIo*)",
"no connection to input"); }
674 #if (USE_DB_METHOD == 0)
681 if (strcmp(
output->IsA()->GetName(),
"FairParRootFileIo")==0) {
685 }
else { Error(
"setOutput(FairParIo*)",
"no connection to output"); }
690 #if (USE_DB_METHOD > 0)
697 if (strcmp(
output->IsA()->GetName(),
"FairParRootFileIo") == 0) {
699 }
else if (strcmp(
output->IsA()->GetName(),
"FairParTSQLIo") == 0) {
705 }
else { Error(
"setOutput(FairParIo*)",
"no connection to output"); }
756 if (!rc) { Error(
"saveOutput()",
"Error occured during write"); }
774 const char* ioName=io->IsA()->GetName();
777 if (strcmp(ioName,
"FairParRootFileIo")==0) {
781 }
else if (strcmp(ioName,
"FairParAsciiFileIo")==0) {
785 }
else if(strcmp(ioName,
"FairParTSQLIo") == 0) {
786 std::cout <<
"\n\n\n\t TSQL versie is called en nu de rest \n\n";