30 {
31
32 unsigned int smk = frame.smk();
33 if(smk==0) return false;
34
36
37 typedef pair<unsigned int, unsigned int> lbnpsk_t;
38 vector<lbnpsk_t> reqested_prescale_keys = frame.getPrescaleSetCollection().prescale_keys();
39
40
41 frame.clear();
42
43
44 frame.setSMK(smk);
45
46 try {
48
50
53 seqldr.load(frame);
54
57 chldr.load(frame);
58
59
60 bool all_connected(true);
62 for( lbnpsk_t lbnpsk: reqested_prescale_keys) {
63 unsigned int psk = lbnpsk.second;
64 bool is_connected = psk!=0 && connected_psk.find(psk)!=connected_psk.end();
65 TRG_MSG_INFO(
"LB " << setw(3) << right << lbnpsk.first <<
" : " << lbnpsk.second);
66 if(!is_connected) {
67 TRG_MSG_ERROR(
"prescale key " << lbnpsk.second <<
" is not connected to SMK");
68 all_connected = false;
69 }
70 }
71
72 if(all_connected) {
73 frame.thePrescaleSetCollection().set_prescale_keys_to_load( reqested_prescale_keys );
74
77
78 pssldr.load(frame.thePrescaleSetCollection());
79
80
81
82
83 if(frame.getPrescaleSetCollection().size()==1) {
84 HLTPrescaleSet* singlePrescaleSet(frame.getPrescaleSetCollection().sets().begin()->pss);
85
86 for(HLTChain* ch: frame.theHLTChainList()) {
87 pair<bool, float> rrps =
ch->rerun_prescale(
"");
88 if(rrps.first) {
89 singlePrescaleSet->thePrescale(
ch->chain_counter(),
ch->level_enum()).setRerunPrescale(
"",rrps.second);
90 }
91 }
92 frame.theHLTChainList().applyPrescaleSet(singlePrescaleSet);
93 }
94
95 } else {
96 TRG_MSG_ERROR(
"Not all requested HLT prescale keys are connected to the SMK");
98 for(int psk: connected_psk) {
100 }
101 TRG_MSG_INFO(
"these HLT PSK are connected to SMK " << smk <<
": " <<
s.str());
102 throw runtime_error("HLTFrameLoader: not all requested HLT prescale keys are connected to the SMK");
103 }
104
105
106 if( frame.mergedHLT() ) {
107 bool needMerging(false);
108 for( const TrigConf::HLTChain* chain : frame.getHLTChainList() ) {
110 needMerging = true;
111 }
112
113 if(needMerging) {
114 TRG_MSG_DEBUG(
"Call merging of " << frame.getHLTChainList().size() <<
" L2 and EF chains");
116 }
117 }
118
119
120 }
121 catch (const std::exception& e) {
123 throw;
124 }
125
126
127
128 return true;
129}
StorageMgr & m_storageMgr
reference to the storage manager
virtual MSGTC::Level outputLevel() const override
std::set< unsigned int > GetConnectedPSKs(unsigned int smk)
void loadSMT(HLTFrame &frame)
static void mergeHLTChainList2(TrigConf::HLTFrame &frame)