3 #include "htrbnetdef.h"
20 #include "hldsource.h"
21 #include "hldfilesource.h"
22 #include "hldgrepfilesource.h"
23 #include "hldremotesource.h"
24 #include "hldstacksource.h"
25 #include "hrootsource.h"
26 #include "hgeantmergesource.h"
56 #include "TObjString.h"
66 void
HDst::setupSpectrometer(TString
beamtime,Int_t mdcsetup[6][4],TString detectors)
75 ::Info(
"setupSpectrometer()",
"\n----------- setting up HADES spectrometer ----------------");
77 if(beamtime.CompareTo(
"may14")==0) beamtime =
"jul14";
78 if(beamtime.CompareTo(
"aug14")==0) beamtime =
"jul14";
80 if (beamtime.CompareTo(
"aug11") ==0);
81 else if(beamtime.CompareTo(
"aug11_3sec")==0);
82 else if(beamtime.CompareTo(
"apr12") ==0);
83 else if(beamtime.CompareTo(
"jul14") ==0);
84 else if(beamtime.CompareTo(
"aug18") ==0);
85 else if(beamtime.CompareTo(
"mar19") ==0);
87 ::Error(
"",
"Beam time = '%s' not supported !",beamtime.Data());
90 ::Info(
"setupSpectrometer()",
"Using %s setup",beamtime.Data());
92 Int_t mdcMods_aug11[6][4]={
100 Int_t mdcMods_aug11_3sec[6][4]={
108 Int_t mdcMods_apr12[6][4]={
119 ::Info(
"",
"setting up MDC modules");
120 if(mdcsetup) ::Info(
"",
"settings will be taken by input array");
121 else ::Info(
"",
"settings will be taken by %s",beamtime.Data());
122 for(Int_t s=0;s<6;s++){
124 for(Int_t m=0;m<4;m++){
125 if(mdcsetup == NULL){
126 if (beamtime.CompareTo(
"aug11") ==0) mdcMods[s][m] = mdcMods_aug11[s][m];
127 else if(beamtime.CompareTo(
"aug11_3sec")==0) mdcMods[s][m] = mdcMods_aug11_3sec[s][m];
128 else if(beamtime.CompareTo(
"apr12") ==0) mdcMods[s][m] = mdcMods_apr12[s][m];
129 else if(beamtime.CompareTo(
"jul14") ==0) mdcMods[s][m] = mdcMods_apr12[s][m];
130 else if(beamtime.CompareTo(
"aug18") ==0) mdcMods[s][m] = mdcMods_apr12[s][m];
131 else if(beamtime.CompareTo(
"mar19") ==0) mdcMods[s][m] = mdcMods_apr12[s][m];
133 ::Error(
"",
"Beam time = %s not supported !",beamtime.Data());
137 mdcMods[s][m] = mdcsetup[s][m];
139 cout<<
" "<<mdcMods[s][m];
146 Int_t tofMods [22] = {1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
147 Int_t rpcMods [1] = {1};
148 Int_t showerMods[3] = {1,2,3};
149 Int_t emcMods [1] = {1};
150 Int_t nStartMods[10] = {1,1,1,1,0,0,0,0,0,0};
151 Int_t nStartModsApr12[10] = {1,1,1,1,1,0,0,0,0,0};
152 Int_t nStartModsJul14[10] = {1,0,0,0,1,0,0,0,0,0};
153 Int_t nStartModsAug18[10] = {1,1,1,1,0,0,0,0,0,0};
154 Int_t nStartModsMar19[10] = {1,1,0,1,0,0,0,0,0,0};
155 Int_t pionTrackerMods[10] = {1,1,1,1,0,0,0,0,0,0};
156 Int_t wallMods [1] = {1};
157 Int_t nTrigMods [1] = {1};
158 Int_t richMods [1] = {1};
162 if(detectors.Contains(
"tbox")){
163 ::Info(
"",
"Adding TBox");
167 if(detectors.Contains(
"start")) {
168 ::Info(
"",
"Adding START");
170 if( beamtime.CompareTo(
"aug11") ==0 ||
171 beamtime.CompareTo(
"aug11_3sec") ==0
174 }
else if (beamtime.CompareTo(
"apr12") ==0) {
176 }
else if (beamtime.CompareTo(
"jul14") ==0) {
178 }
else if (beamtime.CompareTo(
"aug18") ==0) {
180 }
else if (beamtime.CompareTo(
"mar19") ==0) {
185 if(detectors.Contains(
"wall")) {
186 ::Info(
"",
"Adding WALL");
190 if(detectors.Contains(
"piontracker")) {
191 ::Info(
"",
"Adding PionTracker");
203 for (Int_t is=0; is<6; is++) {
219 parsource.ReplaceAll(
" ",
"");
221 ::Info(
"setupParameterSources()",
"\n----------- setting up parameter sources ----------------");
223 Bool_t useOra = kFALSE;
224 Bool_t useAscii = kFALSE;
225 Bool_t useRoot = kFALSE;
227 if(parsource.Contains(
"oracle")) useOra = kTRUE;
228 if(parsource.Contains(
"ascii")) useAscii = kTRUE;
229 if(parsource.Contains(
"root")) useRoot = kTRUE;
232 if(useAscii && asciiParFile ==
"") {
233 ::Error(
"",
"Ascii source selected, but ascii file empty!");
237 if(useRoot && rootParFile ==
"") {
238 ::Error(
"",
"Root source selected, but root file empty!");
241 if(useOra && useRoot && useAscii) {
243 ::Error(
"",
"Root , Ascii and Ora cannot be active at the same time (only 2 of them)!");
247 TObjArray* ar = parsource.Tokenize(
",");
251 Int_t
n = ar->GetEntries();
255 ::Error(
"",
"To many ( > 2) or no param source specified !");
260 for(Int_t i = 0; i <
n; i ++){
261 TString parsrc = ((TObjString*)ar->At(i))->GetString();
262 if(parsrc ==
"ascii"){
264 ::Info(
"",
"Add ASCII as source %i reading from : %s",i+1,asciiParFile.Data());
267 input->
open((Text_t*)asciiParFile.Data(),
"in");
271 else if(parsrc ==
"root"){
273 ::Info(
"",
"Add ROOT as source %i reading from : %s",i+1,rootParFile.Data());
276 input->
open((Text_t*)rootParFile.Data(),
"READ");
280 else if(parsrc ==
"oracle"){
281 #ifdef ORACLE_SUPPORT
282 ::Info(
"",
"Add ORACLE as source %i histdate = %s",i+1,histDate.Data());
287 if(histDate.CompareTo(
"now")==0 || histDate.Contains(
"-")){
288 ora->setHistoryDate(histDate.Data());
290 ora->setParamRelease(histDate.Data());
295 ::Error(
"",
"ORCALE source specified but not supported !");
325 ::Info(
"setDataSource()",
"\n----------- setting up data sources ---------------------");
327 if( sourceType == 0 ){
328 ::Info(
"",
"Add HldFileSource");
330 HldFileSource* source =
new HldFileSource;
331 if(inDir !=
"") source->setDirectory((Text_t*) inDir.Data());
333 if(inFile.Contains(
",")) {
335 if(inFile.Contains(
",")){
336 ar = inFile.Tokenize(
",");
338 for(Int_t i=0;i<ar->GetEntries();i++){
339 TString file = ((TObjString*)ar->At(i))->GetString();
340 ::Info(
"",
"%i : Add file %s",i,file.Data());
341 source->addFile((Text_t*) file.Data(),refId);
348 source->addFile((Text_t*) inFile.Data(),refId);
352 }
else if ( sourceType == 1 ){
353 ::Info(
"",
"Add HldGrepFileSource");
354 Int_t GrepInterval = 5 ;
355 Int_t GrepTimeOffset = 10;
356 Int_t GrepFileOffset = 0;
357 HldGrepFileSource* source =
new HldGrepFileSource(inDir,
"Grep",GrepInterval,refId,GrepTimeOffset,GrepFileOffset);
359 }
else if ( sourceType == 2 ){
360 ::Info(
"",
"Add HldRemoteSource");
361 HldRemoteSource* source =
new HldRemoteSource(eventbuilder.Data());
362 source->setRefId(refId);
364 }
else if ( sourceType == 3 ){
365 ::Info(
"",
"Add HRootSource");
366 HRootSource* source =
new HRootSource();
367 if(inDir !=
"") source->setDirectory((Text_t*) inDir.Data());
369 if(inFile.Contains(
",")) {
371 if(inFile.Contains(
",")){
372 ar = inFile.Tokenize(
",");
374 for(Int_t i=0;i<ar->GetEntries();i++){
375 TString file = ((TObjString*)ar->At(i))->GetString();
376 ::Info(
"",
"%i : Add file %s",i,file.Data());
377 source->addFile((Text_t*) file.Data());
384 source->addFile((Text_t*) inFile.Data());
386 source->setGlobalRefId(refId);
388 }
else if ( sourceType == 4 ){
389 ::Info(
"",
"Add HGeantMergeSource");
390 HGeantMergeSource* source =
new HGeantMergeSource();
391 source->addMultFiles(inFile);
392 source->setGlobalRefId(refId);
394 }
else if( sourceType == 5 ){
395 ::Info(
"",
"Add HldStackSource");
397 HldStackSource* source =
new HldStackSource;
400 ::Error(
"",
"Unknown source type = %i !",sourceType);
415 ::Info(
"setDataSource()",
"\n----------- setting up data sources ---------------------");
417 ::Info(
"",
"Add second DataSource");
419 HRootSource* source =
new HRootSource(kTRUE,kTRUE);
420 if(inDir !=
"") source->setDirectory((Text_t*) inDir.Data());
421 source->addFile((Text_t*) inFile.Data());
422 source->setGlobalRefId(refId);
431 ::Info(
"setupUnpackers()",
"\n----------- setting up unpackers ---------------------");
436 if(beamtime.CompareTo(
"may14")==0) beamtime =
"jul14";
437 if(beamtime.CompareTo(
"aug14")==0) beamtime =
"jul14";
439 if (beamtime.CompareTo(
"aug11") ==0);
440 else if(beamtime.CompareTo(
"apr12") ==0);
441 else if(beamtime.CompareTo(
"jul14") ==0);
442 else if(beamtime.CompareTo(
"aug18") ==0);
443 else if(beamtime.CompareTo(
"mar19") ==0);
445 ::Error(
"",
"Beam time = %s not supported !",beamtime.Data());
455 ::Error(
"",
"Datasource source not set !");
459 TString classname = source->ClassName();
461 if(classname ==
"HRootSource") {
462 ::Error(
"",
"Datasource is HRootSource , not compatibel with unpackers !");
467 if(beamtime ==
"aug11")
469 ::Info(
"",
"Using aug11 setup");
471 Int_t mdcUnpackers [12] = {0x1100,0x1110,0x1120,0x1130,0x1140,0x1150,0x1000,0x1010,0x1020,0x1030,0x1040,0x1050};
472 Int_t rpcUnpackers [2] = {0x8400,0x8410};
473 Int_t startUnpackers [1] = {0x8800};
474 Int_t tofUnpackers [1] = {0x8600};
475 Int_t wallUnpackers [1] = {0x8700};
476 Int_t showerUnpackers[6] = {0x3200,0x3210,0x3220,0x3230,0x3240,0x3250};
477 Int_t richUnpackers [3] = {0x8300,0x8310,0x8320};
480 if(detectors.Contains(
"wall")) {
481 ::Info(
"",
"Adding WALL unpackers");
483 for(UInt_t i=0; i<(
sizeof(wallUnpackers)/
sizeof(Int_t)); i++)
485 cout<<hex<<wallUnpackers[i]<<
", "<<dec<<flush;
487 wallUnpacker->setQuietMode();
489 source->addUnpacker( wallUnpacker);
494 if(detectors.Contains(
"latch")) {source->addUnpacker(
new HLatchUnpacker(startUnpackers[0]) ); ::Info(
"",
"Adding LATCH unpacker");}
495 if(detectors.Contains(
"tbox")) {source->addUnpacker(
new HTBoxUnpacker(startUnpackers[0]) ); ::Info(
"",
"Adding TBOX unpacker");}
497 if(detectors.Contains(
"rich")){
498 ::Info(
"",
"Adding RICH unpackers");
500 for(UInt_t i=0; i<(
sizeof(richUnpackers)/
sizeof(Int_t)); i++){
501 cout<<hex<<richUnpackers[i]<<
", "<<dec<<flush;
507 if(detectors.Contains(
"mdc")){
508 ::Info(
"",
"Adding MDC unpackers");
510 for(UInt_t i=0; i<(
sizeof(mdcUnpackers)/
sizeof(Int_t)); i++) {
511 cout<<hex<<mdcUnpackers[i]<<
", "<<dec<<flush;
524 if(detectors.Contains(
"shower")){
525 ::Info(
"",
"Adding SHOWER unpackers");
527 for(UInt_t i=0; i<(
sizeof(showerUnpackers)/
sizeof(Int_t)); i++) {
528 cout<<hex<<showerUnpackers[i]<<
", "<<dec<<flush;
534 if(detectors.Contains(
"tof")){
535 ::Info(
"",
"Adding TOF unpackers");
537 for(UInt_t i=0; i<(
sizeof(tofUnpackers)/
sizeof(Int_t)); i++){
538 cout<<hex<<tofUnpackers[i]<<
", "<<dec<<flush;
540 tofUnp->setDebugFlag(0);
542 if(correctINL)tofUnp->setcorrectINL();
544 source->addUnpacker( tofUnp );
549 if(detectors.Contains(
"start")){
550 ::Info(
"",
"Adding START unpackers");
552 for(UInt_t i=0; i<(
sizeof(startUnpackers)/
sizeof(Int_t)); i++){
553 cout<<hex<<startUnpackers[i]<<
", "<<dec<<flush;
555 startUnp->setDebugFlag(0);
556 if(correctINL)startUnp->setcorrectINL();
559 source->addUnpacker( startUnp );
564 if(detectors.Contains(
"rpc")){
565 ::Info(
"",
"Adding RPC unpackers");
566 for(UInt_t i=0; i<(
sizeof(rpcUnpackers)/
sizeof(Int_t)); i++){
568 cout<<hex<<rpcUnpackers[i]<<
", "<<dec<<flush;
571 rpcTrb2Unpacker->setDebugFlag(0);
572 if(correctINL)rpcTrb2Unpacker->setcorrectINL();
573 source->addUnpacker(rpcTrb2Unpacker);
578 }
else if(beamtime ==
"apr12") {
579 ::Info(
"",
"Using apr12 setup");
581 Int_t mdcUnpackers [12] = {0x1100,0x1110,0x1120,0x1130,0x1140,0x1150,0x1000,0x1010,0x1020,0x1030,0x1040,0x1050};
582 Int_t rpcUnpackers [2] = {0x8400,0x8410};
583 Int_t startUnpackers [1] = {0x8800};
584 Int_t tofUnpackers [1] = {0x8600};
585 Int_t wallUnpackers [1] = {0x8700};
586 Int_t showerUnpackers[6] = {0x3200,0x3210,0x3220,0x3230,0x3240,0x3250};
587 Int_t richUnpackers [3] = {0x8300,0x8310,0x8320};
590 if(detectors.Contains(
"wall")) {
591 ::Info(
"",
"Adding WALL unpackers");
593 for(UInt_t i=0; i<(
sizeof(wallUnpackers)/
sizeof(Int_t)); i++)
595 cout<<hex<<wallUnpackers[i]<<
", "<<dec<<flush;
597 wallUnpacker->setQuietMode();
599 source->addUnpacker( wallUnpacker);
604 if(detectors.Contains(
"latch")) {source->addUnpacker(
new HLatchUnpacker(startUnpackers[0]) ); ::Info(
"",
"Adding LATCH unpacker");}
605 if(detectors.Contains(
"tbox")) {source->addUnpacker(
new HTBoxUnpacker(startUnpackers[0]) ); ::Info(
"",
"Adding TBOX unpacker");}
607 if(detectors.Contains(
"rich")){
608 ::Info(
"",
"Adding RICH unpackers");
610 for(UInt_t i=0; i<(
sizeof(richUnpackers)/
sizeof(Int_t)); i++){
611 cout<<hex<<richUnpackers[i]<<
", "<<dec<<flush;
617 if(detectors.Contains(
"mdc")){
618 ::Info(
"",
"Adding MDC unpackers");
620 for(UInt_t i=0; i<(
sizeof(mdcUnpackers)/
sizeof(Int_t)); i++) {
621 cout<<hex<<mdcUnpackers[i]<<
", "<<dec<<flush;
634 if(detectors.Contains(
"shower")){
635 ::Info(
"",
"Adding SHOWER unpackers");
637 for(UInt_t i=0; i<(
sizeof(showerUnpackers)/
sizeof(Int_t)); i++) {
638 cout<<hex<<showerUnpackers[i]<<
", "<<dec<<flush;
644 if(detectors.Contains(
"tof")){
645 ::Info(
"",
"Adding TOF unpackers");
647 for(UInt_t i=0; i<(
sizeof(tofUnpackers)/
sizeof(Int_t)); i++){
648 cout<<hex<<tofUnpackers[i]<<
", "<<dec<<flush;
650 tofUnp->setDebugFlag(0);
652 if(correctINL)tofUnp->setcorrectINL();
654 source->addUnpacker( tofUnp );
659 if(detectors.Contains(
"start")){
660 ::Info(
"",
"Adding START unpackers");
662 for(UInt_t i=0; i<(
sizeof(startUnpackers)/
sizeof(Int_t)); i++){
663 cout<<hex<<startUnpackers[i]<<
", "<<dec<<flush;
665 startUnp->setDebugFlag(0);
666 if(correctINL)startUnp->setcorrectINL();
669 source->addUnpacker( startUnp );
674 if(detectors.Contains(
"rpc")){
675 ::Info(
"",
"Adding RPC unpackers");
676 for(UInt_t i=0; i<(
sizeof(rpcUnpackers)/
sizeof(Int_t)); i++){
678 cout<<hex<<rpcUnpackers[i]<<
", "<<dec<<flush;
681 rpcTrb2Unpacker->setDebugFlag(0);
682 if(correctINL)rpcTrb2Unpacker->setcorrectINL();
683 source->addUnpacker(rpcTrb2Unpacker);
688 }
else if(beamtime ==
"jul14") {
689 ::Info(
"",
"Using jul14 setup");
691 Int_t mdcUnpackers [12] = {0x1100,0x1110,0x1120,0x1130,0x1140,0x1150,0x1000,0x1010,0x1020,0x1030,0x1040,0x1050};
692 Int_t rpcUnpackers [3] = {0x8400,0x8410,0x8420};
693 Int_t startUnpackers [1] = {0x8800};
694 Int_t startUnpackersTrb3 [2] = {0x8880,0x8890};
695 Int_t pionTrackerUnpackers[2] = {0x8900,0x8910};
696 Int_t tofUnpackers [1] = {0x8600};
697 Int_t wallUnpackers [1] = {0x8700};
698 Int_t showerUnpackers[6] = {0x3200,0x3210,0x3220,0x3230,0x3240,0x3250};
699 Int_t richUnpackers [3] = {0x8300,0x8310,0x8320};
702 if(detectors.Contains(
"wall")) {
703 ::Info(
"",
"Adding WALL unpackers");
705 for(UInt_t i=0; i<(
sizeof(wallUnpackers)/
sizeof(Int_t)); i++)
707 cout<<hex<<wallUnpackers[i]<<
", "<<dec<<flush;
709 wallUnpacker->setQuietMode();
711 source->addUnpacker( wallUnpacker);
716 if(detectors.Contains(
"latch")) {source->addUnpacker(
new HLatchUnpacker(startUnpackers[0]) ); ::Info(
"",
"Adding LATCH unpacker");}
717 if(detectors.Contains(
"tbox")) {source->addUnpacker(
new HTBoxUnpacker(startUnpackers[0]) ); ::Info(
"",
"Adding TBOX unpacker");}
719 if(detectors.Contains(
"rich")){
720 ::Info(
"",
"Adding RICH unpackers");
722 for(UInt_t i=0; i<(
sizeof(richUnpackers)/
sizeof(Int_t)); i++){
723 cout<<hex<<richUnpackers[i]<<
", "<<dec<<flush;
729 if(detectors.Contains(
"mdc")){
730 ::Info(
"",
"Adding MDC unpackers");
732 for(UInt_t i=0; i<(
sizeof(mdcUnpackers)/
sizeof(Int_t)); i++) {
733 cout<<hex<<mdcUnpackers[i]<<
", "<<dec<<flush;
746 if(detectors.Contains(
"shower")){
747 ::Info(
"",
"Adding SHOWER unpackers");
749 for(UInt_t i=0; i<(
sizeof(showerUnpackers)/
sizeof(Int_t)); i++) {
750 cout<<hex<<showerUnpackers[i]<<
", "<<dec<<flush;
756 if(detectors.Contains(
"tof")){
757 ::Info(
"",
"Adding TOF unpackers");
759 for(UInt_t i=0; i<(
sizeof(tofUnpackers)/
sizeof(Int_t)); i++){
760 cout<<hex<<tofUnpackers[i]<<
", "<<dec<<flush;
762 tofUnp->setDebugFlag(0);
764 if(correctINL)tofUnp->setcorrectINL();
766 source->addUnpacker( tofUnp );
771 if(detectors.Contains(
"start")){
772 ::Info(
"",
"Adding START unpackers");
775 for(UInt_t i=0; i<(
sizeof(startUnpackersTrb3)/
sizeof(Int_t)); i++){
776 cout<<hex<<startUnpackersTrb3[i]<<
", "<<dec<<flush;
777 ids.push_back(startUnpackersTrb3[i]);
782 startUnp->setDebugFlag(0);
783 startUnp->setQuietMode();
784 startUnp->setCTSId(0x8000);
785 source->addUnpacker( startUnp );
789 if(detectors.Contains(
"piontracker")){
790 ::Info(
"",
"Adding PionTracker unpackers");
792 for(UInt_t i=0; i<(
sizeof(pionTrackerUnpackers)/
sizeof(Int_t)); i++){
793 cout<<hex<<pionTrackerUnpackers[i]<<
", "<<dec<<flush;
797 source->addUnpacker( pionTrackerUnp );
802 if(detectors.Contains(
"rpc")){
803 ::Info(
"",
"Adding RPC unpackers");
804 for(UInt_t i=0; i<(
sizeof(rpcUnpackers)/
sizeof(Int_t)); i++){
806 cout<<hex<<rpcUnpackers[i]<<
", "<<dec<<flush;
809 rpcTrb2Unpacker->setDebugFlag(0);
810 if(correctINL)rpcTrb2Unpacker->setcorrectINL();
811 source->addUnpacker(rpcTrb2Unpacker);
816 else if(beamtime ==
"aug18" || beamtime ==
"mar19") {
818 if(beamtime ==
"aug18")::Info(
"",
"Using aug18 setup");
819 else ::Info(
"",
"Using mar19 setup");
821 Int_t mdcUnpackers [12] = {0x1100,0x1110,0x1120,0x1130,0x1140,0x1150,0x1000,0x1010,0x1020,0x1030,0x1040,0x1050};
822 Int_t rpcUnpackers [3] = {0x8400,0x8410,0x8420};
823 Int_t startUnpackers [1] = {0x8800};
824 Int_t startUnpackersTrb3 [1] = {0x8880};
825 Int_t pionTrackerUnpackers[2] = {0x8900,0x8910};
826 Int_t tofUnpackers [1] = {0x8600};
827 Int_t wallUnpackers [1] = {0x8700};
828 Int_t showerUnpackers[6] = {0x3200,0x3210,0x3220,0x3230,0x3240,0x3250};
829 Int_t richUnpackers [12] = {0x83c0,0x83c1,0x83c2,0x83c3,0x83c4,0x83c5,0x83c6,0x83c7,0x83c8,0x83c9,0x83ca,0x83cb};
830 Int_t emcUnpackers [6] = {0x8A00,0x8A01,0x8A02,0x8A03,0x8A04,0x8A05};
832 if(detectors.Contains(
"wall")) {
833 ::Info(
"",
"Adding WALL unpackers");
835 for(UInt_t i=0; i<(
sizeof(wallUnpackers)/
sizeof(Int_t)); i++)
837 cout<<hex<<wallUnpackers[i]<<
", "<<dec<<flush;
839 wallUnpacker->setQuietMode();
841 source->addUnpacker( wallUnpacker);
846 if(detectors.Contains(
"latch")) {source->addUnpacker(
new HLatchUnpacker(startUnpackers[0]) ); ::Info(
"",
"Adding LATCH unpacker");}
847 if(detectors.Contains(
"tbox")) {source->addUnpacker(
new HTBoxUnpacker(startUnpackers[0]) ); ::Info(
"",
"Adding TBOX unpacker");}
849 if(detectors.Contains(
"rich")){
850 ::Info(
"",
"Adding RICH unpackers");
852 for(UInt_t i=0; i<(
sizeof(richUnpackers)/
sizeof(Int_t)); i++){
853 cout<<hex<<richUnpackers[i]<<
", "<<dec<<flush;
854 ids.push_back(richUnpackers[i]);
861 unp->setDebugFlag(0);
863 source->addUnpacker( unp );
867 if(detectors.Contains(
"mdc")){
868 ::Info(
"",
"Adding MDC unpackers");
870 for(UInt_t i=0; i<(
sizeof(mdcUnpackers)/
sizeof(Int_t)); i++) {
871 cout<<hex<<mdcUnpackers[i]<<
", "<<dec<<flush;
884 if(detectors.Contains(
"shower")){
885 ::Info(
"",
"Adding SHOWER unpackers");
887 for(UInt_t i=0; i<(
sizeof(showerUnpackers)/
sizeof(Int_t)); i++) {
888 cout<<hex<<showerUnpackers[i]<<
", "<<dec<<flush;
894 if(detectors.Contains(
"tof")){
895 ::Info(
"",
"Adding TOF unpackers");
897 for(UInt_t i=0; i<(
sizeof(tofUnpackers)/
sizeof(Int_t)); i++){
898 cout<<hex<<tofUnpackers[i]<<
", "<<dec<<flush;
900 tofUnp->setDebugFlag(0);
902 if(correctINL)tofUnp->setcorrectINL();
904 source->addUnpacker( tofUnp );
909 if(detectors.Contains(
"start")){
910 ::Info(
"",
"Adding START unpackers");
912 for(UInt_t i=0; i<(
sizeof(startUnpackersTrb3)/
sizeof(Int_t)); i++){
913 cout<<hex<<startUnpackersTrb3[i]<<
", "<<dec<<flush;
914 ids.push_back(startUnpackersTrb3[i]);
918 startUnp->setDebugFlag(0);
919 startUnp->setQuietMode();
920 startUnp->setCTSId(0x8000);
923 source->addUnpacker( startUnp );
926 if(detectors.Contains(
"piontracker")){
927 ::Info(
"",
"Adding PionTracker unpackers");
929 for(UInt_t i=0; i<(
sizeof(pionTrackerUnpackers)/
sizeof(Int_t)); i++){
930 cout<<hex<<pionTrackerUnpackers[i]<<
", "<<dec<<flush;
934 source->addUnpacker( pionTrackerUnp );
940 if(detectors.Contains(
"rpc")){
941 ::Info(
"",
"Adding RPC unpackers");
942 for(UInt_t i=0; i<(
sizeof(rpcUnpackers)/
sizeof(Int_t)); i++){
944 cout<<hex<<rpcUnpackers[i]<<
", "<<dec<<flush;
947 rpcTrb2Unpacker->setDebugFlag(0);
948 if(correctINL)rpcTrb2Unpacker->setcorrectINL();
949 source->addUnpacker(rpcTrb2Unpacker);
954 if(detectors.Contains(
"emc"))
956 ::Info(
"",
"Adding Emc unpackers");
958 for(UInt_t i=0; i<(
sizeof(emcUnpackers)/
sizeof(Int_t)); i++){
959 cout<<hex<<emcUnpackers[i]<<
", "<<dec<<flush;
960 ids.push_back(emcUnpackers[i]);
966 emcUnp->setDebugFlag(0);
967 emcUnp->setQuietMode();
968 source->addUnpacker( emcUnp );
974 ::Error(
"setupUnpackers()",
"unknown beamtime = %s!",beamtime.Data());
virtual void setModules(Int_t sec, Int_t *modules)
void setFillDataWord(Bool_t b)
static void setupParameterSources(TString parsource="oracle", TString asciiParFile="", TString rootParFile="", TString histDate="now")
void setDebugFlag(Int_t db)
HDataSource * getDataSource(void) const
Bool_t open(const Text_t *fname, const Option_t *option="READ", const Text_t *ftitle="", Int_t compress=1)
HRuntimeDb * getRuntimeDb(void)
static void setDataSource(Int_t sourceType=-1, TString inDir="", TString inFile="", Int_t refId=-1, TString eventbuilder="lxhadeb02.gsi.de")
void addDetector(HDetector *det)
Bool_t open(const Text_t *fname, const Text_t *status="in")
Bool_t setFirstInput(HParIo *)
Bool_t setSecondInput(HParIo *)
void setPersistencyDataword(Bool_t b=kTRUE)
void setQuietMode(Bool_t quiet=kTRUE, Bool_t warn=kTRUE)
HSpectrometer * getSetup(void)
HDetector * getDetector(const Char_t *name)
static void setupUnpackers(TString beamtime="aug11", TString detectors="rich,mdc,tof,rpc,shower,wall,tbox,latch,start", Bool_t correctINL=kTRUE)
void setFillOepStatus(Bool_t b)
static void setSecondDataSource(TString inDir="", TString inFile="", Int_t refId=-1)
void setPersistencyOepStatusData(Bool_t b=kTRUE)
void setDataSource(HDataSource *dataS)
void setSecondDataSource(HDataSource *dataS)