576 root->addChild(
m_clockwork->controller->drawOptions());
579 std::vector<std::string>::const_iterator firstKey, lastKey;
583 std::vector<std::string> strCaloCellKeys;
585 firstKey = strCaloCellKeys.begin();
586 lastKey = strCaloCellKeys.end();
589 if(firstKey!=lastKey) {
591 std::string keyCaloCell = *firstKey;
593 if(status.isSuccess() &&
m_clockwork->calocells!=0) {
597 VP1CC_SeparatorTypesSet::iterator itSepType=
m_clockwork->sepTypes.begin();
598 for(; itSepType!=
m_clockwork->sepTypes.end(); ++itSepType) {
599 SoSeparator* childSep =
new SoSeparator();
602 root->addChild(
m_clockwork->controller->GetMaterial(*itSepType));
603 root->addChild(childSep);
611 message(
"Unable to retrieve Calo Cells from Store Gate for this event");
613 while(++firstKey!=lastKey)
614 messageDebug(
"Another Calo Cell collection found in the SG with key = " + QString((*firstKey).c_str()));
616 message(
"No Calo Cells in Store Gate for this event");
622 m_clockwork->controller->EnableDigitsCheckbox(
false);
637 std::vector<std::string> strLArDigitKeys;
639 firstKey = strLArDigitKeys.begin();
640 lastKey = strLArDigitKeys.end();
642 if(firstKey==lastKey){
643 message(
"No LAr Digits in Store Gate for this event");
646 std::string strLArDigitKeys(
""), tagThinned(
""), tagIIC(
""), tagFirstOther(
"");
648 for(;firstKey!=lastKey;++firstKey) {
649 if((*firstKey).find(
"Thinned")!=std::string::npos)
650 tagThinned = *firstKey;
651 else if((*firstKey).find(
"IIC")!=std::string::npos)
653 else if(tagFirstOther==
"")
654 tagFirstOther = *firstKey;
657 if(tagFirstOther!=
"")
658 strLArDigitKeys = tagFirstOther;
659 else if(tagThinned!=
"")
660 strLArDigitKeys = tagThinned;
662 strLArDigitKeys = tagIIC;
664 QString mess = QString(
"Retrieving LArDigitContainer with the key ") + QString(strLArDigitKeys.c_str());
669 if(status.isSuccess() &&
m_clockwork->lar_digits != 0) {
670 m_clockwork->controller->EnableDigitsCheckbox(
true);
671 std::ostringstream numLarDigits;
673 message(
"Number of LAr digits for this event " + QString(numLarDigits.str().c_str()));
675 message(
"Unable to retrieve LAr digits from Store Gate for this event");
685 std::vector<std::string> strTileDigitKeys;
687 firstKey = strTileDigitKeys.begin();
688 lastKey = strTileDigitKeys.end();
690 if(firstKey==lastKey){
691 message(
"No Tile Digits in Store Gate for this event");
694 std::string keyTileDigits = *firstKey;
697 if(status.isFailure() ||
m_clockwork->tile_digits==0){
698 message(
"Unable to retrieve Tile digits from Store Gate for this event");
702 m_clockwork->controller->EnableDigitsCheckbox(
true);
705 std::vector<std::string> strTileRawchanKeys;
707 firstKey = strTileRawchanKeys.begin();
708 lastKey = strTileRawchanKeys.end();
710 if(firstKey==lastKey) {
711 message(
"No Tile Raw Channels in Store Gate for this event");
714 std::string keyTileRawChan =
m_clockwork->SearchTileRawchanKeys(strTileRawchanKeys);
717 if(keyTileRawChan==
"")
718 keyTileRawChan = *firstKey;
720 QString mess = QString(
"Retrieving Tile Raw Channels with the key ") + QString(keyTileRawChan.c_str());
724 if(status.isFailure() ||
m_clockwork->tile_rawchannel==0) {
725 message(
"Unable to retrieve Tile raw channels from Store Gate for this event");
740 SoSeparator* mbtsSeparator =
new SoSeparator;
741 root->addChild(mbtsSeparator);
743 m_clockwork->mbtsHelper->buildEventSceneGraph(sg,mbtsSeparator);
745 }
catch(std::runtime_error& err) {
756 SoNode*
tail = pickedPath->getTail();
759 VP1CC_SoNode2CCMap::iterator itNode2CC =
m_clockwork->node2ccMap.find(
tail);
768 std::string channel_string =
"";
769 if ( cabling.isValid() &&
m_clockwork->lar_onlineID ) {
774 std::ostringstream idstring;
776 idstring <<
"(b_ec=" <<
m_clockwork->calo_id->pos_neg(cellOffline) <<
", samp="
777 <<
m_clockwork->calo_id->sampling(cellOffline) <<
", reg="
778 <<
m_clockwork->calo_id->region(cellOffline) <<
", eta="
779 <<
m_clockwork->calo_id->eta(cellOffline) <<
", phi="
782 else if (
m_clockwork->calo_id->is_fcal(cellOffline) ) {
783 idstring <<
"(pos_neg=" <<
m_clockwork->calo_id->pos_neg(cellOffline) <<
",mod="
784 <<
m_clockwork->calo_id->sampling(cellOffline) <<
",eta="
785 <<
m_clockwork->calo_id->eta(cellOffline) <<
",phi="
788 channel_string = idstring.str();
792 hwId = cabling->createSignalChannelID(cellOffline);
794 message(
"LArID Exception caught while creating signal channel id");
798 channel_string +=
m_clockwork->lar_onlineID->channel_name(hwId);
803 std::vector<std::string>
msg;
805 msg = (*itNode2CC).second->ToString(
m_clockwork->calo_id, channel_string);
806 }
catch(std::runtime_error& err) {
811 for(
unsigned int ii=0; ii<
msg.size(); ++ii)
828 hwId = cabling->createSignalChannelID(cellOffline);
830 message(
"EXCEPTION!! LArIDException caught while creating signal channel id!!");
836 for(;itLArDig!=
m_clockwork->lar_digits->end(); ++itLArDig) {
837 if((*itLArDig)->hardwareID()==hwId) {
839 message(
"displaying LAr digits...");
842 m_clockwork->controller->displayLArDigits( (*itLArDig)->nsamples(),
843 (*itLArDig)->samples(),
845 }
catch (std::exception& e) {
847 std::cout <<
"ERROR!!! Exception caught! --> " << e.what() << std::endl;
848 QString title =
"ERROR!!! Exception caught!";
849 QString mex =
"While displaying LAr digits, an exception has been caught!\n\nException details:\n\n" + QString::fromStdString(e.what());
850 messageDebug(
"Clearing the DigitForm and returning...");
854 QMessageBox::warning( widget, title,
868 message(
"Unable to find digits for the selected cell");
870 message(
"LAr digit display not available");
886 int frag1, channel1, frag2, channel2;
895 for(;itTileDig!=
m_clockwork->tile_digits->end();++itTileDig) {
896 if((*itTileDig)->size() >0 && (*itTileDig)->identify()==frag1) {
898 digits1 = (**itTileDig)[channel1];
902 if(channel2==channel1) {
905 for(;itTileDig!=
m_clockwork->tile_digits->end();++itTileDig) {
906 if((*itTileDig)->size() >0 && (*itTileDig)->identify()==frag2) {
907 digits2 = (**itTileDig)[channel2];
913 digits2 = (**itTileDig)[channel2];
918 message(
"Unable to find digits for the PMT 1");
933 message(
"Unable to find digits for the PMT 0");
944 for(;itTileRawCh!=
m_clockwork->tile_rawchannel->end();++itTileRawCh) {
946 if((*itTileRawCh)->size()>0 && (*itTileRawCh)->identify()==frag1) {
947 rawchannel1 = (**itTileRawCh)[channel1];
951 if(channel2==channel1) {
954 itTileRawCh =
m_clockwork->tile_rawchannel->begin();
955 for(;itTileRawCh!=
m_clockwork->tile_rawchannel->end();++itTileRawCh)
956 if((*itTileRawCh)->size()>0 && (*itTileRawCh)->identify()==frag2) {
966 rawchannel2 = (**itTileRawCh)[channel2];
969 message(
"Unable to get raw channel for PMT1");
974 std::cout <<
"debug vars :" << rawchannel1 <<
" - " << rawchannel2 << std::endl;
975 std::cout <<
m_clockwork->tile_rawchannel << std::endl;
976 std::cout << digits1->
samples().size() << std::endl;
983 std::cout <<
"ERROR!!! Exception caught from Tile! --> " << e.what() << std::endl;
984 QString title =
"ERROR!!! Exception caught!";
985 QString mex =
"While displaying Tile Pulse, an exception has been caught!\n\nException details:\n\n" + QString::fromStdString(e.what());
986 messageDebug(
"Clearing the DigitForm and returning...");
990 QMessageBox::warning( widget, title,
1005 if(rawchannel1==0) {
1006 message(
"Unable to get raw channel for PMT0");
1012 message(
"Unable to get drawer and channel IDs");
1014 message(
"Tile digit display not available");
1034 for(;itTileDig!=
m_clockwork->tile_digits->end();++itTileDig) {
1035 if((*itTileDig)->size() >0 && (*itTileDig)->identify()==frag) {
1036 digits = (**itTileDig)[
channel];
1045 message(
"Unable to find digits");
1054 for(;itTileRawCh!=
m_clockwork->tile_rawchannel->end();++itTileRawCh) {
1056 if((*itTileRawCh)->size()>0 && (*itTileRawCh)->identify()==frag) {
1057 rawchannel = (**itTileRawCh)[
channel];
1062 message(
"Unable to get raw channel");
1066 message(
"Unable to get drawer and channel ID");
1068 message(
"Tile digit display not available");
1082 std::vector<std::string>
msg =
m_clockwork->mbtsHelper->userPickedNode(pickedNode);
1083 for(
unsigned int ii=0; ii<
msg.size(); ++ii)