86{
87 int* pars = nullptr;
88
89
90 const char* dqmserver = m_conf->getconf("dqmserver", "nodename");
91 RFNSM_Status::Instance().set_flag(0);
92
93 b2nsm_sendreq(dqmserver, "RC_LOAD", 0, pars);
94 while (RFNSM_Status::Instance().get_flag() == 0) b2nsm_wait(1);
95 printf("RFMaster:: dqmserver configured\n");
96
97
98
99 const char* distributor = m_conf->getconf("distributor", "nodename");
100 RFNSM_Status::Instance().set_flag(0);
101
102 b2nsm_sendreq(distributor, "RC_LOAD", 0, pars);
103 while (RFNSM_Status::Instance().get_flag() == 0) b2nsm_wait(1);
104 printf("RFMaster:: distributor configured\n");
105
106
107
108
109 int maxnodes = m_conf->getconfi("processor", "nnodes");
110 int idbase = m_conf->getconfi("processor", "idbase");
111 const char* hostbase = m_conf->getconf("processor", "nodebase");
112 char* badlist = m_conf->getconf("processor", "badlist");
113
114 char hostnode[512], idname[3];
115 int nnodes = 0;
116 RFNSM_Status::Instance().set_flag(0);
117 for (int i = 0; i < maxnodes; i++) {
118 sprintf(idname, "%2.2d", idbase + i);
119 if (badlist == NULL ||
120 strstr(badlist, idname) == 0) {
121 sprintf(hostnode, "evp_%s%2.2d", hostbase, idbase + i);
122
123 b2nsm_sendreq(hostnode, "RC_LOAD", 0, pars);
124 nnodes++;
125 }
126 }
127
128 sleep(10);
129
130 printf("RFMaster:: distributor configured\n");
131
132
133 const char* collector = m_conf->getconf("collector", "nodename");
134 RFNSM_Status::Instance().set_flag(0);
135
136 b2nsm_sendreq(collector, "RC_LOAD", 0, pars);
137 while (RFNSM_Status::Instance().get_flag() == 0) b2nsm_wait(1);
138 printf("RFMaster:: collector configured\n");
139
140
141
142 const char* roisender = m_conf->getconf("roisender", "nodename");
143 RFNSM_Status::Instance().set_flag(0);
144
145 b2nsm_sendreq(roisender, "RC_LOAD", 0, pars);
146 while (RFNSM_Status::Instance().get_flag() == 0) b2nsm_wait(1);
147 printf("RFMaster:: roisender configured\n");
148
149 return 0;
150}